is( ]* f2 F6 G& V- a3 W' y
local links,rechts : integer;: k0 H% P; \* i1 [8 @4 H
do- [: U6 c4 y/ z% z3 n
if @.standort.nf(1).nf(1).voll
; {( b% W3 g8 c' n' e and @.standort.nf(2).nf(1).voll0 X; O4 [9 d5 y; o X: @
and @.standort.nf(3).nf(1).voll* v, j: E u, j
then/ e( R8 a; d8 c7 V: e& B* V
blockier_merker := TRUE;# n! H, b6 L$ x9 ?# s
else+ x0 W! W- w0 G
if @.standort.nf(1).nf(1).leer
6 [; X8 ~6 [. F5 W) ^2 _7 e then
' y. h# D! E, W; ]& }& A @.ziel := "ap4_C";
; c+ X/ R( E+ @+ r @.umlagern(@.standort.nf(1));
' n1 ~6 M6 ~7 }- M else/ G- X5 U$ Q9 O ~& M7 g
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
G9 s% v2 H) r4 q6 S: g4 B + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
# s2 [$ {5 U, e + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
& d; |# B/ R/ G! t) W6 [1 \: J rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
( M7 \' s- Z/ R- E5 N) [+ e + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
. W- W) n; i3 E% p + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;! ~" A! ~8 y) ^6 e, f6 _
if links > rechts
1 V. B- q( A- k$ b then6 o+ _' f9 s1 q. [
if @.standort.nf(3).nf(1).leer
' ]% T% T$ d8 e' R* `0 i- \ then) T- u7 N5 }& T8 s6 _
@.umlagern(@.standort.nf(3));
" \& M c) D6 b+ \7 E, J: Z& | else
* v$ y) D9 i k' z* ~+ d4 z if @.standort.nf(2).nf(1).leer
7 a( M5 W) y7 j. }% Y, [ then4 Q" p9 e2 E+ e. Z
@.umlagern(@.standort.nf(2));- M3 s/ X; H9 E
else5 Q$ p$ R9 [* q9 t. I- D4 ?
@.umlagern(@.standort.nf(1));* P0 Z M h; h. ?; X
end;
& ~' B$ e- F8 | end;0 D9 {5 C' b2 T
else 7 W8 U+ D- X7 E+ S8 z: G! |" ]+ k3 L
if @.standort.nf(2).nf(1).leer
+ h6 [7 r! L6 S7 v k; P% ^0 H' w then; d6 j/ Y* }3 i2 q0 \
@.umlagern(@.standort.nf(2));
) B: F( d3 L' o& @ z+ e else
4 j$ A) M( e+ q& Z: E4 C if @.standort.nf(3).nf(1).leer7 U4 s; A! i- c$ ^0 v9 V$ V
then
( W: `! }9 Q! N; |( _7 v @.umlagern(@.standort.nf(3));
0 k o) q" L: Q( K* @: e else% ], z' x( x7 G4 `# h4 v6 t$ R9 r
@.umlagern(@.standort.nf(1));
) u0 a4 ~& M1 |2 x5 q1 R# R6 F end;
- X3 F; S" B) ?! c8 X" Q u end;
4 |3 r3 n) n$ ^" U+ p end; ; F& s; ~& s6 ?; A
end;
: y+ i0 T( v, B7 y' O( ` end;
: x& C* W! R5 V; f3 f' L. ]if ?.leer
- p2 z+ @0 d7 ?& K; w0 f% Lthen
1 }3 x1 d% @, }# | x- i7 | blockier_merker := false;
. b; v! C5 F. r* yend;- |, G7 d3 t! Q5 j; d. m
end;
% c% F+ {8 j# T, F* i大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |