is
1 n. j, l4 T( c8 M2 b: ^% L2 blocal links,rechts : integer;
; V, L" P$ V: F; hdo9 r( n( i/ `, @9 g, E
if @.standort.nf(1).nf(1).voll
! q& W* B& ^1 i) P" W and @.standort.nf(2).nf(1).voll6 G% @0 N) X5 K' M
and @.standort.nf(3).nf(1).voll
+ j0 E! Z, \: W: t! t9 c then7 V% c7 L/ ~' I- b
blockier_merker := TRUE;# G Z' _, q" X1 n0 j3 n6 a
else
3 c8 [, j0 E; g2 Q# E if @.standort.nf(1).nf(1).leer% Z+ {% D4 A) }2 R8 r; f
then0 N' I) P# o( X8 m
@.ziel := "ap4_C";
/ F7 d* c9 r* t2 O6 k @.umlagern(@.standort.nf(1));
% g% ]: J! s1 _( ` else# C6 C* O% x& F2 f$ C4 N
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
7 }/ T7 G! @( W" w2 s* A! O + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
3 B6 ]; G: {! K$ u( N9 ?6 j + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
# I& Q; I( j! I. F5 [ rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs 1 A4 ^( T( z0 Z! d7 u. {
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
8 g( Z! Y2 T1 x: `; p: n + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
" g8 r7 ^& L2 ] c, G4 h if links > rechts & a7 b2 ~$ R" Q; a8 I" R
then: Q4 k" n$ z) @& Q* E
if @.standort.nf(3).nf(1).leer0 L0 g9 {9 F8 }5 q) ]: d/ p
then2 }0 ]' D5 B6 d$ G d1 U
@.umlagern(@.standort.nf(3));
/ S% p" t$ \4 ~2 n else$ Q$ n& m& A' ~! m2 d
if @.standort.nf(2).nf(1).leer
a( s" i" |; v7 `4 E o then2 V) J3 `0 E; `+ D
@.umlagern(@.standort.nf(2));3 @- M! i" m; G. w
else
9 W2 G; N2 \" {6 e2 k @.umlagern(@.standort.nf(1));5 t% N% C; b2 A5 K F* C! O A
end;
1 @# J! n6 n. \& i end;
5 r/ `3 M- W8 J$ H/ G, ]" f/ T else 9 l1 z0 S/ P: }, `% z
if @.standort.nf(2).nf(1).leer
* U3 z, ?9 ]; L' o. D' W% J then
. m. t& ~0 g4 x, [) e @.umlagern(@.standort.nf(2)); 4 V& _$ B; |$ R! l& A5 P
else
" E5 c+ N$ j9 T$ U" d9 Z" j/ ?, z2 z if @.standort.nf(3).nf(1).leer
; k8 F4 O4 B& W1 N then1 K+ x0 u) }% N, ^, o- h# f0 h
@.umlagern(@.standort.nf(3));4 |" v* i) u Y$ U
else
' R! }- {, W) H: q1 V2 k @.umlagern(@.standort.nf(1));
3 D$ j! }5 F5 _5 `) Y end;
0 ?9 H/ n) j0 L4 @: _' Z2 U end;$ O) @% ^# M( W7 N1 z7 u% v2 ~, E
end; 8 w; |# K2 L7 L- U! k- N# L: z
end;+ Q' x6 Y; m/ B8 z+ n
end;
3 u% j3 I0 I& y# ?if ?.leer0 `1 I v9 ]) u) d5 e ?* [
then, ~% {2 y( T- R6 t( F, E2 {9 Z
blockier_merker := false;: x* b, Q- ~9 {0 O8 s' A+ t
end;( ~: b6 a4 A& y2 k
end;
3 L g* V" r* q5 Y, F/ D- a大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |