is* E+ c# a# S# p+ o. T; `
local links,rechts : integer;
5 E1 C5 q4 _+ E, [# ido6 a- W$ l+ O, u+ J/ A8 V' K0 }
if @.standort.nf(1).nf(1).voll
5 a& F: B3 x# R: Y w6 N and @.standort.nf(2).nf(1).voll
* _% n5 S1 k T/ Q6 j- r3 O and @.standort.nf(3).nf(1).voll
+ y! D+ s! V" o8 Z( j/ l then5 i% K" [ _: g) P) L; V0 c
blockier_merker := TRUE;
2 [! O$ |+ }, {) p% J else
; c+ P+ |) n$ A* Z$ L+ k2 Y if @.standort.nf(1).nf(1).leer4 O: F7 I( V7 n5 L
then3 f5 R8 \: g5 g$ n( h
@.ziel := "ap4_C";" _: Y; [% i4 e0 z% l
@.umlagern(@.standort.nf(1));8 q2 ]$ i+ b( Z m6 N2 `
else6 ^4 @% a ~* S9 `
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs ) L3 c$ ~& Q8 F( t
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
: U( T! y. w1 k6 ~; F + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;& @9 F- Y, |/ } o
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs + ]( S- C6 D- C% j* o% _0 V7 U
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
( g6 H1 f o, b, o9 O7 b! d + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
6 Q* Q) C. ^4 r8 D K. V- R if links > rechts
i9 h3 w, t& M then& y1 r5 R7 I! S; T/ |; c) X
if @.standort.nf(3).nf(1).leer
4 K: c" v1 U3 d9 z1 g' a9 [ then5 w4 n2 D5 W6 |4 L( y6 C! N* p
@.umlagern(@.standort.nf(3));
- M0 q8 Q- m4 D; C# { else! q- b) y. _0 b1 B' C
if @.standort.nf(2).nf(1).leer
* j. w8 g9 z. S9 U/ E& @ then: A& y1 b) Q x: n
@.umlagern(@.standort.nf(2));* Y0 ^& m& O6 Z6 C8 H
else' o, E$ t! g& t! |
@.umlagern(@.standort.nf(1));, h, r+ f! a7 n7 H
end;* z4 ^% e: O' A9 A+ v* o# U
end;/ L9 _! k' e6 C) B. A* i/ N
else 1 K% C- y; d' G5 \, F0 j7 x7 w
if @.standort.nf(2).nf(1).leer, X, U- P' y4 h! n0 c' k/ W
then. v$ ~- `* T, }, k
@.umlagern(@.standort.nf(2));
3 w9 x9 f' u" `+ Z else B4 u6 b! r) X. m' v3 Q+ R
if @.standort.nf(3).nf(1).leer
+ Y! K, J% ?2 A, t# m/ i then
0 z! C2 T: Z* w' I) ]4 W6 x @.umlagern(@.standort.nf(3));. J3 v: `* f0 E5 ^, M; j
else
\, O+ y% @/ X$ H @.umlagern(@.standort.nf(1));+ ~+ R/ T! t2 L5 Q! e- _# z- G
end;* z! H2 h2 _. W+ H: O% Y
end;( U: k- S. z8 Z4 u
end;
: v9 Z( X6 O6 n$ M- w( n$ o end;
0 J$ z7 `5 i" l2 \8 r' C! [ end;+ \ J% Y: z" {# |2 U
if ?.leer& H0 G. k& R0 L) c# i0 O1 v' t0 B2 z% z
then
0 N$ z" E" k7 k' V7 Z! C& p- N blockier_merker := false;
. M/ x p, U; T. R% e* r/ h Iend;/ ^% m( e- D p, f/ j" C
end;
- G% e \2 x3 d) o2 f. a- c5 y大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |