is( g; h- B1 `6 G$ ]
local links,rechts : integer;
) a1 K8 ^; H% xdo
: x) f( J8 d( v+ @; @ if @.standort.nf(1).nf(1).voll
. _) y: E3 \; {0 _ and @.standort.nf(2).nf(1).voll
! S# r/ ~9 T( q. K& R9 z0 G2 O* ` and @.standort.nf(3).nf(1).voll
% U* I$ q" _) F* z4 S7 N( T6 V% Q then
7 {/ G' U) A, e% n' i/ L" E blockier_merker := TRUE;1 ~, G- Q/ R. Y
else
+ B( Z! `) Z5 O) ` w8 T) K5 N if @.standort.nf(1).nf(1).leer7 ~- g: G$ K; s
then
" W% u/ r9 ]$ f9 a% K @.ziel := "ap4_C";2 g6 \ w8 m. s/ J! |& P9 ], y) Q, d
@.umlagern(@.standort.nf(1));( E/ ]9 d+ t. r9 r! C9 ~' L5 U
else& S$ A) P9 |3 C m( W) C& q
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
/ c' @$ U6 _. P1 Y + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
4 c+ T5 `' _& t7 F. [% C + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
" ]8 X4 X+ U! A: m; I rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs % e' t9 C' O+ O6 O
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs , E6 J, Z0 {- F# [0 A }
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
4 @+ { G2 l4 B3 c9 {0 [) a) Q0 `+ U) x if links > rechts 2 |* Z5 ]+ V$ h$ \3 W; c4 H+ p
then( W6 l2 k1 g2 l: F
if @.standort.nf(3).nf(1).leer7 u# h" \' J; d% _& A+ H. Q i1 U
then
/ h5 n) k2 e; ]( Q4 ?4 B# w @.umlagern(@.standort.nf(3));
8 C' l% z+ H: c3 }4 @0 H5 @8 n, Q else# G. Z9 @' m, W( |; A: v% J5 R
if @.standort.nf(2).nf(1).leer
5 j% M$ \3 g6 \# m! E then
$ I9 @ j S0 T* N @.umlagern(@.standort.nf(2));3 ~( |3 x3 M% } l( ?* i: v) Y4 Z
else
' v- {. o4 i0 E4 `- T @.umlagern(@.standort.nf(1));, M" t/ Q- k! _+ C% S1 n0 g3 p& a
end;
2 n5 D# R8 F; [+ y0 H+ F+ B% w3 Z end;4 i' a7 ?! d* q4 k; [
else
5 E; | r5 J2 d% b9 N if @.standort.nf(2).nf(1).leer
- x/ B( m6 f4 ^% O1 y$ Y then
3 f& T8 I; z; Q6 `5 x @.umlagern(@.standort.nf(2));
4 w X7 t, J% j; r$ L. C; t else
7 }0 ]/ G- o% H; Y6 j3 i# R if @.standort.nf(3).nf(1).leer+ J' ~9 N4 ]5 v7 a8 b& n9 w' U
then
5 o' e8 v% s& f; h/ o1 ~ @.umlagern(@.standort.nf(3));) x- ?7 h% y/ b) Z% N
else! r* o* X/ v4 R- C' ?
@.umlagern(@.standort.nf(1));
& F# Q4 e) w6 Z2 q end;7 V4 g% y) b9 X4 D: W
end;3 r6 x5 A( I% S/ e E
end;
& a5 s0 W: Q, c" \ end;
6 ^% ~, u; |; w6 P$ e; D end;! @( d7 `- N) p+ w$ ?: T
if ?.leer
: \ X* |6 K) n5 ^' hthen
7 X" \' c, D0 j, y% U9 L$ L! t$ S blockier_merker := false;7 Q7 u5 t& F2 } R
end;
/ T+ j8 i& }* |9 tend;
* b3 ]+ m5 x0 m5 l- L" G+ V4 o大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |