is8 a6 @- M7 z2 z$ a
local links,rechts : integer;( k9 a( E( V5 I) z4 l
do
! G; T0 l S8 s, s, n if @.standort.nf(1).nf(1).voll: {8 a. }& L7 g# t
and @.standort.nf(2).nf(1).voll
R$ n. U# h* B- V- _ and @.standort.nf(3).nf(1).voll
4 W4 p' ~7 ]* E* i2 M) K9 U% j- Y then
; z* ?2 S$ t3 L) a. g" S% O# W; h blockier_merker := TRUE;
: T* ], P2 F) O0 i+ J" V else# V/ [( @. r* s# A& h
if @.standort.nf(1).nf(1).leer
* `, ?& v9 m- E5 Q- ^ then
4 U4 }9 A* a% B' K) j. c2 F @.ziel := "ap4_C";
# o* V2 R6 e2 f3 q/ }4 u8 ] @.umlagern(@.standort.nf(1));; q1 z" b4 E- J% {( y
else
" G' c. E& V% H+ U& V links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs % c4 |" T, P8 o6 ?
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs . T6 }+ O0 \8 ^- b7 ]( d e) B
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
S) @; ~. n& m7 ` x3 j6 R! k0 B0 R rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
5 Q6 l E: k! U9 x* H + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs + I$ D' H7 @! c' Q, s8 q5 h1 M9 v
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
1 R/ D9 J3 k- \5 S if links > rechts 6 o9 c6 X& t: B" `( e
then$ x; h* {$ L/ S. V
if @.standort.nf(3).nf(1).leer
5 r# q5 b$ P9 D0 F6 l% s& t then
5 R' _' d+ e5 I) B @.umlagern(@.standort.nf(3));
1 x7 A! M2 g8 {1 O; ? J% [ else
8 U! u, T6 c7 b) j: { if @.standort.nf(2).nf(1).leer
5 d$ _7 u7 }: K+ U then' J5 H4 T7 D7 U" s. `7 ~
@.umlagern(@.standort.nf(2));
4 z- T: I2 V! P- @- v else
. ?* s. x- p1 ] @.umlagern(@.standort.nf(1));0 |6 t$ Y$ ~& C% o/ o) A1 c
end;
/ W9 K( m/ r6 e, ?9 Z. {7 g* G end;/ r# D n: q0 D; F
else
* l1 g( U$ p' |! w8 ? if @.standort.nf(2).nf(1).leer- d* @: D: ~" u/ w: S+ E
then7 w" B0 W' }- V3 M* L$ ~' H
@.umlagern(@.standort.nf(2)); " A4 L. E9 N" o4 }
else
. R) U9 I- n& g, x$ M if @.standort.nf(3).nf(1).leer* H8 W5 t6 A" N+ B
then
" h- t( p* z, |1 j! s @.umlagern(@.standort.nf(3));
. Z0 B: T+ l3 R) ?, ] else) M: ]) Z6 h( y ?/ c
@.umlagern(@.standort.nf(1));- \5 h2 n3 `1 l6 }
end;5 k. d# |. }! Y5 H# X' a% d
end;7 f& l H' x. J# ~7 u6 w
end;
; E5 P2 c2 G- V' ~1 J8 @# O end;* ?# L T0 r- l, I- _. X& `. g8 ]5 z3 {
end;
% G, p& d0 t8 Jif ?.leer" p6 g' w& i; x3 r
then+ C0 ]5 U! j7 S) X% A t1 ?
blockier_merker := false;9 b% J) ]7 `; s
end;7 a2 ?1 @7 U3 k- S
end;
B+ i' X& w/ b大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |