is
1 P, [& M# s3 ]/ K) `6 T8 y# W" Slocal links,rechts : integer;4 Q" j, o5 |/ O
do# G! _) |! L, b6 ?- H( d
if @.standort.nf(1).nf(1).voll
- K1 s e2 q4 w/ G9 z0 t and @.standort.nf(2).nf(1).voll. {$ ]1 Z( N) F: x, r
and @.standort.nf(3).nf(1).voll
9 O+ \( T9 c/ u/ L b5 H# o% W then
2 G" N9 ]. u* g" S9 ?. a blockier_merker := TRUE;
$ m. L+ B' H& v: D: Y: A* `8 i else
* }5 z# j: S. c9 Q if @.standort.nf(1).nf(1).leer
, B; P8 M6 E4 w) Q then
* L$ U# E% B5 R: u. v @.ziel := "ap4_C";
' I/ ]( `* t+ P4 m3 T( w' B; |5 r @.umlagern(@.standort.nf(1));
7 {+ J U+ e" f# B else
5 ^0 ~- V/ `* Q. N* ^1 w% { links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs - A9 S+ F1 R0 @
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs ! R" ]0 U% e4 a. x. N3 }, V0 T
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;- B* {( @$ l6 a( l$ X, ?" n* q6 O
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs 0 x$ W# ^$ f6 N6 x! R! ]* I" Y
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
' y0 G: a2 ]: r7 c + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;0 ?. |& z# A$ `& M; q
if links > rechts $ d" T6 `+ c k, E
then6 P$ T" m9 y# m
if @.standort.nf(3).nf(1).leer( E3 s. L0 \. [, E' G
then5 I, t+ ]1 l4 i
@.umlagern(@.standort.nf(3));
3 x7 T2 ^: A2 ?& V2 X else* S: I, D+ L( t: m5 j7 d2 Q
if @.standort.nf(2).nf(1).leer
& @0 }/ m, ?! V" E- W then; o# @, ]! B8 @5 c* X; ^( T
@.umlagern(@.standort.nf(2));
" Z1 O: ?+ [- p+ H1 D. G else" o6 h9 |- e$ N6 R
@.umlagern(@.standort.nf(1));
; r5 `- x% e* K end;/ n8 H( \) Z7 Q) K6 f6 K: h
end;5 L W7 H) _+ S6 N
else
4 Y& y. J X( ^4 n2 o3 V a if @.standort.nf(2).nf(1).leer
5 Z- `+ ?* \8 S2 i& ^; V# H then' @+ c/ V3 S! I" K, N
@.umlagern(@.standort.nf(2)); $ \7 L q/ W0 t
else
5 h& L7 m3 E5 o' s: c' W if @.standort.nf(3).nf(1).leer
- V9 E) {; |9 g/ M3 J* x then3 ^, z- U4 p) c
@.umlagern(@.standort.nf(3));
7 M8 r6 ^" p6 e, j+ w# m& K else
& E( Y7 W- I9 K9 }- S @.umlagern(@.standort.nf(1));$ E/ @9 R/ n' I
end;- E% h$ D; v' G1 I4 Y5 l
end;8 s, G: G( b/ y" j( r- B0 ~: R
end; 9 O9 R8 ^6 U: x1 }5 F( T
end;
0 C6 f7 S. {+ ^. D! g! \' H0 [ end;3 Q1 a$ l& @& P
if ?.leer2 K6 F1 [$ h& w: w" N" q
then+ o* j9 Q3 z% a. r2 P* y# R( ?
blockier_merker := false;
) b; l- M: R, k8 `end;
5 Z7 x9 Y! S$ T: `8 l1 Z3 H& lend;
* `3 {4 J/ B) t. _* J$ i0 p9 v大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |