is" T# l. L7 R1 J6 [
local links,rechts : integer;, a* K3 e0 i: q3 X: {; L' Y
do7 q' U) Q% u8 Z
if @.standort.nf(1).nf(1).voll
5 ]0 p; @1 l3 L( ] and @.standort.nf(2).nf(1).voll
) Z: U' ~6 e/ a" f" D3 P) Q o. ^: S$ e and @.standort.nf(3).nf(1).voll( K& M7 \2 G( I: W- T9 B/ m5 k
then
5 G V6 g( R) ^ blockier_merker := TRUE;% |( V1 \( Z& p- r. X6 Q. h1 o# l
else
0 ]% Z6 O/ ?( E% d if @.standort.nf(1).nf(1).leer
) b# L& n% J1 }' E& Z3 R then
: T+ o; h( q6 j @.ziel := "ap4_C";
7 K0 R$ X( U2 U4 g% s @.umlagern(@.standort.nf(1));# _, M; v' y1 _7 @- M
else& j" p' y2 }1 _$ s7 E$ d
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
4 C* [: E) Y5 ^; t! z+ r7 g" o. E + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs % z# q6 O" k9 {
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
# Q9 O: M8 l/ F% H rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs , w( \* _. i% F! ~" U& w- Q
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
0 x) g( ?% @! q$ {0 L7 X2 E + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;7 ~; _% o# f$ p0 d' h
if links > rechts : N( t3 S% Q" A1 \$ X& h) V% e* A( E
then
3 L, V, s2 l# S5 V, Z, z z if @.standort.nf(3).nf(1).leer! Z# p; D6 X% p4 ~
then
/ P9 n4 K D! W* ~- B @.umlagern(@.standort.nf(3)); 3 y: A# x! I2 @+ Q+ x
else5 o# j, s, Q; l2 v3 `+ e
if @.standort.nf(2).nf(1).leer% i8 W& B+ r% ~) {) p% X
then
( l# Z) S1 c) ` C: j @.umlagern(@.standort.nf(2));2 S* Q( Y. `8 b3 `& a( x' }
else R; J4 `+ ?1 j- b" v* `5 ~' w
@.umlagern(@.standort.nf(1));
+ x0 _# {0 H% a end;: {, v/ _+ j) U5 o% G2 ~! P) |
end;& X9 C1 Y. j* D# ^4 p1 F
else
( u, ]1 Y2 @. T3 N$ L( g( y if @.standort.nf(2).nf(1).leer7 A8 X* S) P; \ ~5 j7 e
then
# B* `: \ i3 s* b& P' l9 t" @ @.umlagern(@.standort.nf(2));
7 l# F7 r: d3 m2 E3 |% P [6 w else" @9 G& ^5 q- |( ~0 k9 W" H0 |
if @.standort.nf(3).nf(1).leer# B: Q) f7 Z. G6 _
then
k) D, Z G! Y0 [- K& ` @.umlagern(@.standort.nf(3));
' G# n; h3 j, H& I' i$ z8 I6 w3 M else
; v9 H b4 ~! T. D" ?# B# k @.umlagern(@.standort.nf(1)); r, N2 g! B5 m8 |( U# ^
end;6 [: z$ B& s) l: H' o1 N0 i" c
end;3 C& v$ I9 [' p+ @ c
end;
/ \% w' {+ H& r, b% ~1 L- J end;, p, w, {! B+ Q, E
end;
5 `$ c* i G1 L$ v8 T: [$ \if ?.leer
7 X3 N o. K% uthen
2 v# U5 T9 N! }& {7 N L blockier_merker := false;, h* W5 h: u. C
end;
" o9 Q6 d" V$ E2 N' Oend;* u! ^5 H/ c; |% R* Q# @# c7 f
大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |