is- b! O8 a" P j5 W) Q
local links,rechts : integer;2 I9 P- m6 R' ]
do
; W& s; y7 C1 U" U* ` if @.standort.nf(1).nf(1).voll
9 g8 U6 E6 d' e+ Q h: H and @.standort.nf(2).nf(1).voll. V' q& t8 L, |0 {5 o
and @.standort.nf(3).nf(1).voll2 k( r# i, i$ t) d) {; }
then" f* W* `, h) r6 T
blockier_merker := TRUE;
- |4 M) q, K0 o' N7 Y: F" T* W+ t else
) R# Z) X. o/ z6 b' P if @.standort.nf(1).nf(1).leer( Z' P+ K) F" I9 C/ |& S* S
then
- W2 h8 B% {4 {7 x0 U @.ziel := "ap4_C";- e" |$ G. ]( x% y7 e7 Z: M q9 J
@.umlagern(@.standort.nf(1));
6 T. l1 C: r. X* F2 J: D4 v else+ `9 v' ~4 H8 q) j1 ]# x
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
# u4 U% y1 ?/ j6 W! d- P; \2 R; z + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
& N. z0 y( F: c + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;9 W* l: F' _7 ^4 C
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
+ B9 A$ ?3 k" Z# r7 G + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs : k9 ?6 L1 \- K& x1 z+ K
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;* f& Z0 _' u. ^8 i
if links > rechts
1 E( F- m$ F( V# i then
4 `0 K4 s4 V9 u% q A- |# C if @.standort.nf(3).nf(1).leer; Y9 Z7 r$ X. P, X. t& w
then
3 Z+ I. w3 G" ?& m# U @.umlagern(@.standort.nf(3));
: h* ?9 h/ @3 ?% \ else* w+ T$ w' c9 `. o% t* U% i7 _5 c9 \! g& F
if @.standort.nf(2).nf(1).leer# ^4 g$ R: c' n; A$ W6 |7 u, s
then
0 H. P, i( u( {: y' e+ K; M9 _1 G @.umlagern(@.standort.nf(2));
8 S& Q6 k0 a3 o6 b1 E. o# Y1 A; ?/ s else
% s7 }- @, N! K; z8 z1 J @.umlagern(@.standort.nf(1));- E# D/ N' B9 Q
end;
& } Y7 @# @% N/ E$ T( d+ N9 y end;
! [& P, u' f( m% V; \8 I: u else
6 n1 ~" v/ x& {' i if @.standort.nf(2).nf(1).leer
. U. T7 y: Z) d$ H then
/ l% ]/ G' B1 t# A* u- q7 a9 { @.umlagern(@.standort.nf(2)); 2 Y$ e V- {+ o" d
else
7 N r& v6 |/ F- i. Y if @.standort.nf(3).nf(1).leer; ]# E c& |( |9 W, A
then
+ N8 \: C/ V& O, K3 j% f4 X @.umlagern(@.standort.nf(3));& V8 |9 X# J$ T* L9 |8 T2 ]
else
4 j8 T1 J; [' [: e6 I$ O6 L @.umlagern(@.standort.nf(1));
5 G0 A" v( U8 [- Z2 I end;
2 s3 | n( X& C end;
H/ P( {/ T$ k end;
) V: a1 l: U. H+ D end;
. Y2 d. Q0 `9 w6 d/ a& j" [ end;1 c3 Y+ J3 t' Q9 [% A; x5 @2 W
if ?.leer; L9 g; i% m3 _0 n
then
' z7 f1 z2 k1 e) i# P+ p/ d4 w blockier_merker := false;
' I3 |* M3 y0 s X0 send;( L4 u$ o, p0 _8 o( N! X8 x
end;
# h2 ]+ W9 E9 @. U大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |