is1 v$ N; p& ]0 y: P' {
local links,rechts : integer; {6 Z7 I) `1 v1 A; ~
do" [2 M5 G" U9 u0 H R( _7 K
if @.standort.nf(1).nf(1).voll
, @- E1 V6 [7 k! l and @.standort.nf(2).nf(1).voll
9 G8 Q v( l$ X" w8 r+ R, o and @.standort.nf(3).nf(1).voll6 E4 ?; F0 W. r+ R
then
; @1 n" n, W. _7 N! _! r3 Q- X blockier_merker := TRUE;7 h) o9 J. @) o5 t
else
# @- X" @0 J/ J/ P& q if @.standort.nf(1).nf(1).leer
~$ X9 n# ^. u1 _# ^9 U( j& d' B then
: s# E/ t/ j6 D4 J. ~5 Z% W4 v @.ziel := "ap4_C"; Y! s( Y: W z+ ^) ?. c! p& r
@.umlagern(@.standort.nf(1));$ |/ C$ n( J: I1 G
else0 E. V8 }8 i7 h, _% x7 ~
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs . u& f4 S6 b8 K! I! f4 e
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs 3 C- O5 g1 z- }5 U" d
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
/ G9 A+ K1 [& v6 y# q rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
! E; K" M2 V+ g6 Y, S; s, l + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
4 d: G' Y) @ Y4 H2 {4 L& E + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
2 `9 r" N! C. F7 a if links > rechts
0 X/ N8 N2 s& w6 ?4 ` then% O! _' C/ q5 J) n( G9 x
if @.standort.nf(3).nf(1).leer1 W! @ S+ _. c4 T/ X( }
then* m$ z) M( h) a/ I/ X' ^: i
@.umlagern(@.standort.nf(3));
2 t) K v* M( a else
: b/ z- ]( v) p5 x" h if @.standort.nf(2).nf(1).leer( S2 f% b6 ^* }6 r0 H9 D4 W
then" w, S2 m: J0 u' q/ u$ {
@.umlagern(@.standort.nf(2));, u6 F& P- C: n( q5 \
else' j9 g+ m% p- w0 m# X! H/ W
@.umlagern(@.standort.nf(1));
: f' [6 G& t$ l7 f. ^ b end;
/ ^. V5 t8 {3 F& p1 T end;" i) R3 x1 p) d9 K W/ Y/ m3 k+ ?- v
else , Z; c$ @% }7 o X
if @.standort.nf(2).nf(1).leer
+ z' J& ], D% F& a1 i/ z5 ] then
. x1 ~+ w* W9 s$ o @.umlagern(@.standort.nf(2)); + q7 I6 V8 ?5 | D
else
& T) z* m5 l& E/ [- x7 {5 V if @.standort.nf(3).nf(1).leer7 i% f5 I, H2 e
then
5 }3 {4 V" B# a: I1 C/ p2 ]4 t5 u @.umlagern(@.standort.nf(3));
. i+ v9 `# X2 t$ F; K' z else
7 S% i% p: U, g# h/ h* [ @.umlagern(@.standort.nf(1));8 V+ H4 [0 y( s q+ w
end;5 M: c. `& `; d+ F, R e. M# E
end;
, e4 {- o1 @9 g' x* Q end; . ]4 q% \' W$ a2 X
end;4 [* f+ R$ q" M3 _! p
end;
0 O9 w8 C( n, c( M2 V% o# Gif ?.leer
; L9 V2 w2 I- sthen& {3 w ]# n4 ~4 z
blockier_merker := false;
6 n# B% ?6 r( v6 L3 b; H; oend;
7 h% ~: L) x% x0 E' P$ t, xend;
4 [4 y {! C( m: ~大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |