is! ]1 P0 \5 i' ^9 F! q6 A$ }; N
local links,rechts : integer;. |7 O: P. q7 o( F7 x
do& u% z% t, b- @( Z9 h$ M! T6 K* }% S
if @.standort.nf(1).nf(1).voll r& f* M8 |9 H
and @.standort.nf(2).nf(1).voll
9 R8 ]1 b$ R7 I0 |8 d: d and @.standort.nf(3).nf(1).voll! y+ |/ ~8 ~$ ^0 }" V
then$ |! k) [$ v7 }
blockier_merker := TRUE;* g6 _8 z/ e9 v# M7 ?
else1 ?. w2 W0 m G& _1 Y
if @.standort.nf(1).nf(1).leer6 M' `, E; p* R3 ^2 H
then! V9 D, s: _0 t; n* M
@.ziel := "ap4_C";! t8 Y5 l" C: {6 D
@.umlagern(@.standort.nf(1));
% d7 ~& m$ M6 B! L else+ {3 r7 r9 H" ], p- n
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
7 r: i1 `0 I3 \! P$ ]5 q5 b. \( k + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
8 p( {; A: d$ s: Z9 R + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs; q% S" b: v; v3 q
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs + G7 O: \$ T0 @- W' j
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs 4 j, u) C4 L& c
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
* H% K2 c; G! ?/ ~# o1 A* F3 t! U if links > rechts
. T7 z3 X( K" t0 A; j6 n then9 g9 O2 j w1 H9 {4 }
if @.standort.nf(3).nf(1).leer
, Q; ~/ ~* ?9 q D: l then
* X2 @5 `( w# o, F @.umlagern(@.standort.nf(3)); ( R6 G. X; ~2 d# ? s$ X
else Y3 \) k* }+ {+ V) j( ]8 E
if @.standort.nf(2).nf(1).leer
F" H. r4 M' ~, L* l( o5 I) p then
* h2 B9 R* a& V4 \/ [ d( h0 c @.umlagern(@.standort.nf(2));% |3 Q4 ?3 s$ n% g
else3 Y% \" q! G. l4 }/ Z8 s! G
@.umlagern(@.standort.nf(1));
2 v2 J1 Y/ c! m, H; H$ j: N end;
) q& ^- m( A& \* X; r" w end;
" D1 a+ _( G* S' I8 I: I- W else . B# @8 N( o0 R( t& t8 ?
if @.standort.nf(2).nf(1).leer
3 c3 n8 J6 Z& m, O$ |! f9 U1 x then
% o0 E( o8 k H2 G) [/ v3 }/ O @.umlagern(@.standort.nf(2));
- y: r0 Q0 O, u$ E else
# P5 m$ y6 [& j) z* W( ` if @.standort.nf(3).nf(1).leer
2 k, v6 B* n' M4 ?2 S9 N then
) c/ ~# F% V2 b; `. t& r @.umlagern(@.standort.nf(3));' Q7 M6 \; V+ I5 F
else
/ \6 ~) Q% G* F% H. m @.umlagern(@.standort.nf(1));3 K2 M3 p4 o5 P' N# z- c3 t
end;
1 P0 ?7 }4 K: i* [ end;
* k! Y( j# p: F4 Y& Y end;
0 q3 U8 m* |: n x- q$ N end;
# ]: y( |* M) |0 B. ~/ T8 L" D end;
. F7 ` _. D- K& Bif ?.leer$ s3 _9 \$ F6 Q5 g% ~5 V$ u
then
+ h, [7 o# X, J* h, c blockier_merker := false;
+ O# W0 }! h9 D& J/ i4 Yend;, W4 p3 ~5 |+ e* V- J3 F
end;
2 q9 t! e' w" t0 F; `6 f- s大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |