is2 |" M8 p/ m' _
local links,rechts : integer;2 W+ t4 G- b# o% c$ e
do% ^6 b& A* |$ r: ~
if @.standort.nf(1).nf(1).voll2 e% R. |1 a+ V5 |* c1 @- I
and @.standort.nf(2).nf(1).voll
& }6 J) w! h: G2 ~ and @.standort.nf(3).nf(1).voll
6 d1 ~. R5 z! n9 L. Q then
2 q5 E- {+ ]/ X5 z& M" `* y8 w; V4 y blockier_merker := TRUE;
+ d: o, P, G! k& \1 ? else
& L1 U9 c& ^: W- y8 C* E; z if @.standort.nf(1).nf(1).leer
W8 o J* H0 ]# k2 h then
7 C! w9 ^1 Q8 \$ _( Q; | @.ziel := "ap4_C";
6 \3 L) [6 E6 \6 H' p @.umlagern(@.standort.nf(1));% ~* R& G0 L$ p4 T* F
else
" }/ D5 l+ [1 a& y# h$ y& w links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
4 O$ I8 F- l1 v7 ^$ } + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
6 V$ `0 E# \, W + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;: q& v! }( ?+ H
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs 5 w! w: d4 a. C
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
1 q+ S5 H7 S7 Y, X" ~3 |% N9 W: _( T1 \& f + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
( P% J5 v$ m( u' u if links > rechts . U( J% ?3 k+ n2 O/ U5 q
then
7 \6 n: ?0 ]5 D7 G9 s3 F" d if @.standort.nf(3).nf(1).leer
$ t2 s$ m5 L4 r* l; X4 _ then
, {0 N9 p3 g+ R; T ~' ` @.umlagern(@.standort.nf(3));
" l, U" J4 Q0 [* E* h" A else
0 G* z, n6 H: m8 r if @.standort.nf(2).nf(1).leer* c* V8 w4 D: \& Z% F4 g6 C
then( M7 l- O7 c' y
@.umlagern(@.standort.nf(2));
k; j7 I! y8 [, H: w1 @9 @4 T8 Z else2 J4 Q- U p5 Y9 D7 b5 f! v3 @
@.umlagern(@.standort.nf(1));: q; e, l0 t$ H$ L H% F+ i
end;
% O1 B9 e' x; K+ b" T; g" p( t& y2 w end;9 {$ r9 G! y. I0 t: G
else
\; s' ?2 e) x1 N if @.standort.nf(2).nf(1).leer# D, s* X$ e- E& t4 u; o
then
1 F8 p/ ?6 M$ J! F; e, _& Y7 { @.umlagern(@.standort.nf(2)); ' A5 M. g' S7 D( q
else
8 s- q5 {( B* [- R if @.standort.nf(3).nf(1).leer5 [( m! c9 k' _/ y `# e- ?! D
then% [5 M! y" b/ q; {" |
@.umlagern(@.standort.nf(3));+ w9 n. l. r1 `* {3 \
else
. O5 d: b" W) K+ {6 j$ K @.umlagern(@.standort.nf(1));
2 ~9 t* `2 F- `2 o( x end;* j& t8 A7 \ C
end;
2 X1 y" f/ i. c" r( k2 a: V. G end;
8 f) c/ c+ f z end;
' [& [8 P, [6 I( D' j; z. \7 d5 O end;
: @' P2 T0 Z9 aif ?.leer/ q5 W' f& Y. Y5 ^
then
6 H! @( `. @6 m0 j& z+ ~ blockier_merker := false;
5 R9 H2 q5 }8 l3 r% f( zend;
' n( J: t7 `: s/ h! ^5 `+ }end;
) V0 X$ b. u. j大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |