is4 U3 x$ u( x. r" v. E
local links,rechts : integer;6 V( Z- r! x/ l8 p4 M) z
do
: k& z; o4 _7 y* d: O; l* q; J0 P if @.standort.nf(1).nf(1).voll
8 f9 C2 p* X* q# C9 v and @.standort.nf(2).nf(1).voll8 z0 p& Q4 p. p9 Y
and @.standort.nf(3).nf(1).voll
3 h# k: b( M- {0 W1 B( Q4 X1 I( ` then
. S3 w8 c8 ~" d/ R7 ^) v blockier_merker := TRUE;
6 Q/ F1 m9 x; t+ K4 x% I else
& Q9 Z6 U0 X- J; Y# b$ ` if @.standort.nf(1).nf(1).leer; `. B$ C% h n6 O) r
then
& g" e6 O2 ?4 S* t$ ^) [ @.ziel := "ap4_C";
; a0 y" n7 D1 _( `8 W- r; K @.umlagern(@.standort.nf(1));% z- g2 V7 B: O' _2 [6 I6 \9 f
else8 N; t6 M1 d7 V& ^) _
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs ! q) q' w. |1 n+ L4 S4 r
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
+ A; \- D m- v( d + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
9 x( B. j$ }' f7 ^6 b6 M% q9 I" ^ rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
0 `3 G1 F4 v& @ + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
" g) Z3 O: k* J" G- C3 L, P4 r, o + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;- A: i; n) z# g+ }" ?
if links > rechts ; `% m. z4 X" Y- ?6 n
then
5 Z0 c) ]' S( R7 @/ O if @.standort.nf(3).nf(1).leer
' e; B' F$ d# z( D6 y' f then
4 @7 p4 C9 p' r8 U3 X! \6 N, p ^% t @.umlagern(@.standort.nf(3)); 1 x1 H; b/ l4 {, m4 C( h( q0 U: Y
else
4 z$ }. p* o$ G if @.standort.nf(2).nf(1).leer
6 @6 O/ n/ L2 ~ then
^7 a; {* F' p9 v @.umlagern(@.standort.nf(2));+ H& ~% q2 @0 j/ g! E
else3 b2 @# ?9 X9 C/ m- f/ A/ X
@.umlagern(@.standort.nf(1));
* n6 \. v8 n) P r$ S* n; u: t end;; I: W* `. U+ b0 C, f
end;' U$ J1 _) g2 P5 K
else
- t" H1 w% k8 i if @.standort.nf(2).nf(1).leer" c' O& ?4 Z- n! z
then- x7 h7 X! U3 }- P1 N4 r: w# Y
@.umlagern(@.standort.nf(2));
7 G4 R0 ` L3 `) I. e0 e7 Z2 z else
k; y$ R2 n5 d, u, c6 F$ Z if @.standort.nf(3).nf(1).leer
8 m. f0 T- T8 p: x/ y then& v1 L7 S* S. U
@.umlagern(@.standort.nf(3));
1 O2 g, p8 P3 W% X else9 F1 @2 S; Y3 ?) Z# k2 u! N
@.umlagern(@.standort.nf(1));
3 J7 j3 Q' f) g end;
1 M3 T3 H: C! |5 } end;
! O ^3 O( O$ X2 J4 P. ? end;
# ^+ g7 U2 P5 J end;$ T$ e* V+ E8 Q5 `/ q1 @* j/ K
end;% [( W6 Y/ R( k% s3 f: Y
if ?.leer
; f+ k8 ?* k0 X1 P( w+ J, hthen( g" t8 f$ o6 ^0 l; B" T
blockier_merker := false;
; N8 F; o1 i+ rend;
8 T+ A: x/ ]- N4 Z8 Send;
9 I- T9 g/ K: }1 N- {, t大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |