is/ K' m6 z8 u2 V9 L4 X( e
local links,rechts : integer;
. R' H# m. y+ f6 O2 pdo
]* r+ N) S3 K2 P* ? if @.standort.nf(1).nf(1).voll
/ t4 m6 t3 S9 U2 i, s% t$ N' w and @.standort.nf(2).nf(1).voll
9 R$ n& z4 U4 @" ?: k9 k7 P and @.standort.nf(3).nf(1).voll
H; N+ k* V3 v8 |3 Q$ L s then% l" \: y0 Z ?9 F) @; L6 ?
blockier_merker := TRUE;
% b' ]; M$ N6 x, ^ else0 g1 O5 S1 l4 s5 g
if @.standort.nf(1).nf(1).leer k* q7 ?* }, S; y% ^; a- Q" \+ J
then
- T- d T9 F; r8 X5 o @ @.ziel := "ap4_C";+ [' Q w8 r% v% g* Y! o
@.umlagern(@.standort.nf(1));
+ J8 x4 I# z1 H6 k else. ]/ o, M" {0 B' f4 w0 R
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
% U+ W: L/ c) I( y( E/ K3 y- ]0 x + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
) S4 N1 ?/ G" d* r( {. B# |$ ? + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
4 x; n- u! }1 R$ W$ }+ ~$ v0 E0 Q rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs ( Q3 S8 e9 i l6 N+ M. @
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
8 M: U/ `% F% h$ w- g + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;, t: s& e+ M& h7 F N( q4 K
if links > rechts , \, t+ J2 `' @( a+ `8 M2 l2 Q( T+ t0 G
then
3 C+ v: M1 c, l/ j: m' N' f3 H if @.standort.nf(3).nf(1).leer3 j, W" h M. j
then) f2 w& n0 h0 |7 c0 z5 @; K
@.umlagern(@.standort.nf(3));
7 B9 @- p, w/ v else5 c' G9 Y7 h$ \; ]; c& D0 v7 N
if @.standort.nf(2).nf(1).leer
% x* e ^ I1 V' t) a then
1 [$ ]0 r+ t0 N" ~2 q @.umlagern(@.standort.nf(2));2 w% ^- c% r3 s0 S: _8 N2 k1 i7 i
else" Y" y9 z9 a+ i" A
@.umlagern(@.standort.nf(1));
8 n8 B% f4 E. O. K end;3 f! C' ~ M: J& Y* Y# [
end;) P' t) ?) l+ K+ X: N9 K# P
else
% L* E( ]1 D1 V9 m* i if @.standort.nf(2).nf(1).leer
2 m! F& M" j# K! H1 V then! P* x: F8 K9 Y: u; C
@.umlagern(@.standort.nf(2)); 0 ]+ T5 i2 h& t/ d2 v8 r
else
5 s9 Y# W1 P% m2 e# l' A if @.standort.nf(3).nf(1).leer: c- M# N5 @+ `
then
& |5 @2 q) R) l3 S; c a @.umlagern(@.standort.nf(3));6 S' ]: [7 a# y' e' k& X
else
: j g/ l9 B( G% M1 E9 m @.umlagern(@.standort.nf(1));
_! Y# j& \# M/ }/ [ end;
3 ]* D/ u+ X& u P, N% w end;
- y6 g4 L8 ^& ] end;
8 t `2 l3 _1 [5 B! J" } end; q9 c: ?% _+ |
end;/ g9 j! v' x. Z, r. Y
if ?.leer
% {2 o! w) H% H) Y9 T- athen1 k$ }0 T+ o# D0 p( ?+ y
blockier_merker := false;
5 v7 q0 E3 u: o$ U" Q+ pend;
1 L, }- v$ t$ M3 k3 _: ^end;
# t- N# a" Y6 ~3 K大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |