is" K0 |% x3 W. x; l4 t0 b# `
local links,rechts : integer;9 l; P6 |& s3 y7 r/ m1 V4 ?
do5 L0 `& r. k+ {) }
if @.standort.nf(1).nf(1).voll
9 q; @4 O8 D, p2 Q2 _9 m" t# J; y& I# t and @.standort.nf(2).nf(1).voll
7 @ N% ]/ G! ?5 W and @.standort.nf(3).nf(1).voll$ {& g5 [/ O& Q# v3 X E" `
then
; ]/ G' Y8 B; V' ~ blockier_merker := TRUE;
* _3 A, L+ r# q& E8 N. O' d* H else
6 q0 Z4 F- _( O7 O if @.standort.nf(1).nf(1).leer6 l; C# R3 K: [" i) W! w, T
then) K9 T" A$ j- n H( G, j5 `/ g
@.ziel := "ap4_C";
+ V3 ]( v8 a3 T @.umlagern(@.standort.nf(1));
% ?; f6 k% H( G/ t9 e& |0 V1 u else
2 A {+ D, C- |& o links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
! F, n6 e+ y4 R7 J, {2 _3 P% i + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs ) c& q* y. J4 T
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
- X' i, Z! A4 b& p% t: h+ h rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
& L0 F) S2 B9 }7 `: |- B + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
1 ~4 y- f& R8 W5 } + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;% t& ]5 H5 j E/ s+ _* C# e0 E
if links > rechts
z2 z) f) W% n then( n$ g. A& e* N. n
if @.standort.nf(3).nf(1).leer
, d& L U: o; G2 p then
0 [' ^' l" d) \+ {6 o0 k* A @.umlagern(@.standort.nf(3));
* P6 K b& E2 X else
& G& a! o" ^9 _* i6 d if @.standort.nf(2).nf(1).leer5 E; p6 g% ~' }# O) c. I
then
. q% X! R; f0 z# q1 e' v& G; _ @.umlagern(@.standort.nf(2));
9 ?' q5 V$ `4 a# i3 a/ o1 @ else; p: x8 W+ J @+ t$ T% z0 z5 F( [6 i1 c
@.umlagern(@.standort.nf(1));, y, b# x2 t! {
end;
$ Y! u7 K' d& y% L5 A& q7 X end;0 K, ^' v/ K! G' S$ a/ Z' S% n
else ! I3 X! H/ |2 O' N1 @6 i0 r8 Y2 }" ]
if @.standort.nf(2).nf(1).leer" g/ R+ M+ R( c2 x! T" W! G. S- Y
then
* ]% z9 ?$ A. k @.umlagern(@.standort.nf(2));
2 }5 B* f8 M: C6 q# a' t! d else' U/ v( a e, R3 K) k ?5 d) w5 u
if @.standort.nf(3).nf(1).leer
0 v" u" o H8 B, n. q9 I then# g- ]" ~! u& Q* J0 B
@.umlagern(@.standort.nf(3));
: M+ [, i5 X# ^6 `2 d! `, l else4 ?. }1 g5 h# f
@.umlagern(@.standort.nf(1));3 B' z! O) K7 a
end;0 A) ]2 o0 L5 {
end; G- r7 Y4 _- V V, Z
end; % z" n: A5 ^% ~6 ]# t& A
end;* Q y. \$ [3 R% Y
end;
$ z2 n% ^0 i# i0 H' q) hif ?.leer
5 m* N" \/ ~1 S/ x; ^2 ^then' ?2 t8 i3 j/ `
blockier_merker := false;
1 h+ P# F0 M5 ?8 }) R) s5 @end;
8 s4 ^8 d3 P0 e; s7 x3 }6 Z8 }end;
% V) |7 L @: h2 J2 g. F" H大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |