is6 N* d5 L' S7 }% K# H
local links,rechts : integer;
* [: @/ s5 ]! e# Y& A" ldo
6 [4 `1 Q* i0 |0 R+ }' x) m if @.standort.nf(1).nf(1).voll' \4 P3 E0 [! ^+ _ O# q; D- c3 Q
and @.standort.nf(2).nf(1).voll: z4 X1 w4 x8 ?; c$ F# ~7 I1 X- N+ G
and @.standort.nf(3).nf(1).voll. T0 C4 I4 B, u% f) H
then
7 P8 z" w% Y& O1 p* B% f: j blockier_merker := TRUE;
1 ?8 w* c/ V8 ^/ _. t2 [ else. P4 q6 w- V1 D4 j( ]) @4 g
if @.standort.nf(1).nf(1).leer$ T: b3 T3 U) D3 @/ R; V
then
* y. ?' J7 C& X# @7 O" m @.ziel := "ap4_C";0 h: X. v/ x- l- z: Z+ C
@.umlagern(@.standort.nf(1));
9 _ e( [/ v% j1 T4 ` else, h% Y/ J8 ?0 \- u) i- h1 Q4 b: ]
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
" Z6 q# R3 d& h# X) T d + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
) R% W1 _! H0 c0 }! a6 t' x5 Y/ @ + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
5 K0 S0 v# ]5 V, t6 X) E; b rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
; F# t7 U l" @- S9 X5 Y + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs : C3 c, i$ H$ q7 A _
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
2 o% ~& N( x5 E) N3 a if links > rechts 7 ^- a7 L& U, W$ u1 [5 ]$ Z4 s/ G
then
/ z, e# y C* q! h/ S# Z$ s, K if @.standort.nf(3).nf(1).leer
! v/ k& N9 H3 Q' a9 ] then
; u/ w% z }8 `3 P @.umlagern(@.standort.nf(3));
' d& @7 ], l( a, b# [ else3 n# @5 n, i: B
if @.standort.nf(2).nf(1).leer
" X4 N2 I; V( a. h% J then4 P5 ]! a, Z+ ]
@.umlagern(@.standort.nf(2));' ?* T' G* D. N% }8 w# V! s; m
else
7 S' V7 {' Y0 t# v0 T% C+ \ @.umlagern(@.standort.nf(1));2 f# c+ ?" {- s8 ^/ H8 H; i. }
end;
d# v, F2 U8 N U) a+ {6 f end;6 n7 X" x- C& x+ b3 R
else
7 r* ^+ T) ]3 o& `% t if @.standort.nf(2).nf(1).leer4 A9 Z+ h5 I, A$ G! w
then
# T* z @% [, O( V* v @.umlagern(@.standort.nf(2)); + h. t2 W' {% b4 a# f" N* V5 k
else* U/ }" [6 M) _$ ^0 J; U8 }3 M
if @.standort.nf(3).nf(1).leer
# q. |; Q) g# c* f then" G; w+ W$ b( F0 b
@.umlagern(@.standort.nf(3));8 |( z( W4 y9 M" X
else1 {+ m, J& q3 z4 Q" d
@.umlagern(@.standort.nf(1));3 D+ W1 B5 i& [. ]7 m5 ~# P
end;, ~. E6 U& X& t6 y8 o# G: K! a f
end;
; n5 T! {# `# i W1 G end; ; S) F4 ~; A# o. X; H9 I! a
end;* A$ a3 g+ @# T O
end;
$ \3 N; c' S. Y7 @# F5 pif ?.leer8 k6 u' P/ a S3 t% C
then) k4 b6 N5 R8 s( Z" g1 p
blockier_merker := false;# k' n2 c: M6 p+ t/ }1 M
end;' ?) G6 a+ M9 k; A
end;
# R6 M/ j9 l3 n/ `$ J+ \大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |