is/ g. Z/ R' Q% |2 q! t
local links,rechts : integer;+ |( X' n' s: R; Z( b0 q- }6 N
do4 A& `! C$ m2 [9 q( F( ^
if @.standort.nf(1).nf(1).voll0 h. W4 @, T0 z' H8 E* _$ ~
and @.standort.nf(2).nf(1).voll
* q% [# [9 [1 B; Z$ m/ H/ I and @.standort.nf(3).nf(1).voll
0 |- ]0 i# x! w/ g then
! X8 G9 c* U( w blockier_merker := TRUE;
: i: A# `: L. }, t; u) S6 i else F: x" @# { j% W" A0 n% d
if @.standort.nf(1).nf(1).leer) `1 ?3 _9 \, s' }* p% {2 R
then
7 B- W4 r* e; [3 \ @.ziel := "ap4_C";
* U; G- E& |& W I- A1 F @.umlagern(@.standort.nf(1));9 E. f, l3 q9 i1 ^
else. A# a/ K" ?! e+ o6 m' s
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
$ o) s9 y1 z$ k( X9 E6 X) U + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
9 {; ^! s. f5 s$ w + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;- n5 P8 S, i" c* q( s0 \0 J: g
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs $ Z$ C$ `$ A0 c* p0 E; e0 j! {5 N
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs % y$ v. f; C3 j7 N3 T
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;8 r4 g- u+ @( V
if links > rechts
; } U+ H' W; W then& o% ^5 |0 _: d m( m3 ^
if @.standort.nf(3).nf(1).leer p5 {; k# G2 ~% I: R4 P/ U
then. B( y/ z% V7 H2 p3 k* ?
@.umlagern(@.standort.nf(3)); * C7 }) p: z0 x9 M
else
+ l8 \) F( M( C; j' R9 ^& P if @.standort.nf(2).nf(1).leer
* _: |+ x, `7 d c: @9 M then
( v5 o! [' H2 t+ m @.umlagern(@.standort.nf(2));
8 |& D7 a* y+ h: E. g; |: t. L7 l else5 }4 M8 s$ Y X, f4 Z, M& l
@.umlagern(@.standort.nf(1));
6 p6 F. p' y3 G9 C; @& k4 P& u end;
( M2 Z+ k$ D% @9 @ end; |3 A8 v% J# Q: u
else
: C, v& T$ ]" g; I) T: {" n* \$ y if @.standort.nf(2).nf(1).leer2 C+ | D! x" b7 V/ S: P% _
then
, M3 K6 _$ W5 _* n @.umlagern(@.standort.nf(2)); & J+ }. e4 } K. ^3 S8 e
else
8 c4 H$ Z8 V5 F& v6 V* l" K if @.standort.nf(3).nf(1).leer& B6 F* O1 Y% U: F$ j
then" y3 ~) t; _; f1 p* E- d! {
@.umlagern(@.standort.nf(3));
5 C! r" I4 h7 f- j$ P% M else. Y: `6 z. m4 n" p3 M
@.umlagern(@.standort.nf(1));. n3 j) {6 N1 x! C/ Y
end;
* |# V! n1 j8 r+ P5 |2 T8 L end;
% j3 i' e) [3 C: v$ t" i- ?) p end; 9 B9 L$ E2 K( h9 X' d
end;& k7 u, N( s3 V$ N5 U
end;, r4 R, {* f4 J5 t
if ?.leer
! i8 \- t+ n' ?7 m( \then
3 [9 w6 ?5 @1 j blockier_merker := false;
$ k% E- @ a+ p: C3 Iend;
$ b, @* B0 K3 U- j ?3 Q" j5 [end;
0 v: |0 F- o# c大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |