is, e* o; X. |" d. U
local links,rechts : integer;! n5 \7 L8 k+ z4 `& p
do7 S7 q! e c+ A1 W
if @.standort.nf(1).nf(1).voll8 A. o8 H( f v
and @.standort.nf(2).nf(1).voll
& a. D" j! |: X+ @; t/ f% E and @.standort.nf(3).nf(1).voll% k. Y" u4 [3 ?# P. C3 S
then# Q$ u7 e9 M1 \! h/ M, o
blockier_merker := TRUE;( P3 F+ g; s9 g+ s2 P$ t5 Y k
else
8 M/ B; G. [. M5 N6 S if @.standort.nf(1).nf(1).leer/ B- ^1 O8 `& R' \
then
. |5 } y) v9 A. y! o @.ziel := "ap4_C";
) r: U- ~* H( z! V7 \ @.umlagern(@.standort.nf(1));
7 a- m8 b' ~# I# Z& l else
2 h( t2 @. {/ e+ x3 I4 {* I links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs # j; n/ W. q. I
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
7 R& a3 N |; q( y+ T, G + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
: P" e; J+ @ P0 D; \) i5 o3 J rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs 1 f& r3 I* c4 G* o8 u8 o$ h
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
* k* {6 m( S% c% `( W- J + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
5 n3 o. C* g' f9 ~ if links > rechts 2 S% ?0 R6 x# g \; y- [. m" \
then
) y! Q Z8 k/ o1 C0 G7 I# x0 s8 l if @.standort.nf(3).nf(1).leer r$ c# d$ x/ L% t; `
then! A' i) c+ k9 P; z
@.umlagern(@.standort.nf(3)); ! Y6 s2 k* L, } r, R) H7 i
else3 z. w1 a, P/ ]/ o- P
if @.standort.nf(2).nf(1).leer
; k) |2 Y! W, e then
# a8 N3 H* [5 A3 m4 @ @.umlagern(@.standort.nf(2));
2 x2 n O9 S" w9 D G else. `0 `3 I, F( `8 x2 u
@.umlagern(@.standort.nf(1));
) a* Y9 c! G6 [+ R end;
. o- g9 k& x( K end;: S& U) X/ T4 p2 W, w- q
else 8 c2 j: f) f# j8 B% \' X: F C
if @.standort.nf(2).nf(1).leer
* d6 v) h' \8 _( g then0 t6 D& I! B L4 A2 Y6 N
@.umlagern(@.standort.nf(2)); 6 x( h" | g3 L- V0 L) }0 p0 G3 ]
else
2 Q. ~$ Y- b. P A% `8 O if @.standort.nf(3).nf(1).leer6 ~4 }$ F u7 N( v( J! T
then5 C: E7 E% b5 ? U3 `4 s
@.umlagern(@.standort.nf(3));
/ F9 B1 m' d) @ d! T else2 R& `5 d3 f) o3 n7 k: ~
@.umlagern(@.standort.nf(1));
3 v6 M7 H6 B; A7 H, Z+ h end;) T4 Z" I# N N) z; l- I
end;
1 S+ ^! Z( C- ]$ A' e9 V2 F end; , J9 s2 V' M* [! ?. e3 _
end;
! @/ A: d H" W end;
" N! ^( H3 X3 U( oif ?.leer
) j1 d% J0 @# h2 m/ V$ lthen
- {8 L0 M+ C2 H blockier_merker := false;/ c5 X2 W* J( W n- i
end;6 n0 g( T, w O+ F( L
end;6 E, R: G% X& Z" T# P# a4 g
大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |