is# M* a8 u% x* k9 e5 t& A3 r
local links,rechts : integer;
6 W7 V' R+ W4 K+ a( mdo' p4 p# ]+ }# L, O/ e# \! q9 X
if @.standort.nf(1).nf(1).voll
! h/ Z: Q5 g5 T- P' }1 a) q and @.standort.nf(2).nf(1).voll( H3 s K( g. m; Y9 ^
and @.standort.nf(3).nf(1).voll3 N" O: B) g9 q: K
then
2 e" o! h1 w) x# U/ I; ? blockier_merker := TRUE;
8 b _3 l8 Y& \2 @) U# O' N else9 n. s* D. C* d8 F- X
if @.standort.nf(1).nf(1).leer7 x( Q) `+ N2 c# o0 Z" T
then
$ @- @( c1 r6 y' l @.ziel := "ap4_C";# o: h# O: r9 w, H& I; t# h
@.umlagern(@.standort.nf(1));& ~9 G) w2 e) t* C0 X8 ~
else1 D3 R- [& x' [
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
: g; v2 |% u% R. X$ ~) _ + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs - Q9 j6 \, @$ T- G! Z
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;. z) `+ L* z: L6 \
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
! m0 F% O4 g d9 a, i) i + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs x9 A* P6 B% _/ e0 F
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;! i( e% N+ r3 t ?
if links > rechts
" o7 S1 ]) u. o3 ?/ i1 J then
* r' }4 I1 W8 r- l6 G( _ if @.standort.nf(3).nf(1).leer* t- k% [4 L$ L- P
then
8 }3 r6 R. O9 H @.umlagern(@.standort.nf(3));
9 k; r# a Q2 h" J8 a else, x% [; v. ?" e. F9 |) K
if @.standort.nf(2).nf(1).leer# I% ?% s& T M8 K8 ^
then; P: m/ }1 {8 j, }; w' h2 w
@.umlagern(@.standort.nf(2));! w( u* u0 }9 K( R
else
) u3 y+ j' J" z: M7 k @.umlagern(@.standort.nf(1));
$ f. o, N8 T$ p; t end;
$ s& v6 N, Q1 I$ x; U' x g end;
. b7 R) b4 G2 P4 O1 y else
+ ?$ w1 m2 v3 E7 |" e9 s2 U8 r if @.standort.nf(2).nf(1).leer
* `8 Z$ W2 u3 `5 H/ r then/ y) v5 X" Q, [5 v0 f+ L1 P5 U, C
@.umlagern(@.standort.nf(2));
& _5 d! J8 \. g) F& z- F, b: I( Q& v else
9 m6 `# B, x" s& z1 d0 X' W5 Y if @.standort.nf(3).nf(1).leer
8 Q# C' S; g1 ?5 `) }: c9 D$ |6 N then
! J4 p4 \3 W% _% P( }5 t* _ @.umlagern(@.standort.nf(3));4 e7 h: u, J0 `) J$ O Y9 C
else8 c* I* |$ X# p+ B% C; ^
@.umlagern(@.standort.nf(1));
, P+ ~8 l/ {" m* d8 [ end;: t6 H8 y; z- Q4 f* u
end;
" B: y6 A$ T0 G7 Z+ r" g) I end; 4 i0 _, L* f, x7 g
end;5 t) u V2 B& y, z( O0 u
end;& Y; Y: ~& b8 u+ N k0 J
if ?.leer
9 y* T8 [) ]4 \8 ?0 Tthen
$ Q) l( `: z( i blockier_merker := false;
1 ^% y& U$ ^1 V) @+ \8 dend;: _3 Y/ a; l8 a4 V
end;
7 ]% c* R4 w; ~2 ]( O: Z大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |