is* p/ x; P. q( s$ \5 W- ~
local links,rechts : integer;2 z# r8 |+ m5 D- M7 m3 i
do" g6 R1 h7 h* ~7 H
if @.standort.nf(1).nf(1).voll
. k& I# u% v$ O0 {& ]6 e and @.standort.nf(2).nf(1).voll- r/ h0 L# L) w( V- G
and @.standort.nf(3).nf(1).voll
! z) p& R9 G& x# L, t* } then4 \) o; ?1 |, Q# e
blockier_merker := TRUE;
% `6 ]+ u9 G3 O* T6 g else( r7 e) [" M6 T8 P7 P
if @.standort.nf(1).nf(1).leer8 r: L- ]/ Z, ^6 r
then
- |6 m$ O2 @ g. k i+ L @.ziel := "ap4_C";
5 U. D" p' J* E! w& b @.umlagern(@.standort.nf(1));! x% L9 O& Z' m8 @* D
else
* u: x3 x2 e) `) h3 j; J links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs ( V4 z- {8 `# c0 G! C
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
5 P0 w1 W; h- I + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
0 F7 j, c- v" s" o8 ?. p; n, l rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
. i% B6 s a3 q$ G4 J+ G + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
( L3 U! w# ?1 {3 u + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
# u( X5 m+ @: @6 ^: A! T: F if links > rechts
' c+ k2 W# ]0 T/ |+ O: r/ S2 L then5 s" s* v+ d8 h7 \: {( b% \% |/ a
if @.standort.nf(3).nf(1).leer
% \! t8 q5 ^0 f" y3 c' S then
3 r/ @% R6 D8 Q2 M. x1 J @.umlagern(@.standort.nf(3));
5 _* m! n k# E) S) C) p else
' {2 V3 ^3 u. h/ \% G if @.standort.nf(2).nf(1).leer
9 ^1 y' _/ o% g+ H7 r then. |- e" t) s1 b& b$ j, C
@.umlagern(@.standort.nf(2));
( V. s! a; Q, Q$ y else+ x* b; U' x8 I; F& |
@.umlagern(@.standort.nf(1));% Q" M, ?- a3 z- {; d
end; F5 H: A6 c7 T8 b1 [6 w+ Y* J
end;6 x4 B* q( h$ u% X8 l
else - m; @8 S0 r4 B" b3 t4 R1 p
if @.standort.nf(2).nf(1).leer
p- I, j. l; `" x- m& y4 q, t- O then
6 l4 X3 m( c) [7 X0 f6 n' } @.umlagern(@.standort.nf(2)); + e, X* T0 \8 X3 m C) H
else: @5 R4 v7 C3 ?6 c6 b. S. O; k" T
if @.standort.nf(3).nf(1).leer( N5 r; [( @) E" j( P
then
8 {* G$ O+ A8 R$ ?' a: D* d @.umlagern(@.standort.nf(3));0 Z- t p4 u( r7 y# K6 b$ a( H6 n( q8 ]
else \# i# P; X' W. @" m
@.umlagern(@.standort.nf(1));1 Q) b$ [& y" f) I, V
end;
s# r7 n, t' l9 Y4 G- Q end;8 Q% Y9 {; R% t# B* |
end; $ Z$ \0 S8 z6 I8 y/ F% y
end;( |! V% S7 h# W
end;
1 f6 O& `% B' [if ?.leer; o8 `' x' Y3 F
then' F- ~' ^$ }& H, D
blockier_merker := false;
O; d1 E3 o% g$ A5 o1 i2 _8 Vend;
+ T5 m% M) _0 ?) x: N9 [6 gend; W- D; y2 j6 ?- f, _0 n. h$ g& Q6 h0 A
大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |