is% k, o$ }5 w: j
local links,rechts : integer;
# l) I2 w z: S5 A# ido
) m) r8 I8 W. Y' I( [& y if @.standort.nf(1).nf(1).voll
2 j) q+ S4 |, @/ R9 V" Q and @.standort.nf(2).nf(1).voll% X F4 K* F7 i X
and @.standort.nf(3).nf(1).voll
( @8 I3 x' T) f" r* i9 [ then' m7 c3 G7 s9 {' g, @
blockier_merker := TRUE;
( A; b. V. R, P5 ]. a else
: E& v3 ?' _* v, B if @.standort.nf(1).nf(1).leer
/ U: b, p2 E( ^! s8 ?' h7 h then
2 U2 e: h, I) m, D. G3 _ @.ziel := "ap4_C";
+ c3 j$ ~; H0 f8 m) B8 c6 g* n @.umlagern(@.standort.nf(1));' Z8 L W$ A. f6 t
else
5 i# v2 K: Z$ O9 C links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
. K! Q" V) _7 B + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
H- D! z) \4 Z + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;# r) ~& U! q8 V% s' Z
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
4 O- ? g U1 O$ b! E + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
, M6 M, p2 l/ h0 ^6 S + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
0 l) l- @4 C, m& [! u if links > rechts ( Z1 ]4 y+ h* {4 K2 [- l* Y
then
% z; c' p- v& D T if @.standort.nf(3).nf(1).leer
4 ^+ {' o& |4 I then8 c4 F) v- x% ?" k' Q# B
@.umlagern(@.standort.nf(3));
" T( Y. d2 J( Q* o5 ^1 P else
% Y) u0 `% f& k8 b+ t& D s if @.standort.nf(2).nf(1).leer2 d0 c, [+ b+ N0 V- O
then
1 I; }7 W4 O. J$ a @.umlagern(@.standort.nf(2));, y/ s# l/ T, z# V$ z( `: I
else
, `7 G' d8 h2 p @.umlagern(@.standort.nf(1));4 k6 {0 q* `6 w" Z; \" ?
end;( f z; \; {" B7 x
end;1 S+ z# E( }- ]" g; _$ d1 {) u3 H
else $ g; k) G' ^, f
if @.standort.nf(2).nf(1).leer
9 M8 Y0 q6 i* { e then
& ^/ U( @6 ]$ C/ I$ H; c9 r+ S @.umlagern(@.standort.nf(2));
! t0 A2 a! J# T: k4 M; x: x else8 q9 b1 `# p& k S# _. u' t n) c
if @.standort.nf(3).nf(1).leer) G1 T* O' `( ]0 k% u
then9 F2 x3 G( g) ~/ V8 u0 K S3 P
@.umlagern(@.standort.nf(3));$ r3 F, K9 b! h' T4 H" M
else
+ z$ J8 ^6 G) e! f7 S7 p @.umlagern(@.standort.nf(1));6 ?: M# i) o5 @! f5 z
end;
' ^3 ]$ [6 Z& G; z, p9 D" u end;8 z6 y8 ~2 D4 I7 k7 d: V/ z
end; 9 Z9 H! U0 l) a- u* ~# q
end;! w. ^( B- y& }2 o6 G2 i) ^8 z4 ~ O
end;5 d* i. t1 n; G, x* m
if ?.leer
/ Q( c" `" \% dthen
1 k( j4 Q. i' c blockier_merker := false;0 \2 N* a/ ^& _; u* Q+ H; T }* Y
end;. [$ a( V8 O& N2 J t! H3 W
end;
. \& y" x( ]5 l) |( s7 A大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |