is6 {4 h/ e0 y2 E: ]# ?' f
local links,rechts : integer;. t/ A! z: Q/ Z& X
do# B4 T; h8 z1 b8 G6 a8 o
if @.standort.nf(1).nf(1).voll
' ^ u1 \! {( N! P2 t" _6 j and @.standort.nf(2).nf(1).voll
* }+ j( J( b9 N) F. r2 p and @.standort.nf(3).nf(1).voll7 \5 [! ?* E* [% ?# k. ]
then, l/ q: h0 w* J
blockier_merker := TRUE;
2 Y s0 c7 t+ i0 t: h) q else
/ E! v" P6 E8 z6 e if @.standort.nf(1).nf(1).leer
& T3 R4 q0 l& w+ Y0 V( b then
* C" t2 {' ]- H* D/ j) G" K @.ziel := "ap4_C";
& a$ Q& z$ w0 D' d @.umlagern(@.standort.nf(1));
1 F2 W0 X# G2 e. I Q. ^ else! E6 s, P* {4 J0 c f
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs & N4 B: [0 T8 X) Q" N7 D
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
) y# `, Z& Z. @1 N, t + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
H; ?' n D/ A, O- M5 c6 l rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
8 q3 a+ H3 z8 @8 } + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
h/ G0 G1 I6 y& u2 x. V+ H( N2 a7 S + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
5 H4 g: O. Q" r if links > rechts * e1 A/ t1 o* ]4 Z. |4 J9 f
then6 u) f" `0 c: O" G/ _: w: n
if @.standort.nf(3).nf(1).leer
* R5 N6 Z5 e/ R2 m/ x then
s2 h; v4 q$ J3 q3 Y @.umlagern(@.standort.nf(3));
! h6 X/ N$ c: b2 Z else6 b: _1 Y! b9 Y. T6 b* k
if @.standort.nf(2).nf(1).leer
/ X7 E2 B2 x3 W9 F( \9 u9 [6 a) ]6 a$ o then
1 S8 L& ]5 q% f r3 x% w @.umlagern(@.standort.nf(2));
4 A4 F/ k% M6 t else
& v; o; y6 U _' s @.umlagern(@.standort.nf(1));* m+ m% A9 t0 O. H* K6 [5 F/ |
end;. ~8 v m% e, o; V
end;* ~( P1 H- F& k3 \
else
* o8 g+ ?9 F* t5 B1 D! u if @.standort.nf(2).nf(1).leer
4 {+ q( b( ~, b; q0 A then
5 W& h8 I" x/ I1 C6 J4 C# F s @.umlagern(@.standort.nf(2));
T3 a8 G' P0 g else
' L/ Z2 w. G- C& `% E) q& S- o, Q! g if @.standort.nf(3).nf(1).leer
$ z) p% `1 Y9 }- F$ X; L then
( y) [& Y) w* @* o2 y @.umlagern(@.standort.nf(3));
( ?+ r+ i9 E8 j' e else
# X4 E, d6 l& }& L" Z @.umlagern(@.standort.nf(1));
2 v$ _2 q' f. T1 e end;
8 K% w& l% P( S {1 I- b. F end; c* b$ |+ H. Z, S
end; 3 F! \' e* V; W5 s- g6 @
end;+ @" [3 l; j4 ]
end;
9 W7 r! B" C+ i; Z/ S2 c3 iif ?.leer5 n5 G8 V6 \# X$ \0 k! y& Q
then
% G4 t9 B4 k. m blockier_merker := false;
n% s7 b/ {/ {3 o9 I. kend;6 [# } m0 J; Q
end;
% s1 _. y% C w- D& N1 P! D) z大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |