is1 m" y2 p* d% n) m7 r3 T. } {
local links,rechts : integer;
- x- a& A; ]6 Z1 }do
/ [6 O- L$ E; U0 g& N+ u+ H4 N if @.standort.nf(1).nf(1).voll
1 {& \" I; s0 O/ q" w& q% Q( P3 S" f# r8 y and @.standort.nf(2).nf(1).voll f6 b. u6 v0 q9 U! \) g# U
and @.standort.nf(3).nf(1).voll1 h( s7 P' C2 [; [8 `* ]
then
* [+ n% ?* J' Z I blockier_merker := TRUE;7 g) c& m# j& H- b8 Z
else
; h& N2 P% D7 j0 D7 T- ^! y! _7 `* W if @.standort.nf(1).nf(1).leer. r- d+ a5 S$ F" T! I
then
& j7 q2 k: V/ D0 L @.ziel := "ap4_C";. W+ x; o3 Q* b' O ?1 I
@.umlagern(@.standort.nf(1));
' ~1 k& N' n- E. `: {" X else0 J. ^# I2 p0 E" c9 ]4 l% r A
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
6 l. K& a4 D( ?! l: p1 e, P + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
. P* P0 Z% \7 H% H2 x6 w + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
% I2 U3 X3 c+ T+ P! ^+ i rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs + _9 p1 z& K W' s: j! n3 X
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs g4 _( z1 E" |# a$ I9 I
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
% b9 ^* s/ S: |3 W. e0 F6 N if links > rechts B5 o! Q* r& ^3 o$ K& H
then
8 Q) f/ e+ s0 a: q if @.standort.nf(3).nf(1).leer( I- \7 G2 [ Z4 T: x
then4 f9 u. l, Q' l" V
@.umlagern(@.standort.nf(3));
( m/ z; J4 n% I$ { else2 o; ]" E6 x4 u7 |' E, H/ }) x4 ?
if @.standort.nf(2).nf(1).leer
0 S5 A' C: I1 }: Y) `3 b% r then
& \5 D) ~3 S- r" M. ~, Y# h @.umlagern(@.standort.nf(2));
+ @( Y" M4 r/ e3 X( T; {/ | else
, L; b3 o; G A6 L3 x$ N+ J- E @.umlagern(@.standort.nf(1));6 H6 i# p& G0 s2 ~- |
end;
, y2 g% W5 T# H% B4 J5 g end;* }. ^$ x* I1 @3 J; l0 Q
else 4 `% g& X2 N5 {* E" o7 o
if @.standort.nf(2).nf(1).leer
/ ^3 ]& ^) u* w1 c0 T X- O. U then
. N# ]+ t" l2 a8 X' F+ L% ?& Q @.umlagern(@.standort.nf(2));
8 U5 ^! `4 H8 Z else5 A" l& b q) H2 P7 Q% D p
if @.standort.nf(3).nf(1).leer3 ]$ w* Q& j: z% ~0 [% J
then- b5 Z* d& Y) U: h' b
@.umlagern(@.standort.nf(3));
% n9 S }% Z5 p( ?; P" ` else
$ A. J+ y7 _7 `0 `7 g0 r8 e @.umlagern(@.standort.nf(1));9 J2 K$ n8 l3 y% Z. T* p! X
end;2 b* _! C A& z( p1 _! Y, Z
end;2 _! H6 i) y' z
end; " n, a# T; N7 U* D, W8 A1 W9 W4 |6 E
end;$ N8 p- I( h2 r" z* R4 R
end;
3 O- Z' \% m0 d T( H% S+ Gif ?.leer
' a5 m" k4 V; @: Othen
6 _# `2 o1 [* Y9 g2 I m4 G5 R blockier_merker := false;
. U" Y9 Y- q4 l. J. rend;
5 H" d2 @$ W5 m q5 mend;
: ]; N$ R! {0 F大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |