is* q E% m) t# L! b+ i# t
local links,rechts : integer;
/ }! Y. b9 f) H& ado
1 x% U: e/ W- y- n2 U2 a* O/ | if @.standort.nf(1).nf(1).voll
8 E' ^2 y4 y' Z1 f$ v and @.standort.nf(2).nf(1).voll% y7 i5 B1 J) p% C! v
and @.standort.nf(3).nf(1).voll8 y* @6 e0 }/ A
then
7 [5 @+ W, Q$ p/ e [ blockier_merker := TRUE;' Q& k) v6 @" T7 j g; ?% |6 @* ]
else: U+ p6 Q( m& H9 I8 i, Z
if @.standort.nf(1).nf(1).leer e, L3 g: @ k5 _ m
then
4 {! N5 k6 }+ a' b- L2 k G- Z @.ziel := "ap4_C";
. q. r" O( H' ^6 O. [9 f @.umlagern(@.standort.nf(1));
% t" o y$ k2 }9 P else
* s. b- Z% |: p( u( Q. F: @ links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
3 T* S8 D4 N; Z# | + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
* W5 ~# M0 b; n: O + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
" _" J; q% \* Z: Q2 Y# U rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs * b; }" W0 U6 T& H
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs 5 q6 E# x. ]: A9 J6 r9 f
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;% E5 w9 x% s; I. l/ C
if links > rechts $ M1 A( ^; X+ S" }/ A0 n: U$ Q
then* ^* v! j5 l5 t/ i$ h
if @.standort.nf(3).nf(1).leer
) _9 n% Z# n e2 ?2 b/ q* v then3 }/ R# w. K3 [9 M3 ]5 A( o6 R
@.umlagern(@.standort.nf(3)); + u8 w t% d; Y
else5 Y7 U) d" T; I/ D0 N1 E$ M
if @.standort.nf(2).nf(1).leer
& k' [8 R0 W, S* ^/ M7 x then1 {0 R% U/ t" P; Y" |# o2 A
@.umlagern(@.standort.nf(2));
3 g( E# z. t: g7 ^ else7 {! h% ~2 Y+ U4 O# ^# g8 b: c, u
@.umlagern(@.standort.nf(1));
% f6 X( ]' Q1 b: ^. K end;
. z& o* [/ F9 q: u* D9 A5 g1 ~ end;
* n( E! V7 d, V! w+ D else 5 E3 A% t% L4 @( ~) ?8 ~/ m! a2 V
if @.standort.nf(2).nf(1).leer0 x/ k# c. m( r+ q8 l" [. D* w
then
4 Q& i( ]' W5 `! s @.umlagern(@.standort.nf(2)); ) A/ R2 r5 V7 c8 f0 x
else3 o' Q# h; u5 n* ~+ n9 K) i
if @.standort.nf(3).nf(1).leer
3 b' G+ Y/ X V* j) L. [ then
, B% Y( I2 ~& c" }' _ @.umlagern(@.standort.nf(3));
* \, S' Y3 E+ _' o. C" V1 I3 a# t% h else
( p' F+ d! k$ D @.umlagern(@.standort.nf(1));. N) Q8 W2 p. Q3 ?$ Y0 u% v, V
end;' W) p* D0 M$ m2 E6 b* a
end; f5 e/ [/ K* x; V8 F, }* D
end;
% l7 }6 z: q, O+ ]7 e end;) f5 t# {8 L5 K: O& m' K1 z
end;
. T6 [( G7 e; A9 L1 Jif ?.leer
+ K' |+ ?1 S! m* T( x* s) S( z0 othen/ E9 R6 U0 v+ s" \; B9 ~
blockier_merker := false;: L& Z2 p! t/ Y; w$ l/ e
end;) n4 d5 c7 F, c' h
end;9 a% x, x# ?' J' x
大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |