is' D& V0 G6 O/ g: w! V
local links,rechts : integer;& i" K) c' k, z- m1 i3 ?
do" S: l4 U4 p/ C6 F
if @.standort.nf(1).nf(1).voll" u U' m: V" `9 p: c
and @.standort.nf(2).nf(1).voll
9 K1 `- I: t7 A7 Z! E* P" H and @.standort.nf(3).nf(1).voll. V& W% c% ?+ Q& V H
then
# ~, H: h' l$ F1 v ?4 B+ h blockier_merker := TRUE;
, J& C) ?( G) M9 q& M5 M3 ~ else1 p) B1 z+ n% B4 u+ Z9 Z8 A+ ? j
if @.standort.nf(1).nf(1).leer, @( w, F5 G1 U; v6 M4 t! Y: w
then
6 S& F: [4 y3 j" }7 T8 ?% S @.ziel := "ap4_C";
6 [. p* A \& [8 |- f# ]0 J @.umlagern(@.standort.nf(1));7 O# ^( W# T8 Z3 T' d& h2 F1 J) [
else
2 I9 R+ \/ v4 Y4 P$ B links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs 0 y; {: |& N& e/ i
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs $ z5 v$ ]7 l" F* j0 ~3 ~, r) b
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
0 v1 B/ v: u- K4 _5 K/ P rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs $ A" \. P F9 E7 E, a! {) |
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
% A: F3 n6 ~9 f5 a6 f6 x + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
2 [8 n" K% L, b, X if links > rechts 3 m5 P+ d( E5 k5 |$ y, K1 l
then5 `0 f) k0 y8 x# |0 f
if @.standort.nf(3).nf(1).leer, ]( X* b" D3 w7 f7 F' n* |
then0 Q# n5 ]/ i2 x3 y" J- f
@.umlagern(@.standort.nf(3));
2 @4 L3 U5 c9 I% g; W else
) y" W& t& ~- r8 w5 T$ U" `! j if @.standort.nf(2).nf(1).leer, N0 W+ M! e) w
then
w& `; I5 s2 Q7 }* h. { @.umlagern(@.standort.nf(2));2 v4 I6 |* q w' P: o
else
5 b- {0 d& ?, F( E8 x' _( K+ p4 `# A0 F @.umlagern(@.standort.nf(1));
& V( v3 v) H' i9 [2 s end;1 G2 O7 p+ F5 W
end;+ S# T: r& ~0 B+ n! C8 k
else
* f2 |6 R. q5 K& N$ S% R3 I! V if @.standort.nf(2).nf(1).leer' C d, D4 J. i+ o/ Q( f* z
then( S0 V" ?# L4 s+ e( f! C
@.umlagern(@.standort.nf(2)); 1 z' Q& y! X+ a, k' p: o
else" u. [. h2 ? `- @& ]8 _' F
if @.standort.nf(3).nf(1).leer7 t# D5 l1 M, d' _( J" m
then
- |) j" }( ?+ x" H! P% T* O6 g @.umlagern(@.standort.nf(3));( t+ M$ J0 a# e1 @, h5 y# {) w, |3 n
else9 P \% k7 M4 ^( {1 L4 N
@.umlagern(@.standort.nf(1));% I* r, M1 W) {1 h4 U! \
end;( }" l* W: @) u% c
end;
* y( \4 k2 A* z5 F7 Z end;
" d9 g' ]- J3 X/ Y3 V4 B end;
* d. H& ^, I- @! p. _ end;
, Q! o# E0 k7 a( ^1 w) Iif ?.leer
7 _4 O! d# l, g, C) h& Rthen
+ [( w) ^7 L( V( O blockier_merker := false;
5 `7 W7 Q2 q0 I) Z7 L) @end;
3 Z- C+ S4 ~" c4 q+ M3 aend;
1 g6 @: d) g8 X大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |