is* o. _) v" @/ U. H0 z! p! T0 }
local links,rechts : integer;/ S& r: H/ {. |" o; W( g- r% _% P! r
do
r4 b1 z7 [4 ]' v+ @ P if @.standort.nf(1).nf(1).voll
; F2 }3 c/ ?8 `: w' n1 y6 g and @.standort.nf(2).nf(1).voll
! ]; m/ _4 F, `3 Y: N8 p3 d and @.standort.nf(3).nf(1).voll6 l2 V2 s3 u7 s
then
4 R# I3 K5 u8 ~; c- R* t% \ blockier_merker := TRUE;
; K6 V6 A2 ?+ n, N; \- H else- y K8 u' m7 S5 e5 H
if @.standort.nf(1).nf(1).leer
' \ {3 D, Y( c* m {* y then: a G- Y; l" J
@.ziel := "ap4_C";( Y* r8 P0 \7 w5 `! ]( ^( r8 w
@.umlagern(@.standort.nf(1));# B" x, S$ [) c
else/ N% y, J$ r! `4 h* ?% @
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
0 P; _ L3 u. o1 ]2 r + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
) O- U) u5 j2 S- Z + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;( w# H1 T9 W& S* H" r
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs ( t, J1 q' }% Q: _
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs / ~3 p. i1 M* T' b0 ?' M2 w# e
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;4 O$ D3 n$ ?# t
if links > rechts
) U: f& t: N( b then9 L$ L# B6 D5 y# N$ l+ k; R
if @.standort.nf(3).nf(1).leer W, q9 m/ q8 H
then2 A& M+ Z. r4 D/ |6 ?$ x! e
@.umlagern(@.standort.nf(3)); ( f9 W& S" d. p) x6 X4 X4 O! J
else
$ i8 ^5 w3 ~) a% G if @.standort.nf(2).nf(1).leer
" T2 G) _' ~ x% U k4 x then
4 ^* u3 C5 W# R- y. l- t! C @.umlagern(@.standort.nf(2));
6 ^2 y; i4 m1 \1 { else
% e2 L6 Z1 b( h0 Q; p @.umlagern(@.standort.nf(1));
' K) J0 ~+ o' x end;% C6 a3 ^$ Z& D) i, Y+ o. v1 I3 F
end;
1 @6 F% K$ i. |# [; | else 6 R. ]* G$ P) w c% u
if @.standort.nf(2).nf(1).leer/ a) B" E q1 S
then
8 S2 I! s0 s5 j& n3 H/ n* v( c @.umlagern(@.standort.nf(2)); $ n/ B ^6 I3 |4 V- ]; g# \" c3 {
else3 P3 E& d) n u. f/ l
if @.standort.nf(3).nf(1).leer' B* z% i. f0 W: i3 t: M1 s8 D
then
% ~+ I6 r# z: }7 V @.umlagern(@.standort.nf(3));
) m( ~- S7 x) _% U* K0 v+ y else5 |$ I: [% j6 ~) [' K ~5 A
@.umlagern(@.standort.nf(1));
( m b5 i( X. S* r end;
J' o6 H+ r% \4 [4 i+ g6 c end;
; e5 O' {% R, A8 }. r end; 6 z6 w) U0 b2 k
end;& t/ M6 p2 ~& X, j/ b2 F
end;* A$ C$ ? c8 {: Q; r; F0 l* H
if ?.leer
t6 ^. g" V- H8 \$ ?+ |then
7 A$ P& E2 T+ E1 q blockier_merker := false; n" X ?& E# {, t
end;
# [# a* d( M5 q5 }8 ?end;
1 S3 {% f- _9 b8 s大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |