is
, N7 V' _+ x; Q1 mlocal links,rechts : integer;
8 g# n8 p4 p8 i6 p! Z8 Cdo; N( w! m- w! T6 p
if @.standort.nf(1).nf(1).voll
9 x5 B( ]" K2 D; i [6 w! [ and @.standort.nf(2).nf(1).voll
7 Y y0 @: }! F% ~% m and @.standort.nf(3).nf(1).voll9 J* g* Z9 H. }3 b
then- C- [3 [9 u9 j4 Z( \
blockier_merker := TRUE;% F! k' n! B7 }" A: e6 a9 J
else
% s ~, D% b' T/ M3 C$ G if @.standort.nf(1).nf(1).leer
# W! X4 S2 j# S( N then7 l& e' }; f5 C3 G8 n* A3 N
@.ziel := "ap4_C";
$ Q4 [; Y) B; A2 ?5 { @.umlagern(@.standort.nf(1));! f1 m3 C9 ^6 b( `$ z2 f) S$ P U
else
- p/ s! r7 B1 A( C& A links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
: {9 F' |# ^* o. P; q+ s/ K + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs , |" D* _! w% L# u" ?# c4 K8 \* L
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
7 e$ a& ]% F9 Z% ~ rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs # D# z( f7 _" ?3 C n
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs % z0 i# Z+ i4 C4 g' H0 }9 x, q
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;* @+ v; A# [6 `3 s
if links > rechts
( E; f4 W* U3 a$ r$ t2 o/ z then
" ]6 I5 W! W# E0 R+ @ if @.standort.nf(3).nf(1).leer
: r) O/ l7 O# }! l5 n! @ then, f+ w. a8 i% h* b( b! v2 z. E! O/ R
@.umlagern(@.standort.nf(3));
9 G# E! U/ I, \2 P! S7 W6 i& O# j else: D0 k. `) ^# R4 B3 h6 s
if @.standort.nf(2).nf(1).leer, T' ^ i3 Z3 O
then
) B `, g% t8 \2 U7 K* Z' W @.umlagern(@.standort.nf(2));8 \4 }8 u z& T4 E7 ?$ a" P) ~
else: j4 k" ]8 D* z3 W
@.umlagern(@.standort.nf(1));
# z/ w! L/ Y3 @9 _2 m3 B end;
( V$ M; Q7 G* m1 @# j: G end;" e' d9 V! M( f' U, K; G1 {+ s& v/ _
else
1 U' X' ^* N2 K6 ?+ ?& |, f0 T* m% H if @.standort.nf(2).nf(1).leer% t- B5 l9 d' [7 H/ u
then! x1 I0 H1 w0 r# O3 h# r' g' W
@.umlagern(@.standort.nf(2));
3 h; w9 K6 _, R$ Y$ z else v: P1 f; | z9 _( A3 {1 A9 u' C( J
if @.standort.nf(3).nf(1).leer
# l8 Q" v9 Z0 I" ~: W$ I& K" v* T then. V' y5 F2 {# [! D5 C& Z3 g
@.umlagern(@.standort.nf(3));4 `; l+ Q% e# h8 r k
else- k( s3 }8 l: W2 a* \+ }. ~
@.umlagern(@.standort.nf(1));
3 t$ {# j z0 L4 G- J5 E. F; P end;% i6 D5 n$ d1 O) V/ L, B
end;) W. b; Y1 b7 L( T" y
end;
& L" V7 p+ S8 ] end;
; k; [" |1 _! R0 a" X" E% X end;6 n {" {' v! W- n& [# X; T* d$ }- G
if ?.leer, g0 F- { ?- U/ L
then- J6 P H' Y) N# t7 R0 {
blockier_merker := false;8 E6 d' u5 G) L5 p5 _' m! R; e
end;
8 ~( i. ?5 F* fend;- A4 _% N9 f4 J( {
大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |