is
* W4 z8 u6 g* Z4 ]8 c' tlocal links,rechts : integer; L' w4 h6 R4 S3 h6 y; G& P
do3 M2 A+ R( _9 }. r4 Q0 v: V
if @.standort.nf(1).nf(1).voll
! q% C& {! z+ S# E& P0 T and @.standort.nf(2).nf(1).voll
* t( e Z4 u0 v$ m and @.standort.nf(3).nf(1).voll. k- g% \7 K: P/ X0 [6 r
then8 }' C4 @8 }5 e& w# F% ?
blockier_merker := TRUE;' H3 k1 K: s% G5 l9 {
else H: q4 e$ E/ b$ ?6 c2 r; a
if @.standort.nf(1).nf(1).leer
4 _& _4 i* q# c2 C- g" t then
' ?( D& X' t- C8 ?/ m @.ziel := "ap4_C";
1 t. [) y1 l1 R- |; ? @.umlagern(@.standort.nf(1));
' e) W6 J0 A. k: z. C4 k else3 }, K3 A$ \ m/ l5 \
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
) O( R- U% Y* q, n: f, ?& O + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs , v! E3 L' s& f# P3 h6 d8 y
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
# h! E% ^5 M1 D4 m rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
5 N9 Q1 P) G5 p" O" F6 y/ T + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs 5 J7 R' \( z2 ^" i/ } ~: Y
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;* b9 @$ [4 K' q; g: F
if links > rechts
9 i) Z1 @" X0 X3 g% W( O" g then
6 Z! A; C, U* X: H& E! b if @.standort.nf(3).nf(1).leer
4 y2 ^% @3 S, i; M l then# S* j7 _2 E) @# X2 x% ~, t' S ^
@.umlagern(@.standort.nf(3)); " ^1 B& g1 [* }! E6 Z# I; U: P6 K
else
4 t* z8 X' z+ S+ w2 J, v) \! E if @.standort.nf(2).nf(1).leer
2 R/ z7 E& t8 q! v then
$ e$ Z' `$ Z8 ~ @.umlagern(@.standort.nf(2));
! B2 t. p- _& E' }5 b k' @- h2 z else
, F& T. ?1 Q# |+ |# O& z @.umlagern(@.standort.nf(1));
$ R1 n0 u/ \7 w' X* x6 S, [- h end;
8 l, o2 T5 e0 B; {" C5 y* q- N# f end;% b; a; c% c A% [) ` n R& T# A5 t; n
else
9 Y0 W; |9 P9 h' x if @.standort.nf(2).nf(1).leer f& h$ N8 C! I' s; n) D& B, j' D
then! g& q+ ~6 H t# T5 `! s
@.umlagern(@.standort.nf(2));
9 G# t; k7 }! E, c4 {2 G2 ~ else) U7 f" W: B, A9 G: ?
if @.standort.nf(3).nf(1).leer
1 u# [5 k$ O/ @ then
# x8 K/ L* {/ b+ b# g/ T @.umlagern(@.standort.nf(3));
9 z7 v- h! n4 @ else4 v! B" V4 }' Y) `4 u
@.umlagern(@.standort.nf(1));
6 `9 n& C( Z/ f2 Q+ J; P5 _ end;
9 f, o7 \% D$ {3 p) X3 F& B end;
# p$ b m! H8 u. @ end;
! z* n6 N" i( i/ n& D3 S end;
! G9 j# Z/ Y9 z end;6 j' s p+ O) F- d2 k
if ?.leer( f4 S0 D( {+ ?
then
( s- h2 [- v& E& v6 j; T; w7 P* d blockier_merker := false;3 L1 Y) `8 Q m, `! j9 \5 d
end;$ e! E; _) X% M( I, X
end;
# C2 J3 J: o# Z; t% Z# k$ g( F+ S大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |