is& d* Y2 Z/ `( r( b
local links,rechts : integer;9 i5 D( G6 o9 }
do
% U0 ~, y# F6 W# u% I if @.standort.nf(1).nf(1).voll
% {% ]0 C5 T/ q( [( F and @.standort.nf(2).nf(1).voll
, P; _$ U! W2 m& v and @.standort.nf(3).nf(1).voll
3 y c: d7 E$ S8 G! { then4 |/ ?2 s9 a5 y. Z0 @( r/ O& `
blockier_merker := TRUE;5 J) E- z8 k& J9 g' \6 R. O
else$ Y# ]$ G, f1 b
if @.standort.nf(1).nf(1).leer$ P. S0 V- X. j6 m. G( Z
then
+ ]( e" a2 A1 J. Y7 g. { @.ziel := "ap4_C"; H0 y& \2 h" C" Y T' V+ t, O; p
@.umlagern(@.standort.nf(1));
. G9 s& L, F" q0 I2 z2 s1 e. P5 } else
& D8 U" d0 k+ R/ [$ J, S6 s! [ links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
9 e& p3 V/ P# u" P' }, M) c" C + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
/ A5 [9 a! W. r + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
9 z7 F, ?6 O2 W. U3 Q+ C* v4 e rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
% {% g+ x- f7 z6 d2 \' T + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
3 m! d5 H! \1 ?' u* q + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;1 g, n0 @$ Y; c8 k
if links > rechts ; H8 E. E, _! b8 a
then
7 u5 X4 k$ `8 F if @.standort.nf(3).nf(1).leer, }+ Q5 I/ W6 @' L3 ^; V( n/ i
then. P) d1 Z; |1 M* S: V! w
@.umlagern(@.standort.nf(3));
8 A# z" P3 ^: Q! {+ ]- y) \4 Z else
* T# S$ c6 v# H7 m% W if @.standort.nf(2).nf(1).leer3 ~* j3 j' a8 y0 j
then
4 m* B j9 G& A4 F4 k @.umlagern(@.standort.nf(2));0 d0 ~* [& _8 ?. f: F, D
else: u7 t n/ X/ C; l: O! F* P
@.umlagern(@.standort.nf(1));
/ C. M; W, F5 w end;( l6 d; l' A6 f ^. ~* v1 B. J7 s1 b
end;7 Q! K- E& x6 n' t7 ~; }
else 2 s5 D$ `) W* w0 b
if @.standort.nf(2).nf(1).leer7 x5 ]$ G% S: f6 x4 D! R/ H* W
then( V+ i5 G2 Q$ X
@.umlagern(@.standort.nf(2));
4 U; r( Y! `) O9 E. e0 K, e else# y' r6 }! Z% ^# I6 F
if @.standort.nf(3).nf(1).leer: l+ Y& m' c% P
then
4 d$ n ^2 p8 t( z" l @.umlagern(@.standort.nf(3));5 p [( {* l X' T7 |+ X
else! [ O3 X; G8 |! ]; s+ j
@.umlagern(@.standort.nf(1));) Q j) ?( o, |; M, a5 Q
end;* R% W$ \# [$ e2 N
end;; M. u& X/ N j$ A0 y I: O9 l) a4 J
end; + u, _0 F1 m: i2 x
end;- E0 J- J9 _4 V
end;6 \/ S" y0 E. N0 U# \) k* [( }
if ?.leer
, N: ^9 {! E' w! y3 i; \then
( ]/ D: @) N+ ?$ ^+ ], A* n blockier_merker := false;7 w7 `/ i* @# a
end;% g8 I- ^- ]' o9 O7 @* Z& K& D
end;
/ n( b D8 Z/ E2 ]. d大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |