is- ?/ I8 C& m+ L
local links,rechts : integer;8 L1 z/ E; O+ R+ @% Y* R- q* X1 V0 S/ Q
do
( n* r- @2 h' Z+ W if @.standort.nf(1).nf(1).voll. l/ I0 _2 B3 O5 N
and @.standort.nf(2).nf(1).voll. a: n8 L+ p, a: J' I2 y3 _5 ~! a2 `
and @.standort.nf(3).nf(1).voll9 o u6 M4 ?# _: F1 r
then
$ D- h3 T" b9 z. H: o# A' d blockier_merker := TRUE;# q2 R' u0 A7 E5 d
else
7 K! v8 v9 r. }0 l% [; m0 k if @.standort.nf(1).nf(1).leer8 U5 s0 P, V2 N I: Q+ j
then S0 x5 G0 E* I. n0 J$ \5 u* S4 E/ ?" U
@.ziel := "ap4_C";
- `" b7 E' `, ]6 [, ? @.umlagern(@.standort.nf(1));, ^; Y* u* C; \# y; b1 s
else
5 a3 n6 d0 f2 }9 L links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs $ ]5 k6 d; H( E1 Q: E" o1 B9 D; R
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
2 L8 E9 @! q. p3 f0 K + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
: U! Z# R# E4 @ Y5 N, S rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs 7 m) }% @0 r4 u8 K5 D/ i
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
8 [: r5 w% |& L8 `& O + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;: M! P' L- X+ Y8 T2 g
if links > rechts % \. ^! V% u1 o v. V" V
then
/ i' v' F7 ?! P/ ^3 R if @.standort.nf(3).nf(1).leer" M) [9 w* ~! N* `
then- V" w4 t B, R( y. R
@.umlagern(@.standort.nf(3)); % y8 q9 [/ q- z- \+ l
else ^- p% u7 e- n/ m) g8 K6 @+ Z. f3 v
if @.standort.nf(2).nf(1).leer
( \3 K8 M7 p; M7 \& r6 o! Q then" Z5 k( ~6 |! ~: i8 Y
@.umlagern(@.standort.nf(2));
( L1 y8 }: q1 L- _4 d0 K else
0 d6 p) S* ?! _) r @.umlagern(@.standort.nf(1));. n" Y; b+ q% ?* l) q
end;
' s. m0 x" Q3 A& f* u6 m end;% D$ z* _. s! [+ G! C6 i$ o
else
* x: a! a8 r7 m0 B9 F if @.standort.nf(2).nf(1).leer& x. O! m0 z) ~3 L5 G
then9 Z6 F- _, T- y0 ~3 u1 r
@.umlagern(@.standort.nf(2));
7 L" M. r$ y* V% Q' V; e7 K else
4 H' |: G% x2 q9 M' x5 Q if @.standort.nf(3).nf(1).leer
' C3 a* a! O( q; T# s0 i then
" b: m0 ^& p7 N/ l3 ?5 U @.umlagern(@.standort.nf(3));% r4 X. r1 @$ n& a5 E4 }
else
2 [- ~5 W+ x5 Y6 M1 S8 r4 D @.umlagern(@.standort.nf(1));3 t/ U: D: g& ]. N
end;
3 j* f5 M9 D% y! o end;
5 W; ^9 ]2 f0 e$ Q end; $ J! [3 l6 Q; D
end;
V7 o* h8 ?7 x% p5 c3 Q y end;
0 \# `/ S7 m. E; C# Jif ?.leer
& u6 ?/ B+ W8 C$ ^then4 O$ b, B" F* ~; G% l1 b7 J
blockier_merker := false;
3 N) Z3 W; E' P8 m) gend;3 v' \/ P2 R: u j
end;
" X4 ?3 X0 Q1 Q; b: {6 ~大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |