is' I/ R# d( [+ ~" k1 b- K
local links,rechts : integer;
, b0 ~. A7 |" u5 Wdo
2 g+ K' C1 U2 ^7 Q0 W& c8 f if @.standort.nf(1).nf(1).voll" W+ a8 O* Q( t. _) u) y5 [; a0 ?
and @.standort.nf(2).nf(1).voll% o% h/ v, { u3 @& ~+ }- [
and @.standort.nf(3).nf(1).voll
, I; ^% t9 w% K3 D& S then
# {) j8 b' m: ], a) S$ V blockier_merker := TRUE;: [! t- S6 F- d# F2 ?1 J
else
2 X8 X0 Q8 C/ _$ ?9 o% E if @.standort.nf(1).nf(1).leer
1 y% }" _" J* ]9 H2 X6 o9 `) m- ^% f then
1 s* K: O y6 z5 s% g @.ziel := "ap4_C";
& N4 q7 _+ O5 K: g4 w @.umlagern(@.standort.nf(1));
! l0 v8 X$ h; N! T else
5 }/ `1 M3 K1 X: x3 C8 v links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs $ o0 L2 x8 l- L; w& V1 b
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
5 X1 |- [3 d' B, O1 G6 F( @4 Q + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
4 _* E( G5 I& P3 _! K rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
! ~2 K, O( U6 S5 L + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
$ q' j6 k/ `, N0 V# H% x0 J + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;+ f4 g( S7 v# q6 M
if links > rechts
1 U- y- }; _' N/ v6 w( R7 G- X then
+ y) H5 _9 x0 | if @.standort.nf(3).nf(1).leer
8 g: M4 K8 o! g then& N, ]' \! f9 q1 I
@.umlagern(@.standort.nf(3)); . Y; N/ `# R3 W2 P
else: i; j6 }( p( y/ s6 n- G
if @.standort.nf(2).nf(1).leer+ E# r9 U" q0 g& U
then
) Y) j/ l4 l- F2 L/ u2 \6 F @.umlagern(@.standort.nf(2));1 _6 Q3 d& H% T6 M6 O. o$ o9 D
else3 x1 e0 F. k$ Q! J7 t2 ]1 ?
@.umlagern(@.standort.nf(1));+ x# s6 R- _4 R+ h6 E/ S
end;
1 r0 w$ A- V( N1 G$ R/ c6 ` end;
8 j# Q2 u& x# X: y else
3 n6 E9 O1 M/ l8 @: E if @.standort.nf(2).nf(1).leer1 c1 f6 t6 [% T0 y9 r3 F8 Z: K
then
4 l( t' J8 g* }- h( f h @.umlagern(@.standort.nf(2));
- a9 Q- s# f- `" o2 L# G0 [ else n/ j: q5 B; f; X! Y& g0 x
if @.standort.nf(3).nf(1).leer
. T" D% Z: V4 Q* `3 q then
0 U0 m' J8 |7 n0 Q; C5 }" B @.umlagern(@.standort.nf(3));, E# P- B- b. y
else
. ]- J% q9 p* h7 w) B$ A2 a1 F @.umlagern(@.standort.nf(1));' M( c1 K$ d( F/ G
end;2 i, `6 P0 j; |# z7 |2 V# j
end;
" d% s; v8 S& K# p( T; A+ b9 y end; % m$ ]7 a+ g6 V1 i
end;: p' m8 {% `% x' o) Q n+ q+ V# t! R; h) S* V
end;' A: p4 E3 V' N1 m
if ?.leer, N, p6 Y7 \7 ]9 X! k% ?
then
! N! C2 a) r! s2 N$ F" @& w blockier_merker := false;+ V2 Y. \! P1 T4 t2 _% X2 x
end;8 Y' Q8 d8 P* D) `& [4 G5 }( l* k
end;
7 I7 v3 `2 }5 R- R' P大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |