is) F+ }; A% e/ P+ L) x) ~* x
local links,rechts : integer;& G2 M' c9 N; N$ a' h# W. S7 l1 d
do& y( J# E1 n, }0 c+ v' k$ U) H
if @.standort.nf(1).nf(1).voll
5 S/ Z: L. B. ?% |6 f+ U and @.standort.nf(2).nf(1).voll
7 b2 f+ s3 Y: w B& l. M* ?$ f and @.standort.nf(3).nf(1).voll/ M! a& t* `4 H3 X: g% Q
then5 T" u; i! `% h0 G/ X! k
blockier_merker := TRUE;
" g/ k( S' k* ]" U$ w! j) E, s else4 Q. _ A! q! d) u( x5 I
if @.standort.nf(1).nf(1).leer; Y. P' ` S v. ~ z
then, n8 H J2 z- W0 @* M( L
@.ziel := "ap4_C";
8 v4 \. d; h. {0 X2 P! h: s. y5 x @.umlagern(@.standort.nf(1));
/ s, W" t; O2 C9 h& t z else
( }2 m; m+ s. m links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs c* q- H2 M1 o6 |- i: T
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs ]* u$ k7 k& d$ z- L
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
9 T; n k5 W# P* b. \; S. R6 R6 m6 Z rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
/ r. @8 Q& t7 e/ U/ V: {' W + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
8 s. F Q3 M! C0 M + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
9 Z7 x9 v9 N! f" X# H% ^ if links > rechts 8 m$ X# W6 y( v# I c6 ?* U
then0 m# Q$ r' o. n5 R$ x, L
if @.standort.nf(3).nf(1).leer
# E) x+ g5 u: v$ ^' F$ s& l then
$ ?2 W6 X ]# c- c z+ F) i. T* n @.umlagern(@.standort.nf(3));
7 z' j6 V c& T3 h6 ~: N else
- x5 k: v/ {. S) f0 w( D1 X( o- l0 e if @.standort.nf(2).nf(1).leer( n$ P+ F! v8 `+ T) R/ f! D
then0 D4 Q( u9 I2 M% `1 T8 p
@.umlagern(@.standort.nf(2));
8 v% ?5 i% K' @2 U% w+ S else' U9 F3 ?! i7 [- k" f& a3 l
@.umlagern(@.standort.nf(1));. g" v* n. V2 H* M+ _! ?$ r& C3 p
end;
s. J6 s( e" D" K1 w9 X; J end;
/ N1 G) w3 T2 b+ I6 O& C else ( i$ I3 K0 p, k
if @.standort.nf(2).nf(1).leer
; p9 @( O6 T+ T then
; ]. E2 d8 ^- K. q @.umlagern(@.standort.nf(2)); : f' N! [. h" i+ g# X
else
' m% f0 s+ m& B+ Y if @.standort.nf(3).nf(1).leer
* J% m$ Z6 u+ t8 t+ U* I; N) c then
3 ], R# \4 _4 C: D7 a @.umlagern(@.standort.nf(3));
1 b7 ]) X: m* x1 g8 k else
! @& j, o: \6 K7 ]1 L X @.umlagern(@.standort.nf(1));
- K! g2 a1 G6 ]0 Z; t c8 d end;& E0 ?/ o0 t% o# c
end;6 B) K; ], |$ E4 \% C. T* n
end; 0 ]$ y( k3 @3 r% V5 M
end;
9 x% ^; L' Z. g; k end;
. G: L) T ?5 P- zif ?.leer: b' G% Y% m6 }5 v2 T9 A9 ]' f- G7 J' F
then
+ j/ w& a5 h M1 }1 Z* b blockier_merker := false;
- c1 A! y7 g' d& d& `3 V: Pend;5 L; {4 d' T. ~$ j
end;
1 g+ t* Q; Z* O/ W K; w, g大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |