is
; v+ C7 G& p% p6 O, P5 u3 ^/ plocal links,rechts : integer;
6 \6 Q8 d( S0 `; q5 R; z8 K# u4 Ndo
' ]. V! k9 @; F: T: j M& @% \% t if @.standort.nf(1).nf(1).voll6 h& _6 [9 U& ^9 p) U" y
and @.standort.nf(2).nf(1).voll
* G- Q- E) E3 a9 w and @.standort.nf(3).nf(1).voll, C2 p' l1 b! R9 d
then
+ d7 K# I8 ]4 e2 E/ A9 E blockier_merker := TRUE;
' Q+ p% w2 I. C9 i% ] else6 Z! g- l. }$ y9 D4 }* i
if @.standort.nf(1).nf(1).leer
" M2 B9 O$ m# P& e then
) v' B. o# ] T, X( n @.ziel := "ap4_C";
+ k; ^5 _1 s* |* Y) } @.umlagern(@.standort.nf(1)); E. C1 K: n8 H1 O0 Z6 E& m
else$ @7 P( y/ {3 \7 T' _9 b
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
; l! L3 g* m: x + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs ' E( j+ M' n4 {& K( y
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
; x9 |0 C" I. U% ?$ \: e4 n9 ` rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs * ?( r7 b/ v. N% Z7 A
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
; r1 Y; ]1 \ S" ~) j7 p1 P + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;* w: P: U) K% Z5 F' {$ _
if links > rechts
1 F/ e* ]1 M4 ?2 y( g) v0 p. n then
9 H* W, X2 _# u) G1 t" W8 Q( I6 O if @.standort.nf(3).nf(1).leer+ r) ]! t$ G" x: Y( I1 N
then
& v8 l- F. A- e4 W. v @.umlagern(@.standort.nf(3)); $ H" l8 n* ~. C; S
else, f+ \8 H+ |. e; H
if @.standort.nf(2).nf(1).leer4 n2 P, g, R3 @4 m7 O) d
then
3 i A9 f4 O5 y @.umlagern(@.standort.nf(2));. N6 ?" Q# H1 R6 j1 y7 U
else
& ~ R2 c+ s0 q1 A; X- P @.umlagern(@.standort.nf(1)); J7 u: q+ Q0 _% o: R$ s
end;
5 ] M& U; f" G end;5 z* z/ B, ^; n8 D. R, e6 G
else # L* Y8 U0 H& d0 I/ A
if @.standort.nf(2).nf(1).leer3 Q, f- D$ V1 s8 J# f6 Q
then
2 b% e7 G& B6 X Y5 J$ l @.umlagern(@.standort.nf(2));
g3 K8 \8 `/ }* i: p$ {6 Z else
7 Y7 L& x: ?* G* B if @.standort.nf(3).nf(1).leer1 p; }# f2 U/ W8 [% \' n
then1 w. E1 v$ m' t8 v3 g. @! L
@.umlagern(@.standort.nf(3));0 Y9 u! w9 ]- Y
else
3 o2 I3 M) z! f d F4 U3 Y5 W% A8 ? @.umlagern(@.standort.nf(1));( j, ^" o& Y/ C% q5 M! q% H
end;( ^- t; r! Q" q9 e
end;( Q# G/ B4 W/ i5 a
end;
& v2 G) ~" M2 }1 S H1 t end;
) v# C, p. x; A6 c/ e; k end;' w$ x& i$ W- u( |& q- v8 u" r
if ?.leer
- g w% ^# T1 j1 S3 wthen
. b1 M4 C9 j% ~: D% X4 A blockier_merker := false;
* B6 S) k. S+ e; F8 b3 `" send;3 u6 q3 X b7 J
end;9 p7 ]- o6 B. {+ y; k0 O# g' ]9 @# g
大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |