is- B0 g. V$ Q# c5 l7 U
local links,rechts : integer;+ ^/ H3 r9 J5 k5 `
do
& A9 ~! Z0 [$ ~( R8 H8 r- q if @.standort.nf(1).nf(1).voll f6 u. e3 e4 z: Q# {, ^! O
and @.standort.nf(2).nf(1).voll# z) f+ O5 U. Y$ s l2 _0 a+ {) h
and @.standort.nf(3).nf(1).voll) N* R2 n4 `7 o6 V/ d: W7 @( e' _
then' r& [& L4 T$ t
blockier_merker := TRUE;6 x5 m! O& J# ~, [8 N
else
! [3 u- N" x5 V: R& y, ^5 j4 \# L+ R! N if @.standort.nf(1).nf(1).leer
* `5 r u- R3 \/ w- _9 E9 h. ]$ w then/ M$ @/ c( B- |4 f! u3 J
@.ziel := "ap4_C";
5 ^. }) e! h+ W- T @.umlagern(@.standort.nf(1));! t: |: c& N& q* U+ O& C
else" Z8 e, s4 u. y( [6 v5 l3 x
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
: s8 r3 \, S: ` + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs & ^9 [3 ]' J: t
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
* K V0 Z$ h! q7 X/ a! @ rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
A# P8 G% G" f \) K, Y9 G + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs 1 z/ s6 @0 K. V1 v
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;- E' @ g4 b8 F9 h0 U2 D- C( B
if links > rechts
" ^ j5 \- Y4 k6 s. F2 C; l4 ] then
# r+ h5 ?5 e) {+ Y% ] if @.standort.nf(3).nf(1).leer+ e( p) K3 `2 m" d( T4 W2 y
then# ?! }. p. r% g4 F
@.umlagern(@.standort.nf(3));
- M; S! O4 i9 s8 F; d i4 D else
7 T. s# {1 J7 h" o8 w if @.standort.nf(2).nf(1).leer
0 U0 L' x; d- Y, m/ o then
_) D+ {! \8 z1 J" x: x$ v @.umlagern(@.standort.nf(2)); b, D L' L$ s3 z
else" V) ~6 S- O$ P# ~$ F$ j0 p1 Z5 a# C
@.umlagern(@.standort.nf(1));
7 @ }* I" L B) k) o. ~' C) u end;3 t4 z; c V+ w
end;3 S3 ]. E" I/ h
else ) y" O1 ~% i' W# y) Z
if @.standort.nf(2).nf(1).leer7 _( C9 ?: D8 `1 n) x
then
2 ^' I+ i; Y' A; Y- C1 D. @ @.umlagern(@.standort.nf(2)); & F) d# \: }1 d; b2 Y" d3 s
else
8 s) _& W `; \2 H0 N @2 I# C if @.standort.nf(3).nf(1).leer
\5 N+ g! b9 ?" k& z: Q7 u0 n then k$ }# o% G# M
@.umlagern(@.standort.nf(3));3 {6 [. B% Y9 T, L/ q
else
4 k% l1 W$ A+ c6 `' X- s @.umlagern(@.standort.nf(1));* W! e# G* B- \4 W3 m! f0 d
end;( L p8 u5 r$ p6 @$ S
end;
- a+ E R* i% L- a end;
# H7 v' L: O7 V2 D0 I# Y; ]: E2 h end;7 G+ `5 l9 f: M9 c6 y' T, L
end;' x/ A6 X' U9 l0 A: Z
if ?.leer6 X" X) Z; w6 N% ^5 B; d. U" C
then
$ j7 v' z* X1 [* q blockier_merker := false;
6 Z' v! S8 ?% I( e2 h& S8 C) x3 wend;
, K7 k# L5 ?( ^2 y: U1 ^" z: lend;
Q. @5 s/ S, k大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |