is, R M% M' l& m& D
local links,rechts : integer;" n5 W: y4 X! B# H, D) l& A* e/ a
do
: Z$ o0 _$ I1 N# y0 B3 v' P if @.standort.nf(1).nf(1).voll9 C# O3 ]$ c8 `) V, K# j1 y
and @.standort.nf(2).nf(1).voll
+ ]( j! O! Y2 ]/ [* w* l* p8 x and @.standort.nf(3).nf(1).voll: c/ s) o$ o0 R! s6 _
then
( ` x/ Q# Q$ D+ F% [6 h9 S/ r- z& x blockier_merker := TRUE;% d7 `6 M+ y7 F6 C" a' G E& n
else
3 v8 L( L Q- d if @.standort.nf(1).nf(1).leer7 p4 y. M) F0 ?. m- b
then
: e2 T Y; x1 Y- t% ^4 J' c* X @.ziel := "ap4_C";
+ H- q8 w; }) J6 D6 j: m @.umlagern(@.standort.nf(1));5 @& M, E/ w; ~) w
else1 M/ i9 z3 G' X
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
M- d9 B3 B+ {9 a, w# r + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
- E# i" R8 h- K$ r0 P! ~ + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;' [+ [7 l6 y& F# Z
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs # ?- e* g; [! V) |% l
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs . |8 V4 W6 i/ p; y3 W, G9 p
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;# j0 p1 M8 c+ h: i5 t1 q
if links > rechts 5 p, M8 s* E) u2 U; K& y' M) g
then. {0 ^! _- ]1 `/ M4 P* _% [
if @.standort.nf(3).nf(1).leer2 {8 l, a% Q0 l. ^
then" N" D( O& L/ _, I3 q0 B/ b: K
@.umlagern(@.standort.nf(3)); * r: ]! E3 p/ t$ o2 G3 ]
else8 _, K9 x9 L+ Z; x" L
if @.standort.nf(2).nf(1).leer
: v" n. ]4 ]2 _7 Z7 f then& D6 L) @( X/ p! Z2 Q( @
@.umlagern(@.standort.nf(2));2 o$ F+ ]4 k o
else0 m& @, f8 T7 N, s: n
@.umlagern(@.standort.nf(1));# v: Z3 O. o Q( @0 c
end;
+ G/ I3 l( _: G" W s2 j2 K end;
! p: O6 @; [* j2 A% I' J& C else
z1 z, @0 u- h4 |9 _/ k% G! V m; } if @.standort.nf(2).nf(1).leer
( `# e1 \9 ]9 x3 Y' t6 n/ L8 A then
( O( E7 J2 b3 I3 [$ h2 z @.umlagern(@.standort.nf(2));
$ ~8 p, K! x4 U; r' \( s+ t else3 @" \3 E3 y; x: t8 H
if @.standort.nf(3).nf(1).leer/ k" h3 s" M+ {7 z
then) o/ t8 N# H/ @# n
@.umlagern(@.standort.nf(3));
% l9 m4 i" V y0 W Y: G, o* d" v else
* a" a: W! l% z$ B4 _$ U5 D @.umlagern(@.standort.nf(1));3 Z2 L5 r) r6 l2 {5 j, j! ^. a' A: f2 t+ L
end;7 s# q! O2 x Q- H5 y5 B
end;. \7 V! k7 M; {; k" y5 j
end;
# Q* ~5 M' L5 w8 g. [3 } end;- Z p7 O) X# `' k* h
end;
6 D+ U a8 @/ q/ L$ Wif ?.leer& L- T( Q& ~* Z. { H
then" q; n8 M0 @ m- S9 |
blockier_merker := false;4 w3 f' k2 h4 J2 D- E9 j
end;
3 p( s0 A- h; l1 ? `end;
* t5 W8 \. m* b D6 p3 {大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |