is- S8 k! O! a" h* V/ F
local links,rechts : integer;( w5 C! d* ~0 D: M
do" w; ~9 n$ e) g, }: J
if @.standort.nf(1).nf(1).voll
$ s* `( j* @( C2 _ and @.standort.nf(2).nf(1).voll7 {: _1 d- P) w0 m2 s% T
and @.standort.nf(3).nf(1).voll; y, h. m! m; q
then- e/ q9 T% x t' r' |
blockier_merker := TRUE;
: y( R4 j$ y+ ?" Q+ W else
8 j4 B% W; [7 k( c if @.standort.nf(1).nf(1).leer# Q4 N/ r# S. A/ T Q# i
then
+ ~- o" G. N- p$ j. T8 C. o6 D @.ziel := "ap4_C";
7 H3 b; @. y/ j9 m1 h+ q' d1 z @.umlagern(@.standort.nf(1));
0 E, ]% B" {& q/ D else
1 ]: I$ o/ Q a( ^7 T6 w$ N* s6 r links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
) I; {4 B1 v6 I, E% W/ ^; D/ V4 H + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
) v) u8 | Z. ~6 x- \3 ^( g2 E + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;) K; V1 ]3 c1 y
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
! a* n p" u. M* L8 v" \/ R + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
) B' v* f6 |) O$ Y1 u& x + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
) N0 A( ^1 Y% W/ @4 | if links > rechts
8 ]% `2 I$ S' _ K# u& K then$ W4 X: G4 p& E& X- e
if @.standort.nf(3).nf(1).leer# r( m q) W3 C7 K- l
then
* R6 _& V' S2 h3 T& t* f @.umlagern(@.standort.nf(3)); 2 ~+ P) g0 Y( b3 c; I! {! K
else
3 ]2 `# d+ `- j- L9 ~9 l$ r if @.standort.nf(2).nf(1).leer
- s0 [1 ~$ _2 A then
) k4 S% a! l& u @.umlagern(@.standort.nf(2));4 G8 T3 B4 C4 }% j0 G
else
d8 D( `# m' Z* u% \ @.umlagern(@.standort.nf(1));: {$ Y9 }# G' {7 w8 E
end;
1 }# a6 Q1 b A8 L. B/ l" i end;4 i# B) E. D9 C' G
else 5 F* U& C+ x3 K: x
if @.standort.nf(2).nf(1).leer, d& R6 I; j1 G7 r( E9 C
then
) @: }. p. ?' y( [5 ^ @.umlagern(@.standort.nf(2));
: x' V( \: R3 E' d9 s- T. p h, c else6 R$ E: {; t7 ^4 @. `( o
if @.standort.nf(3).nf(1).leer
4 B" b' y6 _8 x then
4 O3 {2 z1 ?6 J# H @.umlagern(@.standort.nf(3));
/ ]7 M! j8 _- ` else
# o' U E% \4 `7 q @.umlagern(@.standort.nf(1));
0 i7 W0 Z9 V- f+ O end;' U, a) l! Z, m" D
end;6 v9 D7 F0 N7 v" C0 c" h
end; x' u" ]% ]4 X3 e8 [9 T
end;
) B' {- y; e; l7 | end;
3 E2 p9 o/ G+ {( ]if ?.leer
! r/ T' |, o3 h: X1 W# w$ Hthen
2 }( L! p+ W# Q* |5 k) f blockier_merker := false;
4 o# P4 W' ~7 C, \0 p3 ]end;' \- e( z7 `+ Y3 i- X ^+ I$ } J2 w
end;) v0 d% |% ]# a/ `5 R
大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |