is, h$ A! P1 a( q- N9 Z' b% g6 q% {
local links,rechts : integer;
8 C" @' N! [) o3 A5 gdo ~* \' x3 v7 S, ?: F
if @.standort.nf(1).nf(1).voll
0 M" T9 i* M; F2 D5 s7 _% W0 d& ]9 ` and @.standort.nf(2).nf(1).voll
. _& f6 P6 ~9 ^# B0 e3 c and @.standort.nf(3).nf(1).voll
5 D6 B7 A# T9 g then# t4 D5 K: A; A- a9 L% k
blockier_merker := TRUE;
4 `2 e) k. d* o* c else
g; w# T. z/ |, p if @.standort.nf(1).nf(1).leer
8 v; o5 w7 V2 P y then! z7 G9 c. W4 ~1 n P' X0 ]6 j
@.ziel := "ap4_C";
# X! a; n: Z. P- l) |5 L+ J7 d8 V @.umlagern(@.standort.nf(1));
+ R4 V; E( G: Q ` else) i1 T' L6 i! z; J) [+ W
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
1 u: A" C' O- l3 F7 O + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
? R `+ ]2 @* l4 W) P- Y* f9 v + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;" A) ?, y# ~% f7 x+ w
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs 3 V1 f7 \0 ?# |7 a6 G
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs + u! L1 j) ?8 ?# {0 }, g
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;. r$ P1 R' E9 ?* G! O2 c) A
if links > rechts + i2 o2 U$ {( f& g1 V. @
then
3 a ^; a1 I7 w g; n if @.standort.nf(3).nf(1).leer3 _/ v9 v2 i! N& O, `- g! H$ g- f3 M
then- T: c2 I8 G7 }+ [
@.umlagern(@.standort.nf(3));
# F6 V3 K/ v' Z& Y8 H else
& Y0 `9 i' w- S2 Y( ` if @.standort.nf(2).nf(1).leer
6 ~0 f* R3 g7 j6 A+ m5 Z3 Q then. ^/ u+ e: n5 X7 l3 A. N
@.umlagern(@.standort.nf(2));7 t* t" p: J; _8 z
else& z' U4 H6 ^$ {1 B' Q1 i2 @% W
@.umlagern(@.standort.nf(1));& t/ A+ m4 F$ W5 \' ^1 l3 K
end;' |$ y$ \ ?) z3 a& ]' q
end;% \- P9 f/ H0 N# ~
else
1 y3 E! k o5 `# j if @.standort.nf(2).nf(1).leer' X0 b8 k* H" g9 |: D
then: O, z2 u* u. g0 A b
@.umlagern(@.standort.nf(2));
& d$ _. c( ~2 N1 | else3 O( d% k& I1 U# I# M0 x
if @.standort.nf(3).nf(1).leer
7 O$ q+ \/ K4 Q! ] then
) ^9 t0 {# m$ x4 t3 f7 V( L8 v @.umlagern(@.standort.nf(3));/ d7 i2 B0 M* y, ~5 j- z6 h
else
+ {# X5 n7 f2 ] _) K4 ^. g @.umlagern(@.standort.nf(1));7 B6 K# j- g+ Z5 G& R6 j
end;7 r) f: r7 q8 o+ H
end;* ?0 k, s2 |+ {' X, N
end; 1 j3 a3 z9 F C; ]" M/ p
end;
: S5 X5 S0 \6 }- s: C end;
& b; p: _2 f& Fif ?.leer
v/ P8 `+ \* X$ wthen
. N, b# t6 A) ~/ m, m blockier_merker := false;
0 H. b: Q; ^0 t, iend;
5 l( b/ Y" E; m* k1 yend;
& @5 ]5 _0 ?9 {8 h/ O& J* P/ T. b大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |