is! N( y! A) p: w2 c' ]
local links,rechts : integer;; K" U' Z# d/ \& T
do
/ u7 z7 a# N1 f% ]& n if @.standort.nf(1).nf(1).voll
, z7 ]2 J, Z/ Z6 F9 S and @.standort.nf(2).nf(1).voll- f0 U: b" Z8 p$ o# \! G5 G
and @.standort.nf(3).nf(1).voll
, Q- G$ |/ v( k then
- R) F+ M1 k$ d* r( ~) L blockier_merker := TRUE;
$ E9 I6 X" h" |* ?4 X else% x; J+ X! K) H' S+ F' j' J
if @.standort.nf(1).nf(1).leer
! M7 k& p: t7 ]! l then
- v$ x7 t. s; \$ H4 L @.ziel := "ap4_C";
$ |# c ^, y" @5 P @.umlagern(@.standort.nf(1));) y v6 y+ ?7 l& H& n; w# ~" V
else
' X8 e* x& K2 m+ s! V links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs 8 J. \- Z2 C% w" W
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
. f) E* ^% i# h2 \3 T + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
9 D0 C* T( s3 c/ i9 K rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs 9 i- }$ W; X- w8 ?$ ?
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
8 p' C: {& R3 r, Q5 f# \0 c3 T + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;5 b4 F& T2 l8 C1 L
if links > rechts 8 c" I8 I" x7 h3 `8 Z Y' u
then
- O7 N+ n7 z7 y& \ }, ^/ q if @.standort.nf(3).nf(1).leer
# R5 x; ^! @: ?+ k then A4 \* O& t1 y- G( `: U
@.umlagern(@.standort.nf(3));
8 } `# @0 b/ s1 w" N3 u6 @ else
) }% K8 | Y, n% K$ R* q if @.standort.nf(2).nf(1).leer
$ e6 h$ d8 F9 [( S& e then
) P6 a- |# F% o @.umlagern(@.standort.nf(2));
4 d8 r. }% z! f2 o* O6 s* c" l8 J1 b else
2 I, |0 j, u+ q9 W4 \6 } @.umlagern(@.standort.nf(1));
# G7 H N4 Y6 @# e end;
/ T4 Y% k" A( u% j7 I. \! U end;
) G: j. c$ R% }! x else
k( |) `& }) l2 V" `2 C: v if @.standort.nf(2).nf(1).leer3 S# ^' T7 t+ G1 t, g1 X) z& T7 ^
then
' y# L4 V- ^7 k9 \ k1 s @.umlagern(@.standort.nf(2)); ; b( R% Y# W- i) r' F
else
, n' }+ y5 X7 h; p5 @8 e0 p- d if @.standort.nf(3).nf(1).leer; n9 e J* `& H3 S
then
- `, J& {% @2 N2 q @.umlagern(@.standort.nf(3));3 V8 j' W; `/ j& _4 W
else, _6 u7 H/ [( l
@.umlagern(@.standort.nf(1));4 D+ }% E: F( A; @1 S
end;
# M4 i" W% p3 J( } end;. ]# I6 l- m- e9 s
end; - C4 l) l% L8 `5 x D! s
end;
/ d* i0 N |, }5 X) N& i end; K& P% e# i. X# I
if ?.leer: l) C* f! E; s. J
then/ {1 ~6 z2 a3 k( n
blockier_merker := false;( m% s3 o4 z+ k6 Q) `! Z( ^, Y
end;
R) g# d9 `# O, Hend;
2 @0 v- M) }1 I7 s' w1 W4 ~大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |