is/ l/ p6 w7 Z- f0 J& X2 {
local links,rechts : integer;
( M$ {3 ]& x4 J6 L( ?do
# i* R0 z1 W& z8 D2 S if @.standort.nf(1).nf(1).voll d4 k" E# h' a( H$ p- i( U. c
and @.standort.nf(2).nf(1).voll
' u3 L- S& |, ^; n* Z and @.standort.nf(3).nf(1).voll+ J8 }$ T5 f$ Y
then3 K/ p6 H6 K6 P6 L# w- ]( _
blockier_merker := TRUE;8 s: G" ~* [/ L E- X, O
else% V. Z s) }+ a5 U6 e5 E
if @.standort.nf(1).nf(1).leer, d$ \# K% z/ B. g# T# H$ R
then
4 C8 y6 V+ O6 a `; K. P @.ziel := "ap4_C";
( k8 N& A' b8 F2 p z; [7 I @.umlagern(@.standort.nf(1));
4 Q I! h: F% r% s' o' R else
1 v! N# Z. b( D [6 Z) [$ p links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs * F& |, p8 w' s5 f, Q( U; t
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
& ]1 a" J: m9 A1 \3 J$ l# R4 Y* Q + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
$ ^% c- S8 U# l: s- X. m5 s rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
. F' ]5 w" @ x H + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs @# _. h8 T+ c9 N
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;7 H, c9 z$ X7 v) S' a0 ^
if links > rechts
( ?, H9 O: \. Q3 K, N: W, E ?! f then
0 E, u) Y& H( N9 w/ V# a if @.standort.nf(3).nf(1).leer$ T4 t ^+ e4 O! \+ K; h5 |; f( k
then
1 |: i/ c: w. W7 I) x, `9 K( v @.umlagern(@.standort.nf(3));
/ a; {, s9 M$ ` else" V0 ]3 f" q+ A( a
if @.standort.nf(2).nf(1).leer. h" E8 K1 `, z: H) L6 z$ s# ?1 G S
then
' F! D: m4 b' R# Z9 o, D" n& y% J @.umlagern(@.standort.nf(2));6 _& Y7 C$ i: {
else4 H" h* x" b3 ]5 }; R0 J; r2 u
@.umlagern(@.standort.nf(1));. A( a4 R1 g# q, j' z
end;- y1 e6 m9 K7 M7 M" n+ t- J
end;
! r5 i5 g$ l+ { else
* E& a) X0 K7 j8 E1 r& d6 L ~ if @.standort.nf(2).nf(1).leer6 F/ }6 J2 c5 R1 k
then
) @$ A8 v. _$ i d s @.umlagern(@.standort.nf(2));
' G5 V2 b F+ D, x: r4 @ else
3 n2 C8 u' \& x# U* J if @.standort.nf(3).nf(1).leer% d6 H2 E! v8 w: l0 L# D; N' N1 B
then* A. o' b/ n3 p5 c
@.umlagern(@.standort.nf(3));! g$ R$ S3 a, w# h' E9 W
else) w# y& q6 z2 P- M" |" J
@.umlagern(@.standort.nf(1));
" V+ k5 h: I% O; E7 v8 E end;
# B' O% U! K) _+ k end;- A3 W# Q+ q7 H! v1 G+ u0 K
end; . ^# E: ]' s0 T' J% d( X6 a
end;
; C5 Y/ h8 P- b+ I( m end;
) w% s0 a$ p* Qif ?.leer
0 i8 F/ |% e. W+ v1 K$ W0 _then
Z& I* p- j# Z: D7 e; E# m blockier_merker := false;
; f. |: L; ?" X5 }. T5 t7 [# nend;( ]8 ?9 C% y* O2 z5 I
end;7 \% R% \+ B& @# o/ ~. x2 e# [( m
大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |