is
- O& U% v( m | s) E1 B8 plocal links,rechts : integer;( M( C& ?6 G5 t" |
do
: p# B9 L; z ^ if @.standort.nf(1).nf(1).voll& k1 C e' K+ r
and @.standort.nf(2).nf(1).voll
- o7 T% x3 X. H6 s! L and @.standort.nf(3).nf(1).voll
~0 p6 q. P& P then" O/ _# a& M6 g+ j2 B
blockier_merker := TRUE;
, ?; ^, C% b( d; Q, T4 } else
% M( |4 V1 T: H, e if @.standort.nf(1).nf(1).leer5 X/ G n6 W& a6 i( `! M6 f7 }: t
then0 {1 b, N- D2 c* G
@.ziel := "ap4_C";3 L5 K" E# u$ v* K+ j. ?
@.umlagern(@.standort.nf(1));. V2 c" i6 p) n! r
else3 W* V0 P. v+ W% `' E
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
4 \1 r7 c$ J# m3 g6 I4 b + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
" R+ L4 ?5 Y8 m: d! [ + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
( x9 e5 q7 ]. p" g1 c. Y" U0 h rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
9 k6 B# B6 P9 G1 c S; i" p1 G + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
4 W/ ^4 f, d, v, G! n, A! Q o + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
/ P6 I* x2 F" \9 ]# r! Y- W if links > rechts
3 \% f0 I) S" B8 i8 \& G then
) f+ m8 N& p7 @# s2 H5 \ if @.standort.nf(3).nf(1).leer
& A: G' u2 F; P then2 G) c8 P: _, \+ A N
@.umlagern(@.standort.nf(3));
5 b5 x6 V9 l' c else" H" R- @/ y& I, M* G
if @.standort.nf(2).nf(1).leer
|2 g8 j& [( {8 o" m! H( i$ }3 } then: f5 u% k' \ s( l6 J
@.umlagern(@.standort.nf(2));
) a3 G# Z% d4 [# v' c else
$ R1 q% g% Q) `' j3 Y @.umlagern(@.standort.nf(1));
7 f; t' d, w8 t# D end;' ?$ c8 b# x& u n
end;8 P3 d: A" o5 [: [9 z
else
# \/ I* T. d' ~5 L if @.standort.nf(2).nf(1).leer
4 R% Q" P& ]: C: V" l0 t! k- E, n then( Q+ [$ L: M3 T' |
@.umlagern(@.standort.nf(2)); ( [6 Y2 J, s- |8 m$ O
else
0 I% _' A$ o: d0 ~/ `! ^6 n if @.standort.nf(3).nf(1).leer
+ B' ^1 B( _5 G8 T0 P2 o# y6 f9 ? then
! F) X; w. p+ {9 I, k @.umlagern(@.standort.nf(3));/ c& d: S, }, M% p0 ~, d
else. _) u' t a* J5 v+ D/ \
@.umlagern(@.standort.nf(1));
9 G9 \1 P, e) H0 `9 h3 H8 r end;9 g6 W* F6 B$ \# U
end;
( P% u+ z9 r4 J9 j end; % d/ i6 z; f& E/ R9 l% |0 o
end;1 t# p! r- L# n8 D' j! j" L" j
end;# k* V8 g7 C# |3 C7 X! _1 B
if ?.leer
' X8 }+ y* c q, Cthen1 P4 S- ~5 w8 L. P! \; v1 m% P
blockier_merker := false;
" {; h( B: O, E; d+ [: ^% C y8 N. wend;9 Y7 O; S3 J5 u3 @# s
end;
- l# A1 b2 h, `) E4 a& Y% Q* b! [" ]大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |