is
5 o& R& d. e% Q6 Ulocal links,rechts : integer;
8 Z# V2 u1 k* qdo6 m2 H; x! P5 A
if @.standort.nf(1).nf(1).voll; v9 s0 W7 U( a0 e/ i
and @.standort.nf(2).nf(1).voll
- E" V) ^2 v5 Y! ] and @.standort.nf(3).nf(1).voll
5 Y- H# P0 R; ` then8 v3 x9 M) }6 v' i) M
blockier_merker := TRUE;
3 p$ m: u) d+ Z! r0 { else3 s' M, d) J2 A0 Q# f
if @.standort.nf(1).nf(1).leer, U3 C- n1 q: k, | c
then2 k1 }4 o/ z# L3 W( E* d
@.ziel := "ap4_C";
5 b: X4 d- V$ ^5 R9 A% X @.umlagern(@.standort.nf(1));
% I3 y J: |- S/ l) i1 }) [ else
% r! h7 ?$ v9 b links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
5 m# J! H8 r% w v# P + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
2 v6 q: ^$ X1 X + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
$ Q, g V9 Y' K7 b rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs ) [6 p( b/ B+ u* Z" ?' g
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
/ Y+ g d! S) S b + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs; `4 a# u& ^1 z2 ]
if links > rechts
/ }3 q" B) |# a1 H5 { then, c, ~* a8 ]; @4 P, o
if @.standort.nf(3).nf(1).leer
3 s% R) A" ]8 c5 c1 k U then
; Y. R6 ]& y8 a @.umlagern(@.standort.nf(3));
" ? u. R7 w; ]/ y( ^ else- C# H9 y7 R- M. d
if @.standort.nf(2).nf(1).leer
( U* k- e4 W" r7 r then4 P. P7 P \" R( _' E
@.umlagern(@.standort.nf(2));
9 v2 ^9 ~5 j% x# j% F4 h, d else
* p8 j! S' ~- z @.umlagern(@.standort.nf(1));
+ p3 [2 G- }) U% ~- A end;5 B- C/ N* f. t( ?/ @; T' q
end;
1 V* y& ?0 r' d7 G5 p else - Q* M) ~% C. G4 k( V
if @.standort.nf(2).nf(1).leer
* b& K' u$ J: S. e2 X( D then& \$ V( w4 w7 l* S+ i
@.umlagern(@.standort.nf(2)); & x. A2 Q6 U' `* C4 X
else6 {; g$ x1 F" y3 E0 Q) _
if @.standort.nf(3).nf(1).leer
+ a! k6 n; {! r7 C$ ~2 h+ O then
9 j- I- y! V0 a; r+ e' D @.umlagern(@.standort.nf(3));* L9 `- Y L& u! i* i! z
else
6 i9 z( D0 \# U @.umlagern(@.standort.nf(1));
6 c6 H2 p' b) L- P1 I+ @9 h end;
( K, A! [/ M/ ?- z, h5 k' [ end;
# N, a( e; g2 q8 @& q8 K2 g end;
/ ?. x; s' `1 P$ K, O: O end;
% K# H$ s5 k0 d% ?4 O, u" h end;
3 T$ b4 o/ K9 y% I. h: zif ?.leer
$ \* c! r% l& U8 z/ Vthen" K+ e/ {9 l _. H# v% k, O
blockier_merker := false;1 L* m# y; c2 e7 E
end;
, t. z' H0 ^. }' R. K: `: i8 aend;
|3 R @' Y. k- |4 @* _; v- U% F大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |