is7 g" @# s( k! }3 A& V6 y+ X
local links,rechts : integer; a/ e! ?" w/ e. i" \, Q# U
do
& p% t2 U, ?& e if @.standort.nf(1).nf(1).voll
& x1 `( a) N1 w8 x8 W7 J; n and @.standort.nf(2).nf(1).voll
3 O9 r2 u& a, s' _( P) ] and @.standort.nf(3).nf(1).voll+ b' k" S0 _# C4 o7 E7 I
then- [ e" a8 u; g$ T: z/ j1 j) B
blockier_merker := TRUE;5 _8 Z" R& C0 R, K( `
else
5 p+ h% m- }# {7 U9 k if @.standort.nf(1).nf(1).leer
1 }' g( j8 ]. i* Y/ U then
" e9 I# D" B- f4 L! l @.ziel := "ap4_C";2 t; `: o4 p" [% s
@.umlagern(@.standort.nf(1));! Q" s) P. H% O/ O7 H% j
else- S1 X+ |# |0 l: P1 j; J$ _
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
, F; c% j0 e1 B$ D! r6 D + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
2 w( b4 n% C. j + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
6 \" M& R5 [; l6 M: c' K rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs 0 g# G# p1 ~2 U
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs $ c$ y J7 k$ h, ~! L% ?: G9 P
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
4 p# v; F; @5 t if links > rechts 8 |! L) l/ k w. Y+ c0 F# f
then1 q* S% z9 s' G! ^- h# y0 c
if @.standort.nf(3).nf(1).leer
5 @# s: ?1 _7 ]# p2 E6 H5 W4 \, b then
8 Q2 e+ R9 e9 r4 g' p' {4 T B @.umlagern(@.standort.nf(3)); ; m* a$ w9 Y1 m; x( b7 J$ A
else, Q6 T3 I6 ~3 T- v9 Y1 s
if @.standort.nf(2).nf(1).leer$ y9 _* s# K* w0 V& l/ V
then
X2 B$ E5 ^+ l# @) d! f @.umlagern(@.standort.nf(2));
6 @+ D- o8 [' M" O q! S else
, c' b5 m$ {) q; z1 g6 e4 B) B" @- ^& R9 h @.umlagern(@.standort.nf(1));
4 W4 m( X6 ~9 t( u A' P) t end;
: f& A! |3 B( a" I K/ \ R+ q5 R9 v end;
$ k, q; w# F4 q) ]6 N( N else 9 L H2 h& a/ v+ U6 k8 [* i
if @.standort.nf(2).nf(1).leer
1 i4 M9 ?% g6 C then
5 W2 t- m [2 q6 p: ? @.umlagern(@.standort.nf(2)); 2 V% F$ @% _; D: q
else
. d8 m9 ~+ T& z" N1 V' c3 G" j if @.standort.nf(3).nf(1).leer i5 d6 L7 ]8 K' g( ]; |* {) Q
then
5 q( v7 F6 `. Q( _: E; @( R4 \ @.umlagern(@.standort.nf(3));
% y( w S( n+ m3 x- x- a# Y else. u: D. J( |* L6 d5 I7 D' r
@.umlagern(@.standort.nf(1));
3 G: T& o+ i+ ~5 i4 P$ N4 g0 I end;: @! D; }: x% b5 _% S
end;5 B1 a0 h' j, }2 E6 ^: I- ^
end; 1 `9 L( _6 n2 H. x4 Z" C% z
end;2 U f; {8 c% M0 j
end;& H; o2 U0 s7 N' c7 v+ P. F
if ?.leer% K5 y; O$ D0 ~6 A4 B7 `, H
then
) x: @9 p9 g- j# ^; Z- d8 E blockier_merker := false;8 H- q2 J: O9 r0 v* N
end;: ?' I3 J" h! g' A# C9 ^
end;
# f* C+ N9 ~( Z8 ~ G J- k6 c大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |