is: l3 u& H3 R& K/ y9 k3 g' d, `, ]) T
local links,rechts : integer;
5 t" R/ O8 a2 ~do
. R% W3 I9 x$ q- @& A if @.standort.nf(1).nf(1).voll; [% i K/ U% z
and @.standort.nf(2).nf(1).voll
/ e0 Z1 g4 A. P3 j and @.standort.nf(3).nf(1).voll
$ y1 t9 f5 Z# f/ \6 o, `; ^' A2 J then
' b6 y% k( S- s# J! e- t blockier_merker := TRUE;, ~6 x( R. w1 L: c% d( ~" Q/ f
else8 W; r+ _+ u& y
if @.standort.nf(1).nf(1).leer, q3 ~0 O8 s( u$ z$ m; K3 g
then8 p5 T6 K7 k" D
@.ziel := "ap4_C";: ~- B3 C. g3 \$ P/ e
@.umlagern(@.standort.nf(1));- e# J4 \ K3 b* p9 N( x
else( q0 q# r/ n( C1 w1 c
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs 2 z# w! b$ K2 ~2 L; k. G/ ^
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
. w8 q1 I* F H& w- h/ ? + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
U+ F/ p: w; v+ X# n/ F rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs 7 @% L. D! \5 E) Q
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs + G# j+ c) I4 W( S4 L6 L$ W! B2 W
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
9 `4 s$ y" J- V if links > rechts , D" D5 H4 p; t; G: g2 B7 I
then
* }& m+ z9 \6 \0 p# R- o if @.standort.nf(3).nf(1).leer; |% |( [* o4 g$ p3 t9 o
then1 F. G& n D5 t# x2 y
@.umlagern(@.standort.nf(3));
9 E# b! m4 @+ |# T0 ^# j else
! h$ A9 C/ ^' l if @.standort.nf(2).nf(1).leer5 Z' M. f5 v* q2 u5 x5 h* g
then
& O3 S' @0 Z; n9 w. k6 x @.umlagern(@.standort.nf(2));
# V/ y" ^9 t. e! G else0 S" t* D5 m' M/ I; ~( M. ]
@.umlagern(@.standort.nf(1));
" S$ U- }% P1 ^) Q end;
, D! L, {6 S0 F9 z1 w0 e% Q end;
5 n5 L/ l1 w' n+ g/ N% W; W. E; | else / q4 @" d# r" a
if @.standort.nf(2).nf(1).leer
_6 ]5 V( c J then
+ ^7 n% f, m% K4 l" ~ @.umlagern(@.standort.nf(2));
1 ~0 y6 h k R. w7 Y else
% a4 [9 \2 r0 A/ E8 D0 P if @.standort.nf(3).nf(1).leer+ r9 f/ F5 M$ B2 y2 Z% z& n$ n& `
then
' x) l) w* a% a& E/ K% [ @.umlagern(@.standort.nf(3));1 m0 s4 n% f5 l2 B4 |
else. ~5 R: i! W& x4 u& B
@.umlagern(@.standort.nf(1));
4 O A3 F1 ]; W% M! t- ` end;- a6 r; {% q$ y1 s/ r6 o
end;7 K+ {2 \# n) T
end;
, d. H* H# ?2 z; C! G6 p end;
" z3 {& d$ ?& r6 y* L4 z end;
6 V, |6 \! ` v! B+ @if ?.leer
' u; r: ]8 Q# @& h% M4 X, y( [6 uthen
5 t; D+ j$ M7 U& b0 ]' z/ c! n blockier_merker := false;
7 D- ]; b; U; X& Pend;( s& z2 y, P q1 B; a
end;
* v7 D# X. y6 i1 K' G1 s) I, m大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |