is+ D2 @4 r( T5 u
local links,rechts : integer;( e: p2 g6 I$ q3 I5 l. w
do2 t- {! h+ D/ G8 X% @
if @.standort.nf(1).nf(1).voll
! g @* v! T* X4 P- {3 s1 K and @.standort.nf(2).nf(1).voll
5 Q, a Y0 q0 G: I! b$ {/ g+ y and @.standort.nf(3).nf(1).voll/ v7 m9 `4 {4 b) E- g( L& F) j# `
then( u3 G" a n$ @3 Q7 C2 x
blockier_merker := TRUE;
" ?2 e8 G( A8 X0 Y% H: _* q else7 t2 X& x, U$ D
if @.standort.nf(1).nf(1).leer& ~" p3 `, H& D( }9 u R& r
then
8 |8 ~0 k: p4 w, }% A0 s) w8 | @.ziel := "ap4_C";% U5 o# s% E1 f0 ~, d
@.umlagern(@.standort.nf(1));# p. x' J0 `7 X9 D/ ~! f
else7 t3 p" c) r. \8 c* C
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs 3 R! c1 Q6 ]0 U8 K8 p O
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
; S! r( B/ M: M S + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
! L2 j+ _! W+ b" e8 ? H rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs 4 b; ?& U1 T" B9 d; {& \( [
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs 9 x4 q2 q. x/ W0 o
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
% O, b$ q8 {% E! w3 A if links > rechts ) J% }* a H3 a' U
then3 G9 n9 g5 o1 ^0 j- q
if @.standort.nf(3).nf(1).leer: g, r' `9 F4 Q- W6 E
then" m! i7 F4 P4 _' y' t
@.umlagern(@.standort.nf(3));
/ I# s8 I+ p7 ~0 U! O3 o else
& J# @( w4 E1 Y$ S1 ]2 x if @.standort.nf(2).nf(1).leer
* {& L2 o$ c9 A6 y" T then
' J! m( Y# T1 q; D% Z- L/ N" O @.umlagern(@.standort.nf(2));' D4 u( U/ r v& t1 H& {6 O" a
else) ]6 o( @5 i: n4 |/ D
@.umlagern(@.standort.nf(1));
) c5 d7 {( R y( \$ v9 @9 ` end;, s# S c( a2 H: h/ ?
end;
4 @! ~! G- h5 a else
3 N, l; O0 [( ^7 A, E$ [# V1 v3 l if @.standort.nf(2).nf(1).leer0 F! p h6 h* P. X
then1 O6 d6 a% W) l# O8 v
@.umlagern(@.standort.nf(2));
) k! h' n9 M5 L8 K0 w/ ` else
* v- P' i' W. l. ^) y if @.standort.nf(3).nf(1).leer
5 q& u7 _+ I+ b then+ J( _/ j7 n" e9 ~* e* [: g
@.umlagern(@.standort.nf(3));2 V; x6 O1 k7 n5 r+ r
else
+ z* ?6 F: D) E/ I4 k8 U @.umlagern(@.standort.nf(1));- f3 {9 ~$ a% K4 F7 a8 C5 T
end;) ~- I. t6 L; H. h- }. R/ F7 m
end;* g- a3 B( t8 R- W, T, _6 h' s
end; 3 @/ F% [; [7 \. ^! E: i
end;: E2 X9 k$ h# n% I9 D8 p4 q/ f
end;" Z7 l2 |3 Q I7 c- U
if ?.leer* E- `. u3 S8 ^: A. B
then
: d+ u2 U8 ?1 Q( M blockier_merker := false;
$ K& z' d, @6 ^9 @( S; t3 J4 Send;
# X% f; d( h& x" T _3 o: \end;
G0 a( Y N0 ~: K' S# r$ ^2 p大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |