is! C! r4 B! Q6 j( ?. m
local links,rechts : integer;7 U0 h7 `5 A+ S; Z: D* `
do& }/ N; E: O8 c1 D9 c$ @; W4 X4 J
if @.standort.nf(1).nf(1).voll/ n0 s9 |2 n( h4 `. [7 N
and @.standort.nf(2).nf(1).voll
- r( s% Q9 Z+ h& x; t9 n! B and @.standort.nf(3).nf(1).voll
T ~9 U* A4 x+ |+ h4 t& _ then
9 L/ ?, i! p y4 u" b2 |) a blockier_merker := TRUE;& s# l9 S3 ^/ c) e$ w
else
, c& @/ _3 E5 j7 K6 d( L, Y if @.standort.nf(1).nf(1).leer) y) } h& O$ B$ @ E0 C
then
: `/ u5 K0 `0 y7 T2 p: j @.ziel := "ap4_C";
1 v6 ]1 L1 d/ }6 h3 p$ E @.umlagern(@.standort.nf(1));
- m" n* h& ?- |! i- _ else$ R4 X" t: r% v8 B6 ?
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
. A& }1 d5 V9 ?4 {/ L + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
8 ]7 }; ^# @/ Z& z + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
+ `, R) x- S# ^ rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
9 \( C. O1 W: \- O+ t+ {* J + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
& Y4 S$ ? a' ?& U3 c- I4 t + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
, [; k2 b- a5 ` if links > rechts
7 a/ S+ x' k" e/ o; Z$ `, |" k6 D then
4 x7 \& x0 r$ G5 P. W. Z2 k if @.standort.nf(3).nf(1).leer/ {- s# S- e4 |0 `8 |
then5 [ d, i+ D0 L
@.umlagern(@.standort.nf(3)); 1 O, {1 [: O% D+ e
else6 u. A2 P: Y2 M5 Q
if @.standort.nf(2).nf(1).leer3 \% p3 A8 d7 n7 L7 j
then1 q* |" d; I+ V3 L4 H
@.umlagern(@.standort.nf(2));3 L) X5 B9 B3 T" v" }( P
else( c) g, d0 n+ J7 f6 }1 l' e) R
@.umlagern(@.standort.nf(1));2 J/ w( [4 e' d$ X+ d* o
end;
! K* E9 H3 ?/ D2 k0 g h' M, n end;
7 N5 n! T m! J( g; H else
) p1 u7 H# z& ~. K if @.standort.nf(2).nf(1).leer9 ]5 U" P/ C& \; e* S
then3 s0 c6 c' [. n0 i* L
@.umlagern(@.standort.nf(2)); ! N; o, c- W! I( w# ^7 g
else
# j7 w X5 V5 E2 b if @.standort.nf(3).nf(1).leer
9 a7 Q# I7 U9 l$ N! L1 V1 H then
' T9 C) C6 q) S8 F @.umlagern(@.standort.nf(3));
! o# x4 Y; C( s+ n/ \ else
+ r; T V4 x' a+ I @.umlagern(@.standort.nf(1));4 X& d) M) ^% A* ^$ E; x% `
end;
4 W1 M1 h+ m6 |4 X( Y end;
0 p) ?% f/ Y( p) v! A& m7 z% u end;
8 p$ p* n. f* Q) Y end;
, F. o$ w6 r& d( R8 |" N, V' P end;
2 G( l! h: ~- G5 y- b7 Lif ?.leer) h* q! P5 n% d+ G+ g
then- W& p) x; f; t s
blockier_merker := false;/ Y( t+ T0 f; a. H4 ]! B" x
end;
* K- ?/ M. Y5 c3 ^5 s) F9 W S& I; vend;
6 D" A/ A( R) Z& w; u! _# g大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |