is# w2 C" T+ l8 _: u
local links,rechts : integer;
: N- f3 P+ O- S2 j% n G* Ddo( q' Q0 ?# J; d" W9 M# Q; f. O, y$ J- o
if @.standort.nf(1).nf(1).voll
8 Q+ Y w7 p" E7 V' w and @.standort.nf(2).nf(1).voll' W; n4 u5 C/ ?) Q
and @.standort.nf(3).nf(1).voll0 j! d |$ F3 C! D5 ^; U8 z" v
then) M( y' c; \7 O" Y; i7 i" i t [# b
blockier_merker := TRUE;
, f3 W ^- L8 F/ k: ?$ K, h else
! e1 C- c9 Z0 L" |, p5 R if @.standort.nf(1).nf(1).leer
- _5 N3 E: x5 t! |& o: ?* ?8 Q0 [ then
* G" S; T" H M# K @.ziel := "ap4_C";) ] T! V8 H0 F1 B- s& K
@.umlagern(@.standort.nf(1));
( [+ A9 H( j2 j1 j2 g5 b else
% H9 p1 V. i5 R; W" k" X! C links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
" ^, c% z. H* x& n$ d+ q + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs $ I: b1 }" }4 T/ t3 y
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
# k3 S3 M: S$ v. W8 Y rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
) x% O$ K2 D2 J5 ]0 G1 K + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs & S/ A. h, s9 H2 L; B4 E
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;' E* r! c' n; U% W+ p5 e; E | w
if links > rechts / g! y7 }: Q# X) d" [0 @
then) ]' S* T y3 I8 X
if @.standort.nf(3).nf(1).leer9 f& b. ^3 J# `) y5 |& w/ C9 u( \
then
4 l/ J6 V7 \6 [6 S1 n @.umlagern(@.standort.nf(3));
1 C1 x: l! `( i7 F) f else3 g9 q) D& N x3 A
if @.standort.nf(2).nf(1).leer: N0 [" s" f2 q0 \
then
; W6 Q: H% S# R @.umlagern(@.standort.nf(2));3 K/ N- O$ f0 {7 Y
else! X: Z7 P7 T& R7 `6 c) _6 p6 x* g- R
@.umlagern(@.standort.nf(1));
* X6 O! k7 A/ y4 p B1 q" E end;
4 C) V F/ T3 E" _ end;
2 N% ?- j4 S- }" z4 W else
V. T# C6 z% i9 _% t" P, t3 T if @.standort.nf(2).nf(1).leer
/ i+ @3 F' T7 h( i then# s+ a' j- P8 B
@.umlagern(@.standort.nf(2));
. q" l+ E* W6 ^- ^* s% D- | else, {$ M4 t* [* y& j4 q) l
if @.standort.nf(3).nf(1).leer
! j# j7 f' v. r8 {2 J) ]0 ? then
* F: k( R6 O# S @.umlagern(@.standort.nf(3));
+ K2 I2 P( c% E5 I4 I else
( ~' {) B. p( c @.umlagern(@.standort.nf(1));: \, k, ]+ ?9 G, f- v$ o/ H0 z
end;+ V" p+ V( l7 F$ ~- E4 q8 y
end;
& r- y, d' f( C1 V) G end; * T* x$ ?# I3 T: R T
end;% g. i" i7 R+ Z8 w
end;7 ]5 R% [" K2 E# ]0 q
if ?.leer* S0 a8 b* S+ B! U4 u- k
then2 s: d" R {5 v
blockier_merker := false;
1 P' }& m- v* Zend;% g, T1 a* e- A/ [
end;
9 V# C. y! n" q大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |