is( D# H: i/ N8 y& D
local links,rechts : integer;: b8 u" N4 \- f6 ], x
do
0 I5 P5 t: w# J" S( z5 O2 e1 y, `- {/ s if @.standort.nf(1).nf(1).voll
# n0 i# u9 L! I! j and @.standort.nf(2).nf(1).voll
4 P2 {; `# {- _% _* H- M0 { and @.standort.nf(3).nf(1).voll
( ] H+ r% U* d& L2 y) R then
2 g/ ]9 n# I- N6 G blockier_merker := TRUE;, h% \ m4 G& z2 @: z" M; l
else
/ U- Q1 j) c3 `- Q3 l& Z4 V$ j if @.standort.nf(1).nf(1).leer
H( k7 k z5 V. {/ H, G7 L2 q then7 U# r; u" d; D
@.ziel := "ap4_C";
- W2 F6 z- U8 k, I5 i6 O: ?. o @.umlagern(@.standort.nf(1));2 _& d! N+ w% A8 K( |
else: J1 F. x% N7 N3 \
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
A8 p1 r( p2 V3 d+ x V3 c + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs 4 E2 i8 @% {5 }1 H8 A T
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;* a, H! z) F* `# o
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
% C' g& @% e$ o( e6 Z. v; \, v6 F& H! k + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
5 C$ n6 g3 ~, z8 O' P + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;: S, E( w. R G" k/ I. Y
if links > rechts
( O- L1 t) p4 V o6 c then: A: I! t+ J3 j
if @.standort.nf(3).nf(1).leer3 S' h* i u0 W, @2 W
then' ^, d& Q# @/ M y9 {. e, L' p; e0 J
@.umlagern(@.standort.nf(3));
$ ?, K2 J1 l N' r1 v+ M2 w else
5 I$ `) ]2 ^( V if @.standort.nf(2).nf(1).leer `+ g8 c- z k: z
then
: M0 X; P+ d6 b @ @.umlagern(@.standort.nf(2));
V% z& ^8 q( p. n' p else
' g' Z( N6 H# D' ]& ]) }4 v/ o @.umlagern(@.standort.nf(1));
9 t7 [6 v/ K. w: l' `3 x end;6 A4 E% Q7 v8 i+ e( b ^' z
end;) J% x; `" P/ ~; Z3 P
else 6 }. J+ Q# o5 l
if @.standort.nf(2).nf(1).leer# _( H( G u0 w- L
then
% i- F0 w& u* q& t @.umlagern(@.standort.nf(2));
# v2 }# M7 j+ ]/ Q" [ else- f- z9 B/ m7 k* M! B; F
if @.standort.nf(3).nf(1).leer
3 `: m. M- h/ \ \ then
& v) K0 d1 U, M8 b+ w+ S/ j" g5 m3 O @.umlagern(@.standort.nf(3));
4 a2 Y! G" t- H: Z3 c+ l2 n else
3 z$ ^* t* }4 b, J q @.umlagern(@.standort.nf(1));
( r* Z; @" Q9 G# ? j' o end;) ^+ a9 n1 e* t; \" M
end;
" u _' `9 H+ g) W u$ v; Y end; 0 D* M* k& H4 b9 Y5 i( W! f
end;
- a& n" g* \1 O5 d end;
: {! e* e; M7 t8 ~$ [0 S. r7 I0 K! uif ?.leer
+ p' S4 ?; T! i- l7 `then
6 s9 W% }8 M" s S. i# k7 }3 P blockier_merker := false;
( U: D7 ^4 Y3 D9 F t, J+ O: j* V) |end;% S- t+ J) P! `" A+ `/ L2 S( [7 x
end;
- r w# r; Y+ k大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |