is
! x3 Q# u7 B* Plocal links,rechts : integer;8 i$ Q. O) G) G- l
do8 t9 W# Q0 g2 I% _# ?8 x1 J- c
if @.standort.nf(1).nf(1).voll) k2 i9 r, ~0 X# i/ H5 ~8 E8 y2 V
and @.standort.nf(2).nf(1).voll* F1 e% |( c$ `% n
and @.standort.nf(3).nf(1).voll. c0 U2 u+ m5 z
then$ G L/ c) v7 c1 V, h0 Y5 m3 ?! t
blockier_merker := TRUE;. u) r- u/ \/ F9 w; R- v+ ?
else' o1 u1 D7 T* r6 B
if @.standort.nf(1).nf(1).leer) Z9 B. m# i5 ^( v6 G( b) [$ h) A
then
* W9 @, t9 ]: p9 E+ O @.ziel := "ap4_C";8 d3 v! @6 R0 B
@.umlagern(@.standort.nf(1));
- V7 C1 m; k, ^% v else
- u8 p* C: }0 G links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
4 I% m; N0 b7 y" Z! z + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs - B8 S' Z3 h. P7 j7 M9 k& a
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;" n" N7 O5 \0 W M/ X
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
, m( t3 y* G" m' Q: q + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs 4 M7 @$ U# U( t2 N- J# D
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;9 b# k2 b4 F7 m3 K% z. I
if links > rechts $ b( `. I7 k7 O
then
( a; ^2 }/ p$ p# D% L* q0 s3 y& { if @.standort.nf(3).nf(1).leer
9 `- U1 m: Z# |& i, a! v% @ then
' x+ T; n/ R6 v+ Z0 V @.umlagern(@.standort.nf(3));
; L' r2 ?) V3 p% ^. T# r# e9 ] else9 j/ C5 a) o- T. q2 r! y' l
if @.standort.nf(2).nf(1).leer8 y6 T _; T9 N" I- q& L; Q
then+ \* W3 |# @3 K# _0 |
@.umlagern(@.standort.nf(2));
& R! g% y/ U0 ^" v* C else# ~% O6 q, S' R+ r1 r
@.umlagern(@.standort.nf(1));
' q9 s5 a/ e4 E1 m1 H' S end;! U2 @! h" R+ J
end;$ n. U) L- {, E3 F8 B
else ' t* ~% w7 ~. C( k
if @.standort.nf(2).nf(1).leer
/ |6 W4 h0 x; M8 M then8 ^5 o0 r" I; Y8 ]# M* T
@.umlagern(@.standort.nf(2));
F5 ?* C# G: b* p: k# W2 u else- J+ a6 ?' l% M) U, U
if @.standort.nf(3).nf(1).leer/ F6 I- t0 x/ Z- A
then5 B* f, I% e. ?3 o! E
@.umlagern(@.standort.nf(3));
2 Z9 ^2 C3 N. R- X$ A8 e5 g" t else
2 F/ h: P6 U2 a: N6 L; e @.umlagern(@.standort.nf(1));
7 }/ |+ R: U: C [ _! g) J end;
0 q6 ?0 t# ^( T7 D7 R% T6 J end;
3 ]: L6 U- k# ~5 K6 I5 N end;
M5 ~! `8 F1 J+ ?# @ end;
' Z8 s+ C/ P" `, X* Z J end;
1 h6 t# c# _6 Fif ?.leer- D) g {! C2 y8 D p* l- S
then
2 v8 f) p0 T( @0 f& q blockier_merker := false;
: ]% d+ \0 y4 y2 Q/ Wend;; J9 v; ~+ V/ n3 W- n
end;
4 d/ w9 O; A) y9 S" a大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |