is
& d7 N: j; T7 C, j% u: Wlocal links,rechts : integer;. Z( k: \5 F2 e3 i8 S
do/ V+ o. z7 N, o$ n$ O
if @.standort.nf(1).nf(1).voll
' S2 D! q1 U" e" B2 A" i and @.standort.nf(2).nf(1).voll( g2 ~8 v3 `! J9 ]) @1 w" m& }
and @.standort.nf(3).nf(1).voll
0 P# T2 X( }" o then/ ]4 X. o. G7 W6 D( y2 j7 t$ K4 ~
blockier_merker := TRUE;/ `' _5 W7 P# y4 r- Z0 J/ q
else
5 w' ]. O2 V, `3 P( v/ x' [$ q if @.standort.nf(1).nf(1).leer5 o4 T+ ]0 h" ? m8 i% \) m
then2 X3 `' O7 k1 Q5 ~' _
@.ziel := "ap4_C";, p+ ?* t; c* G3 D
@.umlagern(@.standort.nf(1));4 G% O5 H0 K' h
else* D- ]' x. Y5 ?& t S3 G
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
3 r/ Z y# A6 I' _ + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
: c3 ~& B' ^" E: m6 N + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
& E( T# H" \ `' Q: {- R rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
- ~" [5 w5 C+ _ + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs / G: d' e+ b- w3 ]8 J( w
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
, u; C7 j8 z0 P6 X3 B$ R( }' X3 ] if links > rechts 6 [! Q5 r% ?1 }0 @; @3 R# z
then
' q( ?! O# c7 C: k5 [, @ if @.standort.nf(3).nf(1).leer2 b* C, m$ i$ S& J0 d
then3 n$ d2 x' p. M1 u l
@.umlagern(@.standort.nf(3));
0 P. r, _# G8 e, z" z else$ w1 ~* O% H+ F3 `, I* W A5 u$ i
if @.standort.nf(2).nf(1).leer9 w, j0 w$ C. g# b& K5 E
then
, @. m6 d0 `$ `. Z' k8 } @.umlagern(@.standort.nf(2));
2 x6 \& u! i& x9 K C4 R8 ` ` else3 H }8 Z* Q9 V; J
@.umlagern(@.standort.nf(1));
" ^& G4 x$ D }( Z7 ` end;
7 ]% v* s' l5 G. u# v( m% B1 P end;
0 t) B) j8 E7 a {9 B+ S else % `1 J3 ^* C9 ~; f. }! R. ] m
if @.standort.nf(2).nf(1).leer
d7 [! C' \% C6 T/ b! _ then7 ?# q% x4 Q" P5 u7 R# ]
@.umlagern(@.standort.nf(2)); 6 N1 v* U7 c! B5 W: F( C+ t( a
else3 e6 U( Y6 U. X$ I9 A
if @.standort.nf(3).nf(1).leer& Z! @7 l+ ~, F/ W; V
then* T& A. t' t3 D; q1 U3 w H: h
@.umlagern(@.standort.nf(3));
+ _: x9 v. Z1 N" N5 H- \6 h, K( v else4 l# E4 M4 ?0 y3 U
@.umlagern(@.standort.nf(1));
, M% ?" Y* @" Q& u& j. Q end;
: R$ z6 `( F4 x, `8 Z) ` end;
1 H; ~5 [& |6 h# ]5 I$ C end; 8 S: h5 C* p8 D
end;
6 W% c2 ^, ~4 [ end;
4 Q* t5 ^! e9 [& m0 ]( ?* T6 mif ?.leer
8 g' k9 j* I7 z% n8 o1 zthen; c* x" J0 C5 Z9 {
blockier_merker := false;8 r/ Q+ x& V+ p' U
end;! g# T0 m: Y7 v
end;
) Z/ R/ R- h* g: U* h大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |