is! ~8 n( T0 s8 I& g0 }9 [
local links,rechts : integer;
( q8 K, Y) V% `$ H2 n! Udo
% R5 g9 h" U; o# K' a* } if @.standort.nf(1).nf(1).voll
- ~( `! _ e, \/ W- R and @.standort.nf(2).nf(1).voll
6 {3 x! S) G" ]- ?2 c& E and @.standort.nf(3).nf(1).voll: z3 O+ n5 y/ o Y# A" w. Y
then5 q k2 V9 X0 a. n) q! _9 ]* |. I
blockier_merker := TRUE;
2 P& |# L) D$ I else
: x; x1 B3 P. Z: { if @.standort.nf(1).nf(1).leer, w# Z9 v0 b% {
then
r. m2 E+ f9 ]4 ^5 N @.ziel := "ap4_C";
+ [9 U: x% Y. D7 k# N! r! E6 z @.umlagern(@.standort.nf(1));. l. o9 \ b# V: K r8 c, U* p
else$ X9 I9 g5 C# l1 Q8 a
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
* k; r! h4 x! O5 H2 \& R + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
. e5 x& j: i, M6 P1 r + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;7 W4 v0 d- M$ @" n" L a/ e, M8 |
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
1 [/ y4 { o- o5 w- ?3 j( r + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs * Y- v$ w) g# d3 Y1 z9 |% w
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;* `* z% @& F1 O
if links > rechts
, m7 d# v' @ {" l% B4 a" E then
' K9 H# H! Y. e; F if @.standort.nf(3).nf(1).leer
+ {6 a6 G, g* g then+ m5 T1 P$ c1 d* }0 s" A! c8 _) q
@.umlagern(@.standort.nf(3));
. f& c# y s' L( j else
/ U S2 T; Q9 W+ G1 R% n if @.standort.nf(2).nf(1).leer1 d7 T+ Q9 a Y
then- j! u# ?0 x& W
@.umlagern(@.standort.nf(2));
: E2 c0 c% B- \) R7 ~ else
$ {( [$ h) {! |4 A- ^( a2 T; _ @.umlagern(@.standort.nf(1));- P5 P6 K; W: y4 O% f" _) C6 E
end;& K" [2 Z/ K1 v- g% j
end;
2 r3 V' d1 w- N else ! K5 j" Q! o0 ]/ T
if @.standort.nf(2).nf(1).leer
3 ]; j. v+ B3 w/ ~2 V6 h0 y) j then
) l# D0 D+ Q% o @.umlagern(@.standort.nf(2));
2 d8 n5 e& [! c( m/ C; f0 f# x9 x else# o2 n3 e& I! \" Z% ]
if @.standort.nf(3).nf(1).leer
6 E! L6 M9 J- Q+ E& m then
6 ~ C: K5 O4 {8 Z% k# g @.umlagern(@.standort.nf(3));: v' ?' M% k# Y5 w4 d# I m. Q& G3 ]
else
/ h5 L. R6 \# c3 L# l @.umlagern(@.standort.nf(1));" T( o+ `3 F6 }( [- [
end;* z7 m% Y+ a, {: s3 t4 V( D( h$ M
end;: G3 @+ V8 N, I
end;
+ w: d: h. m& }: { end;
6 ]+ J1 [/ l2 ^. T; R end;3 w$ n5 @% X9 Z$ d
if ?.leer8 D& ?2 o$ o8 o
then
3 H2 h4 W! `& Z8 q! M R8 \, Z blockier_merker := false;
Y: E* h+ |2 K3 T, y+ M+ ^end;
; @5 s3 q4 g8 Z+ J# ^. fend;
# o1 f5 e. l' _. Q% Y# q) T大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |