is! `- s& f- K5 R- C* X' J- X
local links,rechts : integer;
; z% M. ~# h% k& Z/ |do
& W4 P+ X. P- @) P4 u- o if @.standort.nf(1).nf(1).voll6 n3 z) D3 A; G) V
and @.standort.nf(2).nf(1).voll
, b# U8 s( {: F and @.standort.nf(3).nf(1).voll" u3 M0 S, J: N6 Y2 g, r
then
, l: H8 d# w6 [5 ~2 G5 c blockier_merker := TRUE;
5 [5 ^* @8 C# M* x" e else% J4 U( D! b, S8 y6 P8 e$ T
if @.standort.nf(1).nf(1).leer
6 ^/ Y- H5 M2 y9 [1 p8 h6 y$ m then
6 p3 o7 l; Z2 y7 a: ? @.ziel := "ap4_C";
5 Q1 s$ b- B& s* t" h3 j9 \2 B/ s9 H @.umlagern(@.standort.nf(1));& A: m4 S+ \! m) C# D" B- N. r
else! l% Z% F- d( J2 B: q% l7 q
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs $ }0 D: N$ y) V2 o& E z
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs 8 H( }+ v) K" Z, a- S
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
2 n, \( u/ X; w3 D rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
& H8 D& \' u' Y- o" c3 U7 l% A + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs 4 }0 i6 | m6 h: S
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
+ Y% Q; p9 H4 H( V: r if links > rechts
0 d/ ?+ c5 F Q- f$ M/ A then
! j. X& v& t4 x5 D" n if @.standort.nf(3).nf(1).leer
& n( j5 | \$ d then9 p+ D% p" E) N# T9 a5 I
@.umlagern(@.standort.nf(3));
* e: s E9 A9 r! ~0 M, g5 j# I else# O4 I+ t5 _3 t7 i: ~9 G8 d: f
if @.standort.nf(2).nf(1).leer
. h+ _8 m6 x- c7 } then7 m5 b9 Q& }5 {! }) s/ d
@.umlagern(@.standort.nf(2));
, U! m$ U. \7 X9 @1 T" B/ ` else
3 k) W4 u/ A. |) ` @.umlagern(@.standort.nf(1));& k5 m3 U" g/ d' d& s( g& ~
end;
2 n! T7 b0 y& S' t% ^- E' o end;3 S) \- G2 G N) `
else 7 p4 H& V$ E2 Y+ N. t
if @.standort.nf(2).nf(1).leer
r4 O g+ M" o2 Y' i$ f then% }% R& U+ v k- W* x
@.umlagern(@.standort.nf(2)); & t7 L- K4 o4 d( Z" n) M: B
else
* ? ?- a3 j, v' a7 O if @.standort.nf(3).nf(1).leer
! _! ^3 g! G% H* c' s& P A then
* @2 x7 d* W$ p" s0 c @.umlagern(@.standort.nf(3));
, {$ f3 e4 H3 y5 V5 }$ D( g else2 f- w0 }" n& ], l! r7 h
@.umlagern(@.standort.nf(1));/ ?1 c, y% X7 G: k6 r/ i, Q0 q. i1 `
end;9 H1 Z8 Q* {+ q P4 w: M$ }
end;% k4 { }2 }, J8 d/ L6 h# `/ h7 `( K
end; $ c& a' N7 W, X# F( J" y" V# V
end;
; H E4 z- C) W# a) X; _ end;
, k( ]6 }. S4 eif ?.leer+ {" B( N E& G6 C6 k
then4 |/ X! o2 B8 @) S; i- {
blockier_merker := false;& o X, Z2 \$ A6 y/ p$ z3 G' v
end;6 @3 ^# A5 {5 o# l9 s' X, @
end;
- Z1 K( I2 l8 g大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |