is' a" d# U8 P) u$ C% _$ ~' F* X
local links,rechts : integer;
; |% h' T6 x2 t8 @) E" a/ E8 G& w) P1 V# fdo5 I z' p9 w+ b
if @.standort.nf(1).nf(1).voll# u1 j8 ~9 J4 {7 _; N" P* p9 s
and @.standort.nf(2).nf(1).voll
, C# W. a3 p, C; F2 C and @.standort.nf(3).nf(1).voll h! M6 w; c0 r# B
then* n2 A6 K; F0 E4 g6 L
blockier_merker := TRUE; X6 K. w& n S! L
else) c6 s, Y* s! M8 z
if @.standort.nf(1).nf(1).leer! t5 l% E( ~* k' m7 P
then. a2 U- e# E) M& c; r
@.ziel := "ap4_C";
e% [- K6 _5 P. M6 M( k @.umlagern(@.standort.nf(1));# _; M+ M0 j$ M' i' |- z' v: F
else
' S9 L) B) m7 i$ I, L links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
) K4 G0 f5 o8 ?5 Y. w% i + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
$ M/ e6 ~! v' L* B! }! ?: Q2 I2 a + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;5 k h! b0 I$ t, u" ^4 R
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
# t3 X; P3 I) ^" l' A# N" ^7 F9 S + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs 3 M& v5 w9 o8 R" H
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;# M' K) c$ }, Y* |- ^
if links > rechts * A5 l) H5 S6 {9 P( m, {
then2 }+ V* n5 A- @. N+ ~
if @.standort.nf(3).nf(1).leer
, _( [4 U) w9 ]8 m h8 j" S* s3 z then
! Z+ c3 U$ g! R2 g4 m @.umlagern(@.standort.nf(3)); # ]* o+ M# j) ~
else1 e) A- T; T& [$ c0 \
if @.standort.nf(2).nf(1).leer
$ {) q; k7 u0 I% C then
+ g* D$ ?/ R3 F7 p @.umlagern(@.standort.nf(2));0 ] H+ w$ y$ G% t
else, Y' y9 ^3 H' v& n4 `1 r5 n
@.umlagern(@.standort.nf(1));
1 _% [! }' G" Q: n9 X end;
8 x" g1 P9 L' G8 p3 N end;9 o P) r; U* z" {# G2 y& K/ f, r
else
& q% H2 ], p) `) Y$ N: p* ? if @.standort.nf(2).nf(1).leer' q0 `* j2 n0 P; P, D9 f# w
then
! A: k' x+ C: c- Z" x, C @.umlagern(@.standort.nf(2));
( e- r0 B; o5 |& i6 u; ] else- i7 P1 I2 L8 y: |! w
if @.standort.nf(3).nf(1).leer
2 d6 y g) D$ w& H6 O; u then
) L' Q: E; [; _9 S @.umlagern(@.standort.nf(3));
5 }. V8 P$ f: K$ S4 _& | else& d( R/ g) `1 \ F; h9 Z3 p5 [
@.umlagern(@.standort.nf(1));: J& _- j7 S7 c0 ?
end;
4 K0 z# P# v i" Q end;, A0 k0 t; g) t* i% n! p
end; 1 I. q6 Z2 L! C! v
end;
* d: n# a# K* N8 M9 v end;
3 k" ]% E) O+ C9 Eif ?.leer5 r; o2 ?+ `/ c/ m9 }( t
then
4 S7 [- Z9 X0 H7 ~& B, r# g- L blockier_merker := false;
& f3 F0 t z1 g0 Q+ k% b( mend;
, W& A1 E2 E. S( n" w; A# zend;: H/ _5 Q$ l6 ]3 i1 A. V
大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |