is
. p4 s, Z p( Y- \' wlocal links,rechts : integer;2 s' v4 I* C7 I' V" g, k7 C- p
do" `* c6 F: @7 z$ b5 p
if @.standort.nf(1).nf(1).voll
, e3 ]& u1 ?" _6 z3 ` and @.standort.nf(2).nf(1).voll
1 K+ t9 r( P/ i2 } and @.standort.nf(3).nf(1).voll
$ p' [4 @" p+ U% b( H' [ then* v! q% ?* k( [6 C( W
blockier_merker := TRUE;
# C) r* a, u+ f& n0 ? else
5 U) Y+ \) L5 C% g0 C2 k if @.standort.nf(1).nf(1).leer4 k/ i: `( A0 a& V R& ~ c
then+ a8 @. a3 \2 x5 t# m' D& a8 H
@.ziel := "ap4_C";
v% F1 j2 Z& c" m. O @.umlagern(@.standort.nf(1));
. Z! h+ V* D2 G- y4 ^ else. G& v) ~$ |+ y, P' h
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
* j3 Z$ g5 T1 m$ l* i, }0 \: A + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
1 i7 D* l$ N5 Y0 ?* b6 U + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
) N9 L- K# X4 e* x! A rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs * [( t- X+ A8 a6 l3 p, X
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
* _ _& h$ i, M1 u( D+ e$ ` + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;* E( l1 H- G2 A: i ]; T' `
if links > rechts
0 M3 ?1 H. Y2 H4 r( K% p! y then
$ u5 W! \: O3 T; B7 A! n if @.standort.nf(3).nf(1).leer
7 p, z; ]/ j3 E7 o; ^! Z1 A( f( O then- x" |% g& h! g5 ~+ h/ w- \
@.umlagern(@.standort.nf(3)); # u5 A* d. G! ]. H
else
5 J2 i. Q5 R0 F- u) J# h* t/ Z if @.standort.nf(2).nf(1).leer& `; x2 G, W4 [# j
then
+ }* Q0 c" |; ^' e: v6 b; F" d5 E @.umlagern(@.standort.nf(2));8 v* m+ g! l0 C
else
4 G# y/ w( @) N% U @.umlagern(@.standort.nf(1));
3 w# |( G' R, L end;
3 c% V; r3 u) H, Q end;) u( K( A }( L+ W7 k( L. d8 r
else T/ e( E4 F X& e, R
if @.standort.nf(2).nf(1).leer* _: H0 `8 ~; i9 ?3 X
then
( z& P5 @+ A, o/ A" z: P V @.umlagern(@.standort.nf(2));
* B* e$ }8 Y6 V6 m* D: a else3 G+ x; S$ J5 P' w9 X
if @.standort.nf(3).nf(1).leer1 }! O& V) e% ?, |3 f; t7 T
then
1 A$ ?5 A1 F; K `' G& J/ x, R @.umlagern(@.standort.nf(3));
) g9 ]( n: a1 q- T2 ~ else
7 j( u I# C7 h% ?7 Y- v @.umlagern(@.standort.nf(1));
" ^0 Y8 o$ M3 M- ^6 T! m( S end;
- V) d: ?+ V% U" Y end;
' U- N% ?0 b( o+ {2 h" l% w4 g end;
5 O2 h9 S% l5 P2 \3 | end;( r+ y3 M9 |0 N7 }: U
end;: t! _' A8 D* K8 }) V
if ?.leer6 q5 D$ }0 s$ h* ^* R
then
% b( D; i5 ^+ O! ]/ W6 B3 t blockier_merker := false;
! @" l1 I: }/ Z' h9 d, |1 _end;
( [4 i/ O+ K" e* t9 `/ \6 W7 [end;
# ^, K3 {6 W' N9 P* W, R大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |