is2 f' ~3 B! V4 F7 N1 s
local links,rechts : integer;5 F. }. ?. F! w2 b
do/ A) C% ]/ J; Z& ]; e
if @.standort.nf(1).nf(1).voll
6 l( y: z+ M) K, R( y and @.standort.nf(2).nf(1).voll
: E1 y N: X3 [$ C) W and @.standort.nf(3).nf(1).voll2 V* H5 V$ E( J: j
then: `% @6 ]2 \: |! J
blockier_merker := TRUE;
: B) F4 R1 u7 U% F. N: |! { else
- D o$ T9 o" r2 W if @.standort.nf(1).nf(1).leer5 y5 f5 n9 d& b; H4 V6 C7 j
then
4 _* z" C! [$ c7 m# u, v& G @.ziel := "ap4_C";
9 X3 I% V7 o( i4 ^) E. @+ F @.umlagern(@.standort.nf(1));
: o/ H0 K) g$ V5 z/ a. t3 B# d3 r( d else
8 t n( k0 c- U2 O- J3 M3 r( H links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
3 y0 h; }% h1 `* [& H + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs * C% q- P. z' I, U$ J
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;; _4 |3 W A6 k, @
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs ' A! L; t- S+ |5 r1 @& c
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
# Q" @ N3 P- e+ N* [ + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
' @) j0 V/ N7 j9 D! ~ if links > rechts
# q) ?+ z1 }. `7 ]9 U then
! K! p/ v4 ~( o. s2 _4 S1 U, V if @.standort.nf(3).nf(1).leer
) b% q M# G4 M9 g then& ?0 P% n7 w9 v6 A
@.umlagern(@.standort.nf(3)); - x/ H b" J; G7 R* I
else
( j2 J0 ~7 T9 z V if @.standort.nf(2).nf(1).leer
" t+ ?! M+ K. @2 u T& O$ j then. T2 @2 y7 r' i6 U# n3 R4 @* n
@.umlagern(@.standort.nf(2));
8 Y2 Q$ T: C8 q else
$ i( R* ]: ^+ j @.umlagern(@.standort.nf(1));3 D& G( }( g" O$ B
end;: B& Y7 h; O( P% N$ H2 E2 g
end;
8 t& E. T" L% C+ f* h; z else
& I7 S) t: u# J: M if @.standort.nf(2).nf(1).leer
! M3 D( r( n8 q8 |4 e then
7 c0 ~0 i+ e7 X# K2 m @.umlagern(@.standort.nf(2)); 7 Q" R$ o3 z1 i5 G8 |( B
else: l! L. e8 Z( o7 B8 w/ D, c4 T, P
if @.standort.nf(3).nf(1).leer
1 ]6 g# W' q- [ y then% r3 O) |$ p7 e' W
@.umlagern(@.standort.nf(3));! A4 D# L8 r, v- ~& k6 q- n2 R3 [
else
: O7 |8 G; l. J4 j) l, R. ~9 L @.umlagern(@.standort.nf(1));
7 \- X* B6 m9 [" ?/ u) ]9 f' ] end;4 Q- T% K* w" p' ^: S
end;% h: n- D5 b) ?$ v% E2 c9 J
end; : x6 h$ r: S% {$ k
end;) ?- o8 @( s% E4 p
end;
; Y |6 N. q E6 _8 _! Q8 aif ?.leer# k- K; P2 ]( `$ Z8 g. s/ ?
then# \5 [7 e& B9 K( ?: f8 t; I
blockier_merker := false;& y) L Y( T- P+ x" b. @
end;
B% ?. z4 \6 {% @/ f4 Hend;
6 K( Q3 G7 @4 D" t) [' {大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |