is4 P- g4 F! e1 K
local links,rechts : integer;/ D5 x c0 g* t
do7 H5 U1 J# O5 r7 p6 R! X, R
if @.standort.nf(1).nf(1).voll
* v$ t) f5 ~9 @4 J& y and @.standort.nf(2).nf(1).voll
$ \ {1 d6 k+ u: [+ H and @.standort.nf(3).nf(1).voll2 `& k: P, O' `& Q
then
& H# ]5 d4 H5 T+ a blockier_merker := TRUE;
9 e% g" p. ]4 o else2 U) A5 u/ I, U0 y6 l# k l7 J
if @.standort.nf(1).nf(1).leer- L* K8 W6 n. j! y
then4 A6 Z+ l; b. ?. v9 D
@.ziel := "ap4_C";
) N# k0 [- T) T& h) Z6 Q @.umlagern(@.standort.nf(1));
3 E' |0 k, K4 o5 K8 B; v2 y else. M, ^. S' R& g# d
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
% Y( d7 ~# z) h9 Q% K; W + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs 9 t: j6 ^4 C, x
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
) f! R2 c# ~, W4 W3 b rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
7 c# O- w/ T: [% e# M2 m( Z + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs 8 Q8 P; C* ~3 z' S$ ^
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
% n9 z' f5 }* @& j: f' { if links > rechts ' R% W7 j5 W+ L
then
1 {0 ]6 k% X, R m! y( L if @.standort.nf(3).nf(1).leer- V1 W( @4 }: E' R2 Y0 e) ]
then6 S0 {! _- Z1 C, A3 o2 k4 X
@.umlagern(@.standort.nf(3));
8 ~4 J6 p, U. t! k6 ]* U- Z else
i: y; ?2 [: t1 q; a if @.standort.nf(2).nf(1).leer4 ^6 w9 A5 J: {6 x0 [
then. S! ^# q. x/ ^+ u
@.umlagern(@.standort.nf(2));
; }6 m( Q" B& n( y" u# c! @ else5 W+ k, B- G2 T! E
@.umlagern(@.standort.nf(1));
0 m4 M( ?6 ~" c3 C" s% v8 q4 K end;. D4 K$ z: c; L' e
end;
- n% @$ {( C9 S else
0 y+ n" L6 ?/ |% J: ?9 h$ p T if @.standort.nf(2).nf(1).leer
( [7 @5 ^! F) s0 `0 }" G then
" h( k0 Y E6 C. Q- I+ F0 H @.umlagern(@.standort.nf(2)); : X! ~, C) j5 X
else( X c% o4 y8 F% i0 ^
if @.standort.nf(3).nf(1).leer* J, p# l- f* y
then
8 E1 [# y& \5 ^# {. D$ k: |) R* e5 ` @.umlagern(@.standort.nf(3));3 D# C' `* z1 I3 z m! R4 \2 h- k
else
* e) `9 b0 Z3 Z9 }. T @.umlagern(@.standort.nf(1));& B3 B7 G) {) H
end;
3 N4 _7 ~, C8 D- n% ^0 I& x/ Y end;- n8 z6 Z/ u- P2 a
end;
0 E/ d- C2 _, `- B9 t end;3 q/ e) [, \" V) @/ }
end; ], W! ?! M6 k9 _& }& C# {. j
if ?.leer
- |1 a8 U3 I/ b+ \9 Vthen
4 u$ ~' E: O2 \! r) q; U2 [ blockier_merker := false;
$ y9 h- f0 n2 _& [& @( eend;
: H# A2 d- w4 ?4 cend;
3 O5 e! f, n$ o/ g7 T大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |