is
9 A; r( v' m* m& m4 Hlocal links,rechts : integer;0 z5 [" E' J! [. _, s8 |# e% `
do
* ?! P( r% e( k+ }/ l( \$ j9 k if @.standort.nf(1).nf(1).voll+ W: S% p1 Z% I& P8 O6 Y
and @.standort.nf(2).nf(1).voll6 p2 F( W4 G+ {+ w
and @.standort.nf(3).nf(1).voll
2 T; R- g4 e/ q, I then
7 ?+ O8 n/ A2 i5 { blockier_merker := TRUE;, O& g( k. o3 u' |. [* [* r
else V* d/ d- p8 S: U, j( B
if @.standort.nf(1).nf(1).leer/ [4 `/ J0 S8 a" S
then# G2 f1 ~" \) ^' t9 A; W3 L: r
@.ziel := "ap4_C";8 a! @/ _9 P+ J. ?$ G
@.umlagern(@.standort.nf(1));
2 c: q- e F' p3 B7 L* b else6 _2 V4 S9 \$ P; d# f" x& S% P1 J
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
H% n" k! ]% R9 r + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs & Q6 ` g* c3 g$ U4 F1 y
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;* h" _7 p1 q0 T, A4 S
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs - a* }" e s7 ?% v2 y7 z
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
+ T; q# \" [0 U. L" T7 \& W) { + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;/ Z4 e# D, U ]) c) q9 E* ~% N
if links > rechts ; \* o- i5 k# B( [0 p
then9 n/ K2 `+ @" G. j1 G+ C
if @.standort.nf(3).nf(1).leer
5 g6 a% S: k" E5 B+ m* q+ W1 S: Y then
8 T$ @: y$ Q& n# P/ n6 @8 c, Q @.umlagern(@.standort.nf(3)); 0 P: i1 ^: b* d8 X; ?; W
else9 x6 g8 J7 W' o g% ^6 y! I
if @.standort.nf(2).nf(1).leer; |' p" @+ d9 |
then2 ?0 _9 w3 E y
@.umlagern(@.standort.nf(2));
5 U* T( x6 {- p( ?* u5 G# J) V( w# q else
: A, f# p, [- v2 A- `4 y9 l @.umlagern(@.standort.nf(1));
3 H. J p6 h$ @: z; i end;. o+ J' q5 ?6 Z* S% i& M/ }
end;
) g+ I U- B" X4 |( O# K else
/ A; G* s: v3 [) D if @.standort.nf(2).nf(1).leer
" d7 K) s9 l" X then
: o! ~% c% J! J7 |8 n9 B5 t) d3 n9 m @.umlagern(@.standort.nf(2));
( g6 Z4 q3 }0 N$ E else
+ b! ^0 n. d' j! H5 w) R if @.standort.nf(3).nf(1).leer5 O! T6 |4 ^' ?! @/ @/ h+ M
then
: ?# {9 c3 ]& e" n( h @.umlagern(@.standort.nf(3));
- r6 f" g2 G* ^7 C( C _. T else
+ V' _/ c1 b% \# ~: @* k) L @.umlagern(@.standort.nf(1));
, r" C6 E6 c; p4 v( G end;
* f/ `/ G* W% @- v5 r# F3 D end;
" ]8 [6 Y: v3 l8 J end; 2 e+ v/ Q2 |7 ?
end;! q& X" p4 ]% b
end;
& q, q6 p# A: P, @0 t" Aif ?.leer
; q- Z1 j+ ]) K' B5 n5 {then
1 M! q+ ?1 {- C2 R0 b, p0 P2 R blockier_merker := false;/ J3 ^. B4 w2 H: C% [
end; |$ \; m- [, K8 F4 C# ^$ k$ t
end;
2 @, R- v- l; G# I" D b大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |