is8 T' ` X$ J5 t& B
local links,rechts : integer;
( _+ o- C0 r. [& L sdo: s( O" j* m0 u# i, i
if @.standort.nf(1).nf(1).voll
5 s5 c% e: w ]5 [4 C and @.standort.nf(2).nf(1).voll4 ^; ]* [* @3 c
and @.standort.nf(3).nf(1).voll
( |9 Y& i/ a3 {2 W$ k. J7 z then* X- V- ]# k: F" @/ U1 c P
blockier_merker := TRUE;3 Q0 `. \/ R- s {) a6 l. x8 i7 a
else1 U+ C0 x- V w: M& i4 @9 F. A
if @.standort.nf(1).nf(1).leer3 G; g0 D r9 V. d) H
then
; p7 Y9 n( w( v3 ]! L& ? @.ziel := "ap4_C";+ _' T8 ~% R( E8 K3 U# T: Q
@.umlagern(@.standort.nf(1));0 n/ I, ~& V; w6 d0 \
else' J: t8 g3 i4 M3 T+ \% z
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs u4 T- @) l7 l5 p/ o
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs 9 {8 ]# U. j2 \9 ]' U
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
% O; Q) M) I$ C! }% s rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs T$ u$ q5 E1 j% K$ W
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
6 A% A/ t+ I C% n+ r + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;) ^5 d, A3 _ ~- D8 x* G& @7 |
if links > rechts 8 ~* _) }9 a) N& S0 @; `
then
* Q8 J6 u" U) B9 r' i0 X; q if @.standort.nf(3).nf(1).leer" j+ P9 V4 {- S
then
/ v% d! i) X/ H- `# T- p+ @ @.umlagern(@.standort.nf(3)); . c: w: x- D" W( n' l; \ y
else
! l+ C1 J' d$ `& P3 f' I1 k if @.standort.nf(2).nf(1).leer M! r. y' w7 X
then( n. `& g; N$ x9 L
@.umlagern(@.standort.nf(2));& V( I9 H5 |$ ~+ z
else
3 k7 `0 B+ V' J# S3 A @.umlagern(@.standort.nf(1));
5 b. ^( {; Q7 H( q: A end;, B; h$ n7 k W5 M+ V
end;3 H3 U9 ?9 E3 B1 ~9 {
else , M, T; K8 P9 J
if @.standort.nf(2).nf(1).leer) K, @6 ^4 r o+ q1 C
then
% v3 q) r# S- ]0 |0 E4 O1 N7 c0 k @.umlagern(@.standort.nf(2));
6 h* h5 i N6 e else
j' ^, M0 x. p$ \9 r' M0 M" K- ~ if @.standort.nf(3).nf(1).leer- }/ h J; a$ s1 a. L" ~% s
then
+ A4 Z5 [0 F+ L R0 l+ ` @.umlagern(@.standort.nf(3));
% y* l, w/ g+ H else" F; P9 {( Z, N: i, z) Q- j2 W
@.umlagern(@.standort.nf(1));% i! `+ F: M$ i1 _
end;$ ]. u5 R3 A9 p6 A& l; B/ }# x
end;
/ n& p6 N# K" b, A- K. r6 }4 A end; 6 v2 x: M* ^1 B. ~3 D* a
end;
& A2 g" k# u# ^& l end;# B9 h5 k" a& ]) \# I% [
if ?.leer! s( O( b, h0 e
then
/ b! R* n/ j/ V P7 D' x( S blockier_merker := false;1 c% I, L8 X, z1 t9 t* @1 |
end;% e) W& B/ F9 t+ m% B$ `- O
end;
7 k# a9 b$ | b6 g大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |