is; j3 j" J3 t( X
local links,rechts : integer;
# H0 t( m! C' @3 h7 Cdo2 {9 L$ F3 U2 s" P1 v
if @.standort.nf(1).nf(1).voll+ V- v! t1 ~* n5 |8 o* n4 n
and @.standort.nf(2).nf(1).voll" t$ `1 F7 W. V. Y/ h2 |* A* Z
and @.standort.nf(3).nf(1).voll* o! |; H4 B& {+ K
then- l1 J1 b$ \/ Z! J% X- l# r
blockier_merker := TRUE;
v! w$ }: o4 a o J4 O) } else
' e! k7 y( g; u; f+ u, d8 v if @.standort.nf(1).nf(1).leer4 U3 _- d: T# F- c+ I4 f
then
3 Z" {. C) g3 y; E. F @.ziel := "ap4_C";
' F5 `& y( U* F {' S) N @.umlagern(@.standort.nf(1));
! Y& E5 n/ S" T: O) n5 L( ? else
3 A. P7 e E; M- _ links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs 1 o6 R9 s4 S5 g" r4 K
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs ) K3 C6 F/ s _6 e
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;7 X% Y' y+ t& s* e X+ M7 ] p
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs : X6 ^# V; L& P& {. W* i! k
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
; A) ^1 c; \& j9 ^ + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
* {4 N/ W$ H" W4 C, L! e$ y if links > rechts & |) Y8 N2 t' G7 g0 ^# s# A9 \/ X5 Q
then7 r4 i* R! c" k( i
if @.standort.nf(3).nf(1).leer8 F/ u; @" E5 C: ` X; ?' p- t
then/ W7 Q* J8 Y Z
@.umlagern(@.standort.nf(3)); . ~$ \( g2 U2 u5 Q
else% M1 D+ l9 p5 y8 K' P8 `1 s& F
if @.standort.nf(2).nf(1).leer2 d n$ s2 |" [$ e6 a5 X9 ^0 K/ K
then
5 r( @) t) c$ i+ Q! Q6 u, F8 g @.umlagern(@.standort.nf(2));
# U; y* h3 V' H8 I9 `# B4 L2 p else+ g7 ~' Z! R9 U" }2 O, W) T
@.umlagern(@.standort.nf(1));
7 w" C* e' t4 z+ | end;
0 U' V- l+ O7 k' O$ i! h& P/ r end;
3 Z, ^* a2 n$ o& J: l else - V, P6 b2 s% H/ S3 z- _
if @.standort.nf(2).nf(1).leer
' u6 w2 r5 r! u6 j7 @) r then/ R# g3 F5 ^5 k/ o6 c/ ~
@.umlagern(@.standort.nf(2)); + r( O& B5 c* e
else
: i5 j& w0 K% o0 a# ?: h( S if @.standort.nf(3).nf(1).leer7 h. }& [' ^% P9 Q( i
then n* P# o- h$ X' B2 I
@.umlagern(@.standort.nf(3));
3 o' Q m g7 Q' u' w5 [ else2 E) _8 G: N. j7 _( i3 D) B$ D
@.umlagern(@.standort.nf(1));
; Z7 Z7 R6 y" ? end;% t) ]' u( N9 S8 {
end;# k! I% `8 g' n' W+ R/ M
end;
4 ]5 j/ V8 [; V& h" c% Z2 B/ I. X/ i* g end;
$ e. y8 M1 b; A9 _% e/ g8 y5 f$ a end;# D) Y) Z: I+ a: i8 d' W
if ?.leer
& ^- K6 B! Z4 I+ ^+ Z2 a7 v/ wthen5 z8 u& d5 m1 l
blockier_merker := false;
R0 \' d$ `- r5 ^$ @) A: ]/ iend;' |# H; @* N2 V# y9 a4 m) [+ Y
end;
# o0 C8 b v' r, p7 S: d' w大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |