is t$ Y( O6 G! T# Y6 {/ }( H
local links,rechts : integer;6 G2 S5 t! Q+ ^
do
}- t, ]6 L+ k if @.standort.nf(1).nf(1).voll
9 \- h5 b7 N/ _4 y5 {0 N7 M5 k/ Y and @.standort.nf(2).nf(1).voll
0 p9 w! o* E2 a" H& \+ H and @.standort.nf(3).nf(1).voll
% O ]* j* w% a W. n0 Y8 z0 h% ^# A2 { then
6 P1 n! w4 R9 E# i" e7 d% P& @ blockier_merker := TRUE;
; H) j: W' T6 J9 ^& @ else$ g1 E7 H1 q) F( r9 v
if @.standort.nf(1).nf(1).leer, f; j- {& C# _; B
then; e6 m1 Q" O+ l6 ]# w2 e
@.ziel := "ap4_C";
! e+ d) r5 ]" K9 m: Q- T @.umlagern(@.standort.nf(1));- i) { P: c% P- R, s
else$ c/ F% V. u% u8 F
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs $ f3 d( T5 j. X; K) f; F
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
0 s. C1 Z H4 @/ J9 x5 c* N + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
2 k/ V/ T; U* I3 ^ rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
4 j" s5 q# k* Z* Q, |, U + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
* e" m. Y6 X6 p! M1 l + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;: i2 a- g: P% c, V8 w1 T. e
if links > rechts 0 Q/ j5 |; K/ [) r" K3 b0 G' C
then
0 o% g6 Z5 V& U$ S if @.standort.nf(3).nf(1).leer" |$ F& s$ S @
then* O7 _ h4 L, y k* s9 n
@.umlagern(@.standort.nf(3)); . l$ k1 R; g( g0 \) j
else" P; m, C% f5 d J
if @.standort.nf(2).nf(1).leer
% A* h# b( g( H* h1 [0 y then: [/ s ]% q* P! e5 P, q: k" K
@.umlagern(@.standort.nf(2));
% L; ^, d0 r( i else, |: Z: _" P( h; F8 [
@.umlagern(@.standort.nf(1));, j3 r% d1 e7 S/ y$ R
end;! g8 F7 h3 O% v& q* e$ i/ T
end;
4 m# B* P' ]9 d+ D* Q( f else
& Z! H+ ?$ p O& i) _ if @.standort.nf(2).nf(1).leer
0 `3 e* r; s/ Y% k( B* A then7 ?; i b3 g6 y2 v! u4 i7 W
@.umlagern(@.standort.nf(2));
, p! e3 W% H) \$ c1 s# z4 R else0 r! m2 |6 R/ R3 Y
if @.standort.nf(3).nf(1).leer( m. b9 B8 m! V. z1 q
then
1 J) Z7 v3 u' |5 \ @.umlagern(@.standort.nf(3));' _: `$ ~0 w: e& V. H2 e
else( G- R5 t! w) [6 V1 b/ y
@.umlagern(@.standort.nf(1));
; u, E, u5 L! b& ~; V5 g end;7 n/ t/ w" y/ |6 o$ }+ L) ?
end;/ J q. K, U: \. W6 o5 U
end;
7 R: a& ]+ l( O: D( t8 M end;
1 c, o4 r+ b! q7 ^5 Q0 s$ [- \ end; l$ Q. j& _+ k# X1 J
if ?.leer4 h+ H. ^/ t5 b4 b* {& X) N4 z
then
8 p* P$ ]/ Z: u1 s* i blockier_merker := false;
, X! Q8 Y5 b% ~" xend;5 ~, o" I; { P% g3 J
end;
0 X# q: L4 N4 u" c8 i! m, u4 ~大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |