is3 A6 e. y: @' |
local links,rechts : integer;% G- x7 u7 c1 F) a9 H6 g8 y! F1 P, T
do7 d. W$ k! T" I2 k" a- t/ S6 o
if @.standort.nf(1).nf(1).voll
1 [0 y! w: @" f and @.standort.nf(2).nf(1).voll
8 K. w$ m# B% }/ ` and @.standort.nf(3).nf(1).voll
% Q4 i4 W3 L8 u9 K k5 { then5 X( I; x* f- O; p: P3 W4 D
blockier_merker := TRUE;4 C$ A/ E. C. z0 o4 c5 g
else
& ^( l4 ^8 l8 X" a2 z$ { if @.standort.nf(1).nf(1).leer
r7 U3 L/ Q) z/ o6 F( w: f then- b" A' S* R2 @) b* T' G+ @- C5 J. ]3 ~% C
@.ziel := "ap4_C";
; c+ A+ `& `, R7 U! T+ b5 u @.umlagern(@.standort.nf(1));0 G$ w! `: ]7 s' ?& {
else
9 R) V( [. y0 i* B( b links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs 9 \2 \% p- e& J& W, T
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs + \1 \; H1 t- J# O
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;; o3 E) u, ~1 @: x4 w
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
7 F* {7 ~' h- X! c* z4 P# d + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs / I* S- V/ B; i$ m
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
' S2 w; M! w! A0 W% U$ C# }. l if links > rechts 1 R0 M+ k9 M6 G+ O
then
+ C3 \4 y! V5 _1 r& Q. W8 M if @.standort.nf(3).nf(1).leer
$ Q( ]- a! p; h6 ~ then5 v/ H" I9 w$ w* ~+ A8 J/ ?9 p. I
@.umlagern(@.standort.nf(3));
0 W U% Y4 n) z else
( I" Z& t& N3 O* U if @.standort.nf(2).nf(1).leer
) u" Q' s0 k* b e: o then
0 @2 u) [# C5 z" y% |* d. E; S# Q @.umlagern(@.standort.nf(2));6 T: v" _3 r5 F
else3 y0 p) M+ r* y! y) L6 `% e% G7 S
@.umlagern(@.standort.nf(1));
# ~$ r- ?: \" S8 z end;# f$ V/ ]8 T7 W( `
end;
" g/ k4 k: P- y w0 i/ _- U ~ else
1 t( N8 j9 Z2 K if @.standort.nf(2).nf(1).leer' w+ E2 l- L9 F d) h' ~% ]
then
' z0 H4 E- r6 H, H* Y$ p' L @.umlagern(@.standort.nf(2)); c _: i5 i5 n- L* \
else- t$ {) f/ M6 x P
if @.standort.nf(3).nf(1).leer
5 Y7 l0 L# K/ g6 Z8 O% `* S then2 S. f% D0 L+ z
@.umlagern(@.standort.nf(3)); v' a, z& E0 [* Q( J, n
else5 @ O" c4 j+ y/ V
@.umlagern(@.standort.nf(1));
! f8 I9 ~" Q5 D5 f4 E! _ R end;
5 b- r1 g' W) B7 ]7 A end;& ~) q1 o0 H2 V1 Q, l3 i5 b
end;
: _& E) _9 t) s end;8 O3 M6 p3 {& N+ P7 T7 P0 m
end;- W. e' C$ A, Y- M, [( v
if ?.leer' k6 ]% X9 L, }2 E& _
then
, r( q' D1 z1 B i5 c blockier_merker := false;
: N, Q# f/ h, E0 yend;* t; A" h! q9 y6 b. A5 v) H* _+ A8 K
end;
1 i; {" G- u$ v' b大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |