is" D7 _* g7 N, @* H* z2 Y- ]
local links,rechts : integer;
8 w7 _: H5 O8 U! @do
- Q8 g$ q3 f. Y- P+ X/ b+ a/ ~ if @.standort.nf(1).nf(1).voll
4 n) T3 l" x: m6 c3 \3 U and @.standort.nf(2).nf(1).voll8 o1 ?9 u* F% r7 k
and @.standort.nf(3).nf(1).voll
- Q: Q1 y* o7 ?6 \% x9 E then' K: y b/ Y0 S) }9 f5 e; y
blockier_merker := TRUE;3 T" Y+ ~. a5 J m. Y4 r
else
- ?2 @7 R3 d" v; e. G9 `, c6 m3 ? if @.standort.nf(1).nf(1).leer
0 W) f- v& O% d0 D; O then0 a, B3 F u0 \$ \4 v
@.ziel := "ap4_C";
. I; T$ Y/ h) N e @.umlagern(@.standort.nf(1));' F3 M/ k: K8 b/ [8 m; V+ p/ Q
else. B1 t9 r% X7 m. c4 r; Q
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
3 V: x# d; P$ o) @3 I! u- S + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
2 _+ V" g) {, M) u; V% Y. o; \3 U + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
0 I% C9 t" l. S& g+ J; z( u; ^! T rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
/ }+ t4 r2 D* o1 j + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
) ^8 K0 d1 R. u) p1 N + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;; K5 m. f* _* ^- n3 c: F0 e" S; W
if links > rechts
( k2 s# B; y5 Y0 M, i2 J then6 M3 z' }8 h/ K
if @.standort.nf(3).nf(1).leer
: C7 L3 z" H& e: n9 ~& j1 ~ then
6 d. _$ @& H, y) ~# V9 H5 U @.umlagern(@.standort.nf(3)); 8 ^8 k# G( Z# P7 T( A
else$ Y" l% o) e2 g6 i
if @.standort.nf(2).nf(1).leer2 }$ W7 l& G. U
then
3 [5 I; y+ S' j) f. M- ] @.umlagern(@.standort.nf(2));9 g% A- ]+ O; M
else
: O! _' E$ f! v3 Q5 D1 K; ^. \8 g @.umlagern(@.standort.nf(1));
; E) m' p: g _ i7 m* p2 O end;
" b$ y' d$ |* |% D# S* M0 w end;
2 ^; r1 L5 e U. }8 u else
0 P& s5 Y8 _/ ?3 Z8 t if @.standort.nf(2).nf(1).leer
% Y" P7 o8 y! w' q' h1 C: Y. W then
$ K) n* R! W+ U5 ?4 e, t @.umlagern(@.standort.nf(2)); * k: n5 t0 q$ P
else9 ~8 R/ u0 B @* G' ?9 R: b
if @.standort.nf(3).nf(1).leer1 N3 W1 ^: K4 t
then$ Q6 \2 o0 @5 ^/ G0 G, o+ Q3 v
@.umlagern(@.standort.nf(3));: l1 M7 {) f/ G. h7 a4 ^ T5 J5 v
else; y3 p$ T- \$ D/ R, \$ E
@.umlagern(@.standort.nf(1));7 K$ k, b6 U0 |/ ?' j" i
end;
( n3 [9 |5 Q+ Z- V. v end;
- } }* ]+ w- x# t3 G end; 2 u4 c+ c* L! n6 |* O! |, W
end;
5 v1 g- }4 ~1 H1 Z) b+ H' @3 V end;
! C" \/ C2 [ aif ?.leer) s+ x8 L& x. D/ t" X
then
3 N% H! @* O5 y% |2 O1 G; ` H blockier_merker := false;( s" E3 p* e! d% f. n, y
end;8 [& l8 r/ B# o
end;
0 ~4 d% i. f2 e( r大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |