is% J# }% w0 ?- ^" ^
local links,rechts : integer;
& W" l( E' w; kdo; X, \/ ~! F0 J9 U7 I
if @.standort.nf(1).nf(1).voll
. T! l; l" K7 L3 o9 w" }( a and @.standort.nf(2).nf(1).voll
- Q* L" s; ~& L' [. \ and @.standort.nf(3).nf(1).voll
. {9 n" N8 W5 [' I then" n& \8 J: z% V: m+ F' `/ ?
blockier_merker := TRUE;( e. M' u5 M; B9 M" @" ^
else
& ?+ J; Q. `. g" w$ } if @.standort.nf(1).nf(1).leer
- `1 O1 t" S3 J j9 c8 d5 X, _ } then v3 q, \- M2 }+ D
@.ziel := "ap4_C";1 V1 m2 Y m) f, z- ?
@.umlagern(@.standort.nf(1));) t# ]3 n' W* x& E, z
else
' }4 ~6 i" m% ~4 N* ^ links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs 3 n: z r, R N6 e! W6 t
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
$ C g7 z7 A" w# W7 t( ] + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;$ Q# K" _& X$ [( z4 Z8 X5 G" B
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
0 W7 e$ x# M/ K, _ + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
$ K+ y% n( G! d. ~ + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;- z& R9 n/ |9 p8 @ v. q
if links > rechts
1 X, l: x4 s3 e. y a6 O then
3 o# r- h: |8 i) s( s2 q+ K5 a, c9 M if @.standort.nf(3).nf(1).leer
( C4 ?" ]. Y+ C% U then
H ]4 S; |1 c/ P3 [+ [9 R @.umlagern(@.standort.nf(3)); 5 a" _) _/ I1 i) {3 T
else
k% U6 N8 d0 c( _ if @.standort.nf(2).nf(1).leer3 Q4 A: H v/ _8 I" y' L9 x. `
then
' ~& q; a1 S6 ?1 D$ K @.umlagern(@.standort.nf(2));
0 ?1 a- M1 B: w( x+ B. q! b else" w1 W1 L7 b i
@.umlagern(@.standort.nf(1));
; C6 S( g( n9 U8 ]3 [- P4 Z1 Z, Z) ^ end;
1 m5 z! x# _" ^4 [( |) c end;% A( C% Z3 E D
else 9 A: z1 v( d( R) Y8 p
if @.standort.nf(2).nf(1).leer' e4 a' E/ G8 J: N+ E
then* R3 \( M" M' \- Z; K* l
@.umlagern(@.standort.nf(2)); 2 `6 y5 z. x; H, R* W$ S
else6 B: D1 A1 w9 E" h3 h2 z+ v
if @.standort.nf(3).nf(1).leer# k" v) a% ]1 i, G* u, i- d1 V
then7 B# q! I! ~" R
@.umlagern(@.standort.nf(3));# o! M. O% Q# D) G" F% O( _, B2 P
else2 J$ j: E! A6 y A
@.umlagern(@.standort.nf(1));
h: X, }- D& z3 R' M end;
4 Y3 a! b& b) Z3 D2 `9 ] end;
; g" p. P) P8 w7 z+ k8 }1 } end; ( `% h$ M! d" g# s7 x) Q0 c" W4 D
end; b) C) E0 Q* g9 T# e) A
end;6 r# f' N- d, e" m
if ?.leer
5 ~6 \) g4 }9 g" M! Dthen' R$ @, v& |. V: [
blockier_merker := false;( _. ^( _* w. f- z& G7 J7 N2 l5 D8 m g
end;
8 I1 \' ^( _% `; \end;
. }8 _" d0 P; c2 W5 t* \3 v( x3 j大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |