is8 b2 S; p6 A) m$ ^
local links,rechts : integer;
! V" e+ |. P3 |& b' vdo T2 z- d2 f% w, H: l. p
if @.standort.nf(1).nf(1).voll9 p2 |9 P, q: l7 o; y. h% M' A
and @.standort.nf(2).nf(1).voll# U: h$ R+ W/ [1 n7 x9 o2 }
and @.standort.nf(3).nf(1).voll" G+ L; s1 R- \
then
; S5 G' Y( z2 O5 i2 s1 k; s blockier_merker := TRUE;
! w3 p, Z" h- x8 y; m, | else
/ w" k( j" s4 O3 g if @.standort.nf(1).nf(1).leer% d8 S7 r7 s$ H
then
- }3 s' T, G4 F) O# _6 r* X @.ziel := "ap4_C";: \' N# O9 i ?& k, u! v+ u
@.umlagern(@.standort.nf(1));" C( y' |7 G7 H: G
else5 h) X5 ]; N" o- U" f
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
2 ^3 O* V. V2 t0 S# P3 k + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs 2 E A$ u9 M2 |, }: O3 z# H
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;8 s9 N, Q& Y6 X6 |& _) B0 g/ p2 z
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
& F5 S5 d |1 N( y8 r, v; b + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs $ {- o5 |# `9 c3 \" _. m1 l4 }5 }) X
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;- r8 p j7 J& P4 i' t
if links > rechts
1 _; ?8 O. K2 A4 P9 W then
; D6 }; Q+ h) l; F if @.standort.nf(3).nf(1).leer
* G: `# j) \: x4 T then% n: @; M% Y. @) H8 Q! _
@.umlagern(@.standort.nf(3));
. L+ y: {3 X& p4 K1 M3 y else
N# K! B+ t% o if @.standort.nf(2).nf(1).leer
, J& u+ F! }% o- d+ g then' M! @ y4 h) I) z/ C5 t
@.umlagern(@.standort.nf(2));! R% a. G' X# F4 C& M
else
5 h: D8 z; E5 r @.umlagern(@.standort.nf(1));
k4 ?. d4 ^$ t7 M3 m' H/ z end;
) x& q/ C* O7 ?' }& j2 v end;
8 l% P ^3 ^5 G else
+ t7 i! U+ l' b% Q8 R- f if @.standort.nf(2).nf(1).leer" |/ D% @% p9 u; B9 y8 S% z' h5 L: P
then
7 p8 O5 U1 d% o' b1 G$ g @.umlagern(@.standort.nf(2)); ' u' n, p2 a4 m# r- B) M
else7 l; l M. \$ l! s' i
if @.standort.nf(3).nf(1).leer
( Y& _$ p6 Z5 S! `6 L( m' E then/ Y5 M$ T* O2 @
@.umlagern(@.standort.nf(3));- n+ c. }* o3 J3 t
else
: C$ I# J0 s( f, ~; g8 [ @.umlagern(@.standort.nf(1));9 [9 [" i3 K6 P- j( ~( M: _
end;
. a1 U8 E7 u4 p/ `) a6 A$ N3 h end;
5 c, t7 E$ h/ D& s& R end;
2 o/ t) h: W& A/ X8 D& t4 L end;
" f6 S( g/ ]! u' _ end;1 ]; H7 f, Z8 t1 F
if ?.leer1 o l1 a& C( E9 i @+ j
then
5 v8 x& s8 }3 J: X7 p! J blockier_merker := false;
# V' c$ i7 U' ^1 \4 L* @end;
- W" X3 G2 a9 e/ d3 Kend;
" r; O. s" m4 v/ Q0 s. W大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |