is
- I/ i+ U6 y) M2 J7 b" hlocal links,rechts : integer;
2 H m7 d1 ^$ t4 U( A. {do7 i; r0 Q; F, H, Z
if @.standort.nf(1).nf(1).voll% T$ L( E4 O: O- q7 o! I
and @.standort.nf(2).nf(1).voll
! H, t( h% l% x4 P" d, e and @.standort.nf(3).nf(1).voll
) I7 }, q @* [8 d then0 t# d. {- y/ \% }6 m' P: B2 k1 I
blockier_merker := TRUE;& R/ @1 w! \" [/ C" s: l: u0 X$ m7 ^
else- J/ ?6 p+ i7 Q+ K
if @.standort.nf(1).nf(1).leer, a q$ K# b, y+ i# K( W) `% d R
then
$ Q3 \1 Z+ e) C @.ziel := "ap4_C";
; ]5 L8 J# P* C, b2 T @.umlagern(@.standort.nf(1));; y I( a: _% E4 h8 u# v9 F
else0 M( w1 R8 j! {
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs 9 V- }# i$ j7 `8 F$ @% u
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs - o2 `) o* v( a* l& w& A
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
, B( Q! Z# Y( X8 y& C; a1 V* T rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
: Q& J! R; B }: B) b8 F + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs 9 n; }* J. D. {/ s2 }$ _
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;4 H' `" I! |/ h. C% K$ ]9 b" C
if links > rechts
% f U, A+ w/ _) r! R' j+ R then' {, u- ~7 c; z
if @.standort.nf(3).nf(1).leer
m$ \& y$ T% }1 L' v2 ~1 a then& w/ r. p9 J8 V
@.umlagern(@.standort.nf(3));
* B o" I( \, k" r$ X else
8 \! o. o" k- b4 s7 W$ w if @.standort.nf(2).nf(1).leer( _0 }2 K7 y% N; K/ u" D
then
" P F f4 t, s2 c @.umlagern(@.standort.nf(2));/ ?# {# C# X) U- E# K+ ` _: g9 c
else
8 a! p( a5 @, w+ t @.umlagern(@.standort.nf(1));
, ~/ _/ g! C2 H. {- o1 v1 H end;
! t( N6 S h! K6 I; V% X end;
9 w- l' f9 H0 F, I6 H else
) k7 d$ Z4 z4 w8 w- J# S8 a if @.standort.nf(2).nf(1).leer* S! L2 n* J7 r( \ ?0 Y' W0 p
then
' [+ u, l! c7 `. B8 R- L0 N @.umlagern(@.standort.nf(2));
+ Q5 |' h! q9 X% t# K* } i1 m0 W: v6 z else
* i$ C' W+ a9 X+ |; b+ S' w: Q if @.standort.nf(3).nf(1).leer
3 H& j' L' f% K9 P then
* `% w5 p7 n- k @.umlagern(@.standort.nf(3));
/ C! k* g, T' {( [' | else) }* X4 e% W4 o2 \5 v) {
@.umlagern(@.standort.nf(1));' O( ~* Q8 o9 e
end;
7 ~" B1 N( d# n end;7 a+ Z' w5 u# W) B
end;
+ f: t- a! ]# Z8 @7 Q+ b2 R3 M end;
+ H" o! A R& u6 V end;' Q' D0 f. O3 u; z. ]0 P
if ?.leer5 d% M1 }. [, f, o& P
then$ h$ t1 h( d+ ]. U/ R% L# z
blockier_merker := false;2 [) I; s! C, N9 Z6 X2 S+ W( z
end;2 U+ M7 O4 G$ v8 v1 D* j; N! H
end;
* P) ~& F$ z+ K: B" B1 s大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |