is7 N9 {# ]2 Y8 |7 f( I, o2 [
local links,rechts : integer;
, Q2 J9 V! A% M/ ]! K# i1 pdo F, H3 }' c( P! r/ k) M6 d
if @.standort.nf(1).nf(1).voll
w q* f( H* B; ^! k5 S- w" c5 H4 M and @.standort.nf(2).nf(1).voll. \+ M0 G9 B) b
and @.standort.nf(3).nf(1).voll
, N( ?, B1 j# e% T8 t then: B8 Q ]3 k. @2 h% W
blockier_merker := TRUE;
' q2 }2 A0 V+ h1 I$ N8 B5 U else! ?# g" ]4 q1 D; U* \
if @.standort.nf(1).nf(1).leer
( k; S, Q! g: Q* r/ r then9 s% q L9 Z" A9 d
@.ziel := "ap4_C";
* T; `8 z( e/ Y; z( y @.umlagern(@.standort.nf(1));( o% _4 @3 c2 Y' ~
else9 L+ V- S9 L6 g8 q4 W- B/ a4 G( v
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
. |: R0 G8 ^4 r H) U) u + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
3 j1 z% J- T. y- s + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;- U- j& U f/ Z! v* K( y
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
# T' F. N+ P C7 x + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
0 [/ M! \* s/ \. U6 f$ }- l7 h + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;5 E& q5 x; x, p1 E1 `8 B
if links > rechts . Q* k# y1 G: z% W3 q
then
. w3 {1 l+ O q5 z0 b if @.standort.nf(3).nf(1).leer
9 ?( ]7 x, y, B$ k' M- o4 I0 Y2 r0 f then3 X3 t) T) a9 B5 Y) n3 w4 F9 t, A3 Y
@.umlagern(@.standort.nf(3)); 6 q N5 s' x) v( z. z$ U9 s+ C/ W
else; s! y B, e. s! G
if @.standort.nf(2).nf(1).leer
$ E+ M- y! r. U' P$ E3 f then
! o* d1 @3 p2 a, Y# a4 }$ J( }2 w @.umlagern(@.standort.nf(2));0 o8 G* F" a' `1 X w
else
! w; I0 E+ `: G. X9 P2 ~ @.umlagern(@.standort.nf(1));; u8 R& S& @3 l% `. i
end;3 S# H! J7 P, o# M- r8 b8 T
end;: K$ u7 M. t. u9 Z4 L+ g; @* o& Z/ G
else
) ]! B- P2 v8 Z4 G4 ^/ H( J% K if @.standort.nf(2).nf(1).leer: Z1 V; S5 M% g1 [# D* z
then
! ~% X7 B, H( b3 d; u/ N/ s @.umlagern(@.standort.nf(2));
1 T' U' Q+ z# \. v! a* d else. K" n9 _+ U1 w3 Z
if @.standort.nf(3).nf(1).leer0 v! U& q) v l( W5 O8 I
then# v$ _7 v/ k& k6 T% m" o- U+ s$ B1 M% P
@.umlagern(@.standort.nf(3));
5 ^8 f) |5 e! N5 j else
- u, \1 j* c7 K2 H# @9 O @.umlagern(@.standort.nf(1));; ?) N% f" L& x6 _& P
end;4 L+ j! f: v0 v* m
end;5 ?3 |+ `" \* W6 Z* a
end; % V7 V& R$ x) L; w
end;
. i: h0 Y( @" m$ w5 i7 D end;
$ B% F9 A1 q! q8 v$ y' }0 }! sif ?.leer
- o' z0 Y, ^* ~1 |' u4 g+ pthen0 Y' m4 e" w/ x8 H1 L
blockier_merker := false;, ~8 \$ L$ l" F& n2 {
end;
7 R' U, Z( }. D. ~+ W; A! f# {end;
( L+ B |" M$ n( ~1 j9 v大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |