is1 {( \5 J3 r0 V7 x$ b2 h
local links,rechts : integer;
7 g$ S! e& O1 [- d4 Jdo ^7 `* S# y3 [1 F. ]
if @.standort.nf(1).nf(1).voll% Z) N7 d( @1 Y. t
and @.standort.nf(2).nf(1).voll; J" S+ y' O, ?5 |% _
and @.standort.nf(3).nf(1).voll/ t* w5 c5 }+ M2 C9 F
then7 q1 z* b3 F' k; i
blockier_merker := TRUE;3 B4 w6 f6 X: d' z
else
' V/ F% ~+ g) y0 x5 K! H" b if @.standort.nf(1).nf(1).leer; g) k2 p+ Q) p8 k
then' q; U# O& o% F$ @$ Z) R' A, V( x
@.ziel := "ap4_C";! M. Z4 n7 d$ ~, J6 Y9 a' K
@.umlagern(@.standort.nf(1));
! i' r5 l/ R, N* P else: u! l- W3 ?! L- s% q4 T
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs : D( M: h! C, `7 i6 N
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs 4 r( A1 x# t% G
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;: j3 }, M2 P9 V: I+ |7 j
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
, z9 ]6 h' s. `0 b + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs , Y& } L5 M; H5 h* k/ x' a
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
, U5 D3 i E- w% I if links > rechts 6 M, r# `6 }( W' K+ @: n
then
: k+ {. A: t0 [( A* T0 Z) M f# \: b if @.standort.nf(3).nf(1).leer$ E$ N( S- k( V
then* @* c" Q/ A9 X
@.umlagern(@.standort.nf(3)); 3 E3 c% _. W+ ]( I a: D% m' L
else, D# {* m) M- ]
if @.standort.nf(2).nf(1).leer4 H( [5 A% x# K5 _6 c8 M" z
then& e1 O9 j& a- E: g9 G
@.umlagern(@.standort.nf(2));" r; o! w X& w' |6 H- t% {
else" q6 ~( f! d5 {. B7 O
@.umlagern(@.standort.nf(1));6 w' _* [& B& L" M( m
end;/ g: S) F# y5 g6 x$ s: r( @
end;
7 y; b4 B& g% j$ @( c/ M. h2 A else
3 W: w. l# W3 t0 ` k if @.standort.nf(2).nf(1).leer; @ m( A9 E9 L) ]; o. q# r
then V3 e& J) b/ }9 Y/ O8 _; k3 Y" P% n
@.umlagern(@.standort.nf(2)); ' G. Q" ]. x7 n9 o( A1 ]
else: K" h, M- _* J/ Z
if @.standort.nf(3).nf(1).leer0 ^ z: T I" Y( [" @
then
) u O x$ S" t @.umlagern(@.standort.nf(3));# E; ~/ n" ~6 K! f# N
else' ?' Q$ X. T5 n
@.umlagern(@.standort.nf(1));% ~5 P! J* G7 B
end;
0 D# x& l E! S5 b/ V end;& U* p( F' u; p. B* Q8 [; ?, {
end;
) U, I' _/ ^/ ?+ e' R end;% r2 v# b- O9 x5 S9 c( S
end;
3 h A' J4 v+ c0 Mif ?.leer
/ Y6 a! ?6 R8 Fthen" ]2 ~: X5 y; W y$ S$ K- K8 o1 ]) ]
blockier_merker := false;( {7 G q. d6 X& [/ T$ D! M
end;
0 H2 Q1 B+ B: Q% ^end;6 j U n- k! Z" a
大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |