is8 r; }1 Y3 Y' v
local links,rechts : integer;6 c0 a6 F+ |) U1 P, A$ t
do$ c0 x! W5 _0 S
if @.standort.nf(1).nf(1).voll
0 C/ F$ B) ` o- ?) X3 R. h5 o5 R and @.standort.nf(2).nf(1).voll6 e) n a: ?" f6 n$ b( U. L
and @.standort.nf(3).nf(1).voll4 n0 J; w- k% N
then( z6 ]- T5 {2 [6 \& y
blockier_merker := TRUE; v* L" m. }9 O- r7 u+ G
else
) l8 S( b$ H( {7 N* a if @.standort.nf(1).nf(1).leer
# u* Y9 v x" p @ then$ f j/ U. n4 m3 N+ t0 [8 x
@.ziel := "ap4_C";
5 g1 e' ] {- Z2 Q) L8 p+ D; ^: y @.umlagern(@.standort.nf(1));
4 @2 I4 c* E/ P$ ?0 i8 K, g) b else) x v6 ?2 v! h8 }
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
0 c6 D J4 t; k, W* e + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs n0 \9 T8 {5 L& U8 W7 K; Z, f) h
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;4 M7 q( @% j" e) r6 L. H( s& D4 y
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs + h( ^8 o/ X, ~1 z
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs % ?& X4 O P: l2 t" @( b; h& b
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;* C/ r+ a) Y, M+ u, a" V* F. u
if links > rechts - M) E) E, \8 @& J9 y) Y1 s
then
4 z7 k6 {* V) l* p if @.standort.nf(3).nf(1).leer+ A- o3 s+ ~# L3 s b* f- o% Q
then
" x5 _0 B/ ?- v' z @.umlagern(@.standort.nf(3)); , n" X; }8 P, t! B& E. K8 q/ r
else
$ `6 p5 m- I3 B; ?7 c1 ^2 g9 a if @.standort.nf(2).nf(1).leer
! ^0 H5 O3 K$ z9 o% X then; Q% X! ]6 h2 u4 I; \9 {6 D% p4 a+ R
@.umlagern(@.standort.nf(2));
2 \3 h" l- A: r& q/ V1 `5 w1 I else' X# w! Z, ~/ E% i+ M
@.umlagern(@.standort.nf(1));2 Y8 R$ o6 ^ T B+ ^
end;
& a( t, l6 C: W# E6 w end;/ [; C4 \; A2 d3 h7 K) L" i
else
+ A) ^# B% T( d) A1 w* d/ x, } if @.standort.nf(2).nf(1).leer
* H3 Q3 {# _+ K# D then
7 t& X% K J! m: M @.umlagern(@.standort.nf(2)); : |' L7 {- L1 Q. J
else
+ u0 W& E; F5 w if @.standort.nf(3).nf(1).leer
0 k( t7 ]2 c' A+ {, f, s( L then+ J; V6 b/ X/ F7 z
@.umlagern(@.standort.nf(3));
2 u B" r* `4 [5 |5 ?+ M i( b else
4 m( G7 [) [/ B% J @.umlagern(@.standort.nf(1));$ ^6 o/ t/ }" G! J: |' W; b2 [
end;/ \1 v: D" C2 B7 ?9 L
end; ]; m5 d5 D# j7 h
end;
' K+ U+ w1 Q/ M9 {/ Y% \1 v end;
7 G" Y. |& ^: V D U2 g5 A end;+ v. S8 y! n. s5 {) K
if ?.leer
' h; `" F4 `( ~then
+ q- w1 u7 }) d) @& K! [9 z: { blockier_merker := false;
2 d- P |% e* T# N# H/ u& zend;
g& r" m7 e( i5 A8 G2 _end;+ k8 }- L6 X/ y' E, T
大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |