is
8 J! {( t9 }0 u( b% i S( y# ylocal links,rechts : integer;1 E( B6 Z4 l5 P
do
0 N( B# [2 f5 W( G) L. ^6 p5 L if @.standort.nf(1).nf(1).voll
3 C! K! h) c- h and @.standort.nf(2).nf(1).voll
s( c3 E+ |6 o: r and @.standort.nf(3).nf(1).voll
9 P! G; _* j( Q9 m4 \ then1 z0 J! t2 [: w: L% k* f: J: ]
blockier_merker := TRUE;* y3 q0 K' i) Z3 p' n% O' X
else8 f' {$ v5 {& M- Y/ z
if @.standort.nf(1).nf(1).leer8 y+ y7 ?( R" e$ N, R1 B3 H
then+ O; a* J6 I5 {2 D8 S2 D: W
@.ziel := "ap4_C";9 v- g. d( U }) U. Z8 @
@.umlagern(@.standort.nf(1));+ |/ E7 i! R* |7 Y4 A
else
( z' H' Z9 d m7 b$ }. b links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
' ]& E) W9 g- A. c2 ?% W8 { + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs * T2 o8 u. m6 m8 F
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;0 `! {( c: d% ~$ G0 D/ t
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs 7 }; ^: _2 o0 y3 i! l5 m
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs - [8 X- Z( v+ z2 Y% f j
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
0 [) q& K3 i0 U; } b C, o if links > rechts 6 X) D; e+ P& ^7 ~/ z
then
5 d* N& q' Q6 n) M( m5 l; ~0 d if @.standort.nf(3).nf(1).leer
+ E+ C s6 P$ }4 J4 n" t! s then
5 |3 b0 }. P, b Q1 g Z( |& b @.umlagern(@.standort.nf(3));
! W# k) s! }/ o: I else
- }6 d% B% [1 M) y w2 _3 L if @.standort.nf(2).nf(1).leer
, R: b$ c+ `, G( `9 M then9 L J. L% e: G
@.umlagern(@.standort.nf(2));8 l$ M: H8 ~- q0 O% H! _9 s0 ]+ p* k
else
/ F; O/ u3 l, c4 ?# M' [ @.umlagern(@.standort.nf(1));
1 e3 h+ h$ z5 ^. O end;* y- y) t& |3 \
end;
$ |. C# o M; }* ] Z% E" f else ! }6 P- H. V/ L8 A! x# @. L
if @.standort.nf(2).nf(1).leer& L3 g, A: u& b
then' L+ p* L+ h( \
@.umlagern(@.standort.nf(2));
+ r4 Q0 m: ^2 l/ W" t2 W( t. i6 m else
/ Z6 ?- k9 P0 G" Q" y( C if @.standort.nf(3).nf(1).leer& v. t( ?" N: W; F D
then
% j0 q: U5 g* c @.umlagern(@.standort.nf(3));
7 `) E5 T0 w2 X, E else9 G! r- D+ C. r+ z& F; W
@.umlagern(@.standort.nf(1));2 o7 S; Q; }% ~: s
end;
. x2 B4 O. }$ u" \# G7 \. p end;0 v7 _# A4 q. v4 }3 D
end; & X) M8 y% S: [2 l0 c
end;7 T8 d7 g6 n$ b/ X5 [; J- _6 C0 _# w- X
end;
" n9 }5 j$ B* `- t# _if ?.leer
# k5 W8 B( X2 d* k7 ]$ {then
( d7 E5 U: |: n blockier_merker := false;
/ ^# W9 T# k: K7 |5 o7 ~/ g2 h# Uend;5 J n& x7 x8 m" {
end;
2 c, b" f, m c4 {& j( G! j% V, e大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |