is$ G8 }6 F- O& m0 p K
local links,rechts : integer;& {, Y; t1 x2 J8 {
do$ r4 x2 y; C, M- h
if @.standort.nf(1).nf(1).voll
. L4 \$ {8 C6 h+ O and @.standort.nf(2).nf(1).voll, ~7 b/ T$ k. I1 w0 _1 Z. _
and @.standort.nf(3).nf(1).voll
2 w# ]7 F' R0 \( P. B* c# ~" B then
/ X" E1 e/ `# S5 z7 e: b blockier_merker := TRUE;! r! t. ^ D. P8 m' M; z: N w% y# m& V
else8 U5 _* l- j( _: D6 j! ~
if @.standort.nf(1).nf(1).leer
8 j1 e+ {/ }1 J* l: Z( c' j$ ?6 d then* w t2 A# I% _5 V% d" ]4 P
@.ziel := "ap4_C";& T7 R8 e4 C' g O" P( x
@.umlagern(@.standort.nf(1));
K+ M- X$ m! H0 ~6 x1 o% s else$ a6 i, V6 T, t% b
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
6 b6 o4 U1 ?3 R* D( B6 H + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
9 E" @( R v* M3 n + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
+ {5 J( \2 Q- T" v+ l" @& N rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
9 E& [1 b" \; B5 { + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs + W7 u5 v7 o$ q% d* a
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;# V( _. ?9 _# E0 A- O% ^& W! y7 N' v
if links > rechts ( v* z3 Q6 n0 C8 P. D
then
' I5 d# W, g% u6 k& e3 F$ |, V if @.standort.nf(3).nf(1).leer& }& f% Q0 B- |; H/ z
then8 t o, H# `0 k3 t8 g" |1 b
@.umlagern(@.standort.nf(3));
9 D! e8 u5 C/ y7 { else
7 N K6 L, G R- `0 N8 n if @.standort.nf(2).nf(1).leer
+ E) N5 F% z8 i4 E+ r then
8 |. C7 J/ x/ A @.umlagern(@.standort.nf(2));9 Z- k; o: T. |* [: g% \7 H
else
* Z7 ~/ k, |3 @ @.umlagern(@.standort.nf(1));
& T) ?/ V" L y$ Z: S+ A end;, ~0 U( t ? q" ]) ^ m! z
end;; j/ e; S5 `$ T: K5 G* }! |9 v
else
' i' j) ?3 X' m if @.standort.nf(2).nf(1).leer
' D$ O9 l: W+ g1 ] then
2 A4 y% w, z% M4 p) G7 c+ ^) C R @.umlagern(@.standort.nf(2));
( }! \4 e/ o. t: S2 J% f else
7 X2 d n' P- D if @.standort.nf(3).nf(1).leer
: H; w4 I1 n. F( q% r3 } then
7 ~- P( [& v: i3 L0 U. e1 e @.umlagern(@.standort.nf(3));
- ?$ l- G: C2 g/ f else m. }/ O. ]. y$ z
@.umlagern(@.standort.nf(1));
+ J4 D1 ~. x8 B9 l, X end;7 H3 S' X" l" S' Q
end;
' V. U2 j6 M5 H6 D# p1 k K end;
' Z) I/ w3 {2 r/ P3 m! y. p/ L9 |; U end;8 H! z7 V2 u7 m/ }* G
end;
$ A' s( d. s: C9 L% ^if ?.leer
( P3 H) X7 } V5 k Z% Ithen
1 X8 I; \/ C) d/ v2 Q2 y blockier_merker := false;
- V' L9 j4 z1 Z9 `end;- I5 l/ x$ N0 |# w5 X& f
end;
& p6 E- |+ G* _. v& i大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |