is5 Q* L- ?5 i1 \$ C7 n9 j
local links,rechts : integer;
; K6 t) R0 a- J pdo
9 u/ {( A. ^0 D" W if @.standort.nf(1).nf(1).voll
a9 w! t t0 B! f/ z3 S and @.standort.nf(2).nf(1).voll) T% o3 r3 }, s) P
and @.standort.nf(3).nf(1).voll4 G9 i1 D2 N1 W1 c6 a- k
then
( m3 E8 c. z& l1 f. i# M7 y blockier_merker := TRUE;
- k; a& A7 J! M: B M else
5 V) I" u; M) g if @.standort.nf(1).nf(1).leer
* l! k! f! v7 y1 g: s then
( ~; i4 z" ~* W9 W8 i5 c' z @.ziel := "ap4_C";
- P" _" n5 g6 V& U @.umlagern(@.standort.nf(1));1 G* h" o. {8 e% H% G) r
else4 u0 e; a9 x8 b+ {
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs / M: W% b% u$ c
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs * U0 ^9 N% U9 d: j8 N; Z8 V) v7 E6 U
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
4 N n, @: t: b+ u% m; f rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
|1 V+ w5 v! J8 J6 B + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs ( N% q! F( F0 `( A# U* `' z
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
: D) n) M, V; o' v& O2 s( U( e if links > rechts
+ [. l9 z$ b) `3 D then Z d$ f" L- h
if @.standort.nf(3).nf(1).leer
/ D$ k& a E2 u0 Q' ] then
8 ~- v, v K- U- J0 S: a7 x @.umlagern(@.standort.nf(3));
6 F q6 i6 Q4 W6 [6 | else( [2 \( i E7 ]& }/ g' {
if @.standort.nf(2).nf(1).leer
4 `' L0 X" Z5 k. y$ C( ?# C4 G then
- o, [4 s% ]. A" P* E @.umlagern(@.standort.nf(2));
6 D, s- u; U: ]/ b8 o& h2 c |- v else* i! i3 [# Q' _( \0 E% ]& q
@.umlagern(@.standort.nf(1));
7 Q3 j4 {$ P; k3 H5 |; } end;
: G' C; y D+ D5 W( c( t) O end;
; o; z( V+ _' s# i else
& l; l9 }7 `4 Y if @.standort.nf(2).nf(1).leer( W/ z9 P" k$ K" Q. d
then) X# I% u# f! V
@.umlagern(@.standort.nf(2));
; @# q3 e; b0 w7 q. d else
# m$ V5 q$ |7 _* W0 q3 q4 b if @.standort.nf(3).nf(1).leer
?7 u( T8 [' Z$ d then( z' J/ P( r8 Y5 C
@.umlagern(@.standort.nf(3));
+ Q$ P7 h* @2 C# e else% |" ~0 W0 l' z9 G7 w/ ?# m
@.umlagern(@.standort.nf(1));
; Y% p! g6 x) W7 Y4 M8 i end;
: D! e+ g1 n5 K+ ^ end;% e5 p7 w1 A; s
end;
* l/ y1 U+ j' d4 T end;2 i# m( [1 v& b
end;
; Z* l- S4 E! z" wif ?.leer/ D% ]' ] N) w7 \! ?
then
3 | X; y5 Y7 W blockier_merker := false;0 K7 ^* g Q( \0 o. @: O
end;
, w+ N- f2 `7 O6 m! ]( L: w/ ~end;
, I* ?- M0 [- k1 h3 k' j大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |