is
( g7 V* s0 u5 M; |3 L) ]local links,rechts : integer;: H& ^. ?2 u% D
do& ^( \' [* u, l% B& e
if @.standort.nf(1).nf(1).voll% E5 L9 K# c; O
and @.standort.nf(2).nf(1).voll# p! I+ J0 f( Q
and @.standort.nf(3).nf(1).voll2 l- w0 {* c7 G; q: `3 T
then: d: ]+ y, R& X i
blockier_merker := TRUE;! p$ C P% x5 C" Y! d& g2 `
else& a% @# w9 I& j% k8 u, X
if @.standort.nf(1).nf(1).leer
: V, Y, E8 D: j6 ] v( m" j& f% _ then# ~: `* X6 Y( O+ l6 n5 r* F
@.ziel := "ap4_C";
9 B$ e) p' `7 l$ U @.umlagern(@.standort.nf(1));
- e: y+ e) `1 L* Q2 P7 D else% S# C- }! h; i2 w: H
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
, P. \/ g5 L, r. L + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
4 i+ ^3 [* c3 D! ^" k3 j O + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;3 P6 _* T* s2 F0 v6 g! r% a5 r
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
; H; I, y3 Y$ k3 }7 u + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
% Y e. Y/ U% V- C- A% L0 r + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
+ @2 B$ n7 F4 V7 |1 ~; X if links > rechts ! e. B" [( d; R! p6 {
then. B' `% z) ?+ ]9 b! j
if @.standort.nf(3).nf(1).leer
* k7 P( a" Q/ y+ M) l* X then
# W( E0 _. v, K/ a2 I- L% f# K @.umlagern(@.standort.nf(3)); . `/ I. g4 _. q# p; u
else
' F8 U5 a6 Q3 V# x* [ if @.standort.nf(2).nf(1).leer
L) Y# D4 c6 |$ o# y4 I O then
: y% s @' T% Q @.umlagern(@.standort.nf(2));
* C1 D- k' v; r7 ?; P6 c: A- D! q else
! u( _$ z( I1 T @.umlagern(@.standort.nf(1));6 F* x! B9 i5 a' r4 w2 L& l
end;' U; V) n5 k p: Y: s/ Q
end;; r0 B' ^2 {" Q5 {
else 4 N1 u4 n3 i+ w% {. D& Z4 p
if @.standort.nf(2).nf(1).leer: _5 u+ S1 l# e, ]% \0 { w+ N
then) N7 Q% r; W8 }% p1 F' m# a4 C
@.umlagern(@.standort.nf(2));
& ^4 Y' f% t2 {( a/ G& y3 Z4 Z! \ else
0 C9 e! T) D4 I4 C if @.standort.nf(3).nf(1).leer
1 T' a$ n' c9 z6 u) j9 P& Z! E then- ]- g6 V: K) |! {1 I
@.umlagern(@.standort.nf(3));
8 a9 q2 {3 M. j; A$ U' i) ^' t5 _ else- o4 j8 m2 |* } P* p8 F5 ^
@.umlagern(@.standort.nf(1));
1 C Q! c; i* E8 ]. K end;
8 Q+ v7 I- x5 q8 f1 I end;
% E& E6 e- }5 K& b; ?. F1 [ end; # m. }; B4 q# g, w8 q# T8 q
end;
D i/ a6 S6 S/ Y' p" S/ [ end;
6 J+ W6 U2 q+ V' C- `8 wif ?.leer! u9 L4 o5 t1 H. F8 T/ I' Z
then% G) x3 `! B; l
blockier_merker := false;
, Z. l% J- d5 D" n5 _! p6 {, D. b/ zend;
/ ^- y, V4 C, Q1 {end;
' l' J# ~# I$ m9 c大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |