is0 J" L5 y8 F) f' w1 e( D# {
local links,rechts : integer;( q% K- W. c# W
do( K: ?0 P2 _% J0 r' ^7 N
if @.standort.nf(1).nf(1).voll
) q' z# o3 D% H* b9 d; [* B and @.standort.nf(2).nf(1).voll
( W/ M1 |) j' J2 h' j and @.standort.nf(3).nf(1).voll
- Y& e, U6 ?, U; c: U6 J9 F' [* { then
7 z- b. @) k2 R6 I' k- m5 d, ~ blockier_merker := TRUE;: Y e( o, B) ^$ y3 P1 B5 N. d8 e# S; ^
else
8 W a( _% r% A" M9 r+ u if @.standort.nf(1).nf(1).leer2 B- ]0 c: U) F3 N6 z: |6 X) N5 C9 Q
then* n. K0 ~+ p+ a
@.ziel := "ap4_C";
9 M! l) d) P8 Y3 j3 f5 |8 Z @.umlagern(@.standort.nf(1));9 O' t) Y0 `. T5 r
else" j+ e' ]: c. ^) W: w5 H- E N
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
4 Y5 }; f% K. l& f- R6 g! i, I + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
2 v7 a+ N& @' o! y. D + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;% r0 F* }0 `9 T- O4 U
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
7 f) y J! t( {. D" k6 O1 \ + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
, d1 T0 A, R4 }3 ]5 _2 A + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
4 l/ C4 e$ \4 p, f if links > rechts
! R* m/ S5 ~8 R6 }: u! _! Z5 v( T- B+ b then& {7 i" R u. H. P' d# v
if @.standort.nf(3).nf(1).leer2 M# e0 Q; S' J, B3 Q7 z% f2 j
then" f- Y: q B- K9 `. q; d* l3 v# M/ h
@.umlagern(@.standort.nf(3));
& V5 n- \) {8 `8 x8 S else! f& ~9 X" X! z' O& q5 ^
if @.standort.nf(2).nf(1).leer! t! U- `8 y/ [' Q* ^8 X' |
then
0 }* x+ }: H) E; f) e @.umlagern(@.standort.nf(2));; F4 `* v) e4 K
else0 R1 X3 j) c0 \( h* ~4 t) c. C
@.umlagern(@.standort.nf(1));% d9 \- b1 f: p5 Y0 f
end;$ h2 L2 o# ~8 W, F: z* Q; F
end;8 k s& f5 \6 c" z/ }2 z
else
+ Z) s2 l. j' f& g if @.standort.nf(2).nf(1).leer
& e$ L. V+ J( W5 R then
. n7 t6 w. q; ~- j7 f @.umlagern(@.standort.nf(2)); 5 E3 N* ^2 [& w$ D* N
else
" Q$ z/ m+ u9 a7 i5 I7 W' V0 \ if @.standort.nf(3).nf(1).leer
/ P0 X5 {5 y: I% k) D* d4 B then& | ^# ]8 w1 |
@.umlagern(@.standort.nf(3));. O. J* Y) r" `2 m; k/ J8 }. E
else
8 F) K7 N- C* d! M! T1 W @.umlagern(@.standort.nf(1));
4 p3 N, {" Z# R7 T: k( G end;1 v, ]2 j4 e" l# C. ~1 P% d/ |; S! Q
end;
9 k8 L# Z" H! ^1 Q1 t9 S2 Q end; z) Q7 t7 x6 H
end;
$ R; [: h/ Q9 d6 G end;
% ?% O6 D- K3 z9 s6 d8 R, {if ?.leer8 _& H! }+ z5 R, v0 T1 s5 `6 u
then
# R+ T% k/ o9 o. f! V/ q blockier_merker := false;$ ]: x5 |: y1 k) t7 B! \
end;2 w- v# k3 f+ H) O7 `$ f9 }
end;
3 N. ]$ z0 G* {( p7 Y大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |