is; N# A; J8 X: p" G1 R/ _ `% T8 y
local links,rechts : integer; \% f& G0 d' H. F) u/ F* ~# Y
do" ?. H- q6 |$ B2 H* G
if @.standort.nf(1).nf(1).voll% g, }% f) b c# k( A* a2 R
and @.standort.nf(2).nf(1).voll
: Q% f1 M3 z( l9 U! c; s and @.standort.nf(3).nf(1).voll
3 M- D, J. H. i. Y9 G% O0 k4 b then
" W8 F! t. r. \, X, r A# q1 x blockier_merker := TRUE;: i+ W4 S9 p) l& |8 ^' u
else
; J& D! o; t8 L6 z1 t6 E if @.standort.nf(1).nf(1).leer
+ O+ W9 E( G# W7 a6 ~ then ] }+ W( P: m4 X. u
@.ziel := "ap4_C";
* h; I* ~1 g2 ^+ @+ m @.umlagern(@.standort.nf(1));
* ^3 N8 R& V- H else
; y, [ z( k8 R' J! b7 j r links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
& s1 J3 a1 a2 S + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
1 H# q6 y) X$ u4 B( k- @' d" Y + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
8 r( G# u) a! A9 r3 i( s rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs 7 P( h9 R+ Q" ]; z0 U) _/ u: K
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
7 g( {8 m: l# d) ~* O! B + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs; M* }$ `# r0 f! \8 W! T& f
if links > rechts
4 t. P% E8 v5 z8 n/ ? then
, w9 T" f/ i: i* U+ u) ~ if @.standort.nf(3).nf(1).leer/ Z& t& @7 p6 d5 w+ b) _
then9 f7 q, e1 K8 N& X2 v+ ^7 H" S s
@.umlagern(@.standort.nf(3)); ( ^& A4 G, a% i1 x
else
; [' R5 m0 S9 _/ D0 N if @.standort.nf(2).nf(1).leer# \0 l9 @; e! Q
then! J( D# W% ], F2 K! n) Z7 L: o
@.umlagern(@.standort.nf(2));: {- F1 M* Q. @7 M/ ~ O1 F
else
* R7 E9 V4 J8 x; @$ ?0 X @.umlagern(@.standort.nf(1));
! ] p& c0 w6 p! v% [& E" N; J end;, Y$ @( X0 @/ o3 v! \* `5 F. o
end;& o" Z. j; L; W
else 5 `, b7 ?+ U* l2 u
if @.standort.nf(2).nf(1).leer
! e2 G! u# E; H9 [* S then! p7 D% N: d$ m, G
@.umlagern(@.standort.nf(2));
7 f' p; H4 w. J else
( J& Z4 U N m2 c0 L- I- Q if @.standort.nf(3).nf(1).leer
+ g I u' W1 ?" I, [ then
# f, K* M+ C5 r) e8 k @.umlagern(@.standort.nf(3));
G" E8 `7 S ~7 s else
3 d; j% a2 f! I* P8 k0 v/ l) ~ @.umlagern(@.standort.nf(1));, u$ H R5 s) q
end;( \! B, I' c5 B; _' b" u: e
end;8 C- I) k0 V) T. _& c, F
end; ) G( J' w1 e e; S$ f$ |! { e' @
end;
" b$ T7 }3 _. w- i end;
: K2 d A# h; [# A" c, _if ?.leer
% U1 X7 ?# P, z0 @ d" fthen; F! e0 A4 O& o) R2 C4 {! X
blockier_merker := false;) v! ^* p* {. y$ B- j7 }
end;% j; a9 d) ?- O" @
end;
/ ~! R' H9 f2 a# L8 U- v2 ?5 X大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |