is2 o7 ~! B8 q8 o3 n
local links,rechts : integer;; U7 g) X$ I1 ?9 e
do
, B/ F H' Q9 B$ a3 B" |7 Y if @.standort.nf(1).nf(1).voll
+ N# L+ b8 }# h8 y( c+ T and @.standort.nf(2).nf(1).voll
$ X* _1 D$ ? M# P and @.standort.nf(3).nf(1).voll5 h, H) i( T O; @
then, w) B* U& i0 ?, B/ m- p; B
blockier_merker := TRUE;
1 T X6 t/ e0 Q4 k else# ^- ]4 o2 ^( S) w) a7 L( g
if @.standort.nf(1).nf(1).leer
, b. s) \& n0 D. p/ l0 ~% }( R then
1 i& B0 U: p8 _3 L: Q+ Y @.ziel := "ap4_C";
# e2 `/ T6 d8 S4 ~) o. v* o @.umlagern(@.standort.nf(1));
* g C& n. S7 t$ }+ V else
+ }0 V+ T X! ^& H% v links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
7 K) m+ `, p0 @* ?2 P4 K8 r1 k + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
6 ?, Z: Q. E/ [- } + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;2 s3 N- L* V% m; }0 E9 p
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs 4 X+ f" |" h: j: Q0 o
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
0 a: [$ x2 v: }- {$ L( C + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
( ^6 H& a1 I( `4 @& v$ r if links > rechts . @3 s2 ^$ J- F2 n; K/ e
then5 I9 n- ?* z0 `6 [; V
if @.standort.nf(3).nf(1).leer
: h: m" b/ V8 R! Q. i, p then, N! N% R- Z( N8 Y) U( ]
@.umlagern(@.standort.nf(3));
4 P- [" ~- H3 F% u else
8 d# H7 E) }$ k1 s7 v% t" \# F: q if @.standort.nf(2).nf(1).leer
& H* y) E3 j" d+ D2 \8 v$ D$ B then
6 d2 S8 l; o9 C- F1 ~ @.umlagern(@.standort.nf(2));
H+ O" p- `" `. Q- v4 p else' M, R* b3 u; ^8 T6 }6 L: ? F+ p
@.umlagern(@.standort.nf(1));
+ L; `( y7 S: w ` end;
9 a$ c& A" P1 c% I; m end; J* a8 P% p/ R W9 L2 V
else
4 W- t' ~0 [: j4 a# J: _ if @.standort.nf(2).nf(1).leer
, r( E7 b. J# u! ~+ s* R5 k then1 D1 h0 I8 M9 x' c" @
@.umlagern(@.standort.nf(2));
' e j( g! t/ j: V; C4 n else B: I4 ]4 N+ Y, E1 K
if @.standort.nf(3).nf(1).leer
3 g) \2 ^& |9 f1 S' s then8 w* p$ D! W8 h+ O* O6 M: X/ H
@.umlagern(@.standort.nf(3));$ o8 ?9 u5 S! \6 Y! k$ X
else
. n: A5 z% o3 e4 ?( i, ?' U9 C& K2 f @.umlagern(@.standort.nf(1));* U( g2 U: a) Z; [6 t. I
end;
. F: D% i! k% o# O/ d end;) n. I. T: W* D% K
end; + w3 q! r& ?$ n4 ]
end;: U: s2 Y/ f% U9 N4 x. D. U0 ~
end;1 } E- s4 e3 }
if ?.leer' A; ]/ O# C) Y3 I& o- |3 Y4 S/ \( @
then( R' I$ N4 C9 f! y0 U3 y
blockier_merker := false;
% v* ?" W* |/ B& Cend;, O* j4 u. |+ ^0 H& L1 N9 I
end;
* a0 {8 ]8 ~0 b; N% J& \大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |