is- P7 H0 f5 J1 k( S0 W
local links,rechts : integer;
4 c! M7 W: t8 fdo
: V4 X8 p; d( w% l' c D9 U if @.standort.nf(1).nf(1).voll$ g" C4 N$ V* q" l$ N% n
and @.standort.nf(2).nf(1).voll
' A: E) ]+ @2 } and @.standort.nf(3).nf(1).voll
3 O: w7 j; O- }! p! h* h then
& A8 L$ E4 {+ ^- C) f2 b blockier_merker := TRUE;+ E, G4 M3 J: f. q* G
else* R! f# ^+ g( c7 m: T
if @.standort.nf(1).nf(1).leer
~1 \) e( {8 d5 q* |& j then! _9 o" ^, U' s+ l
@.ziel := "ap4_C";1 _. D6 ?$ q5 A% \5 a5 X" X
@.umlagern(@.standort.nf(1));, M7 o- R9 O+ O. n. @
else. ~+ V8 N/ `3 S& ^+ d- B
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs 6 e& G6 [* e4 j1 B) D9 z3 @& H
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
0 [- U! o* F) K. w' P- V + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
( y# S M( w# c. W1 J7 L" g1 S rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
, h* c& _7 t7 y + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
: J3 {" d! D) @7 ]6 j + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;& e" e4 I- M# p1 v
if links > rechts . f; R3 K) x- G7 Z
then1 p% U6 U. W- J
if @.standort.nf(3).nf(1).leer% O- e" [9 t# w+ W8 i
then
' B" l, a# t7 a' F @.umlagern(@.standort.nf(3)); ; q2 ]2 c6 T; h; p0 P
else
, P- j- x1 ^8 d+ B+ {, b if @.standort.nf(2).nf(1).leer2 g9 T! g: ]3 b6 t) }
then* Q/ l0 o: ]; s, h
@.umlagern(@.standort.nf(2));
Q; w# j# y3 X! v else9 v8 k' l9 _) a& c
@.umlagern(@.standort.nf(1));
+ M; q8 Q m& n% ?1 U5 h, y8 W3 H end;5 \1 K; D% @% E" j' h3 R- k: `( L
end;7 K9 D$ X% i7 [2 f. D# Z
else 3 r. l8 y, L% P* s
if @.standort.nf(2).nf(1).leer: m9 U0 f+ B, k% e2 o
then
7 u/ \% G6 g9 F* J @.umlagern(@.standort.nf(2)); % o; |0 U$ V9 N( N
else7 Y$ T0 K# {- @4 L& o. R
if @.standort.nf(3).nf(1).leer. z8 w: e8 l; H0 q% x. x
then S/ K% W2 n0 F7 q" w
@.umlagern(@.standort.nf(3));
7 t% c2 A1 Y4 X( h! v else
# Y" p% B7 k& W# h& R @.umlagern(@.standort.nf(1));6 F# g; W$ J+ l8 e
end;
+ X$ Q4 t2 ?( ?* u( h0 e8 U7 W( c end;. e: j6 A. O j( Q$ A3 Y: D
end;
( M( ~ l6 ?2 F end;
, r1 ~% Z1 ^" Q- } end;
. I# \1 B: v& q( o- j" Uif ?.leer" u) p& U- D( {9 `# {) i
then
1 ^9 s' Z# ]1 T# z9 y. v2 x blockier_merker := false;! o9 O2 n( V7 _" B: `
end;7 C( V$ i, w0 g1 y2 Y& f- m, R
end;
% V p' c: S2 c' T; w. Z大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |