is; F- i8 z& S0 ?" Y( M
local links,rechts : integer;
/ K- \* B+ D- M& w7 r5 ldo
2 c% R! W1 s: j1 T) y! l if @.standort.nf(1).nf(1).voll
. t* s7 s/ K8 K. h! ] and @.standort.nf(2).nf(1).voll
9 B7 b. u- e6 Z( T( h) Y and @.standort.nf(3).nf(1).voll. @4 N# S! V1 Q1 V
then
; J. c! o8 F1 T blockier_merker := TRUE;- B1 x/ b2 M5 q
else
% y9 Y, C9 M) N if @.standort.nf(1).nf(1).leer
/ h. u! f7 D2 [5 G2 W+ u0 N then9 L+ L ?3 p& ^9 f
@.ziel := "ap4_C";9 X+ ^# i! j- l! S) S
@.umlagern(@.standort.nf(1));+ e7 ~: S2 b1 L
else5 w Q) g5 h# c) T8 P& P! T9 b3 b
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs ) w! V7 ?5 B6 u4 {
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs $ R; E& N. [8 q. ]" \4 O
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
" s& P% o* I5 J) Q4 T" [ rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs 6 X/ K l! n! ~4 F3 I: O0 h
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
9 c+ [) L$ x! s& @* g + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;, h* f% I7 I! R' s. U/ L% k
if links > rechts ' o5 e; O( ~! V9 `0 d' d) g! q( h
then
% _: P. b: @7 g* Q( M if @.standort.nf(3).nf(1).leer
. h `/ x4 n2 U. p! f, z- U O then
! l! G8 j' D5 h# f$ c" _ @.umlagern(@.standort.nf(3));
, x! M- m e1 L7 ^6 c else: ?4 C1 J5 o6 l: L2 S& g
if @.standort.nf(2).nf(1).leer
/ G* [5 z" t1 _# Z) M then
5 N& z; [ H. l' t @.umlagern(@.standort.nf(2));
. K. i8 a! }& z" t. U else
7 u; w7 S% E% m$ Y; M- r7 P @.umlagern(@.standort.nf(1));" M4 O' Y" a; _& {
end;
7 u- v. Q& B8 g- ~+ \: h end;
: {( Z) Z7 m& ~; P% H* z$ d$ t2 I else
/ I8 s4 e! F8 n; z7 Y f% v8 W* Z7 x if @.standort.nf(2).nf(1).leer& i( x& @* \8 Y+ N) M
then: g2 H* b8 Z5 B
@.umlagern(@.standort.nf(2)); 6 b) U& N- j0 g6 o: Y0 X6 c* q
else) y- x- I4 v$ N( Z
if @.standort.nf(3).nf(1).leer
7 M/ g+ Y3 F# r# A2 Q then% l+ {: F8 @; b4 ~7 C
@.umlagern(@.standort.nf(3));( j5 _2 @ ?2 P1 X l6 F9 y) `
else
* o* ?3 K' {2 L6 t& h. E8 Y @.umlagern(@.standort.nf(1));9 x z" S# ~) d, {, b
end;- N# l$ @! L' B3 g# \& v
end;; `- j/ o: ^* I) B( H! J
end; . k( A3 r- f" `1 \0 \
end;
p) A) E! J% }5 E end;3 ]+ q' [" O1 `3 ^# V$ ^
if ?.leer
5 ^9 C8 @; M$ D+ O- V) Bthen
2 b" {2 G N0 }& E; V blockier_merker := false;
5 h2 x+ F) p x4 r8 n2 o8 pend;
! W4 i# p2 ]8 C9 e" ~end;
* }0 [; m0 a: ?8 |" b0 n: ~, e4 G5 @大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |