is
5 c- [0 P3 m9 {2 Y$ n6 E, Y- y) ilocal links,rechts : integer;" Q1 |7 Y' V& ` ~& o+ x
do" Q9 Y, X- e a% Y* E( o2 g
if @.standort.nf(1).nf(1).voll
" r f8 c; E5 Y: H. b/ ^$ ? and @.standort.nf(2).nf(1).voll
1 S1 ^" I% W* D3 ` and @.standort.nf(3).nf(1).voll
/ U( ~* a; D% q ]4 p1 c then
0 r: ]9 m- `3 z- [. ~ blockier_merker := TRUE;
" @ I" `- P& @, f( l* {+ P& a else$ s+ r, W0 Z4 s1 z
if @.standort.nf(1).nf(1).leer7 y4 c7 v$ N6 F, D+ h9 x* I% D
then( k7 W' b& }: O6 [% }6 O. l
@.ziel := "ap4_C";
7 @( M7 F0 F Z+ B3 Q! e @.umlagern(@.standort.nf(1));
* ]6 ?# `5 {0 N+ Y' ^ else
+ b P$ S- E+ }+ p! p- j% W' H& R links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
6 A- i: Q- }/ I8 V + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
/ R6 m7 c. p; L4 C, o + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
. S0 P1 N# [' `6 z) k7 t rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
. x/ o+ o$ r1 i% q! V + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
+ B# T3 o) u! s3 }- e1 x+ a6 q/ b + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;" z# k! A; e; F6 p% }
if links > rechts / m: j5 N3 @' ?: D; i# E) M+ F6 e! V
then
0 G' W! Y: }- F# w& J7 G# n( _6 F if @.standort.nf(3).nf(1).leer9 t% v( f p7 f0 S. f
then
w$ j5 w4 G6 f1 f @.umlagern(@.standort.nf(3));
% e S. Z( H! N# h4 [+ G# d) q, C else
( W( R+ G8 n, i/ o& ^: @3 I. y if @.standort.nf(2).nf(1).leer$ w: C: |, e% ]! d
then
4 }; E9 A, ^2 g @.umlagern(@.standort.nf(2));
" G8 t9 ?* K, V7 H+ n6 l5 C K else
L2 V' d- ~. [ @.umlagern(@.standort.nf(1));& k3 e. F) c% M7 N3 s# I; b8 w
end;. n' u6 o7 S3 U+ p' q$ S& W1 e) I1 h$ j
end;6 k2 b% t/ t2 N4 u
else ! W- z7 O0 T2 n7 [7 E0 m8 s: Y
if @.standort.nf(2).nf(1).leer
; t' |, C; c# v( `$ ~' W then. d9 G# Q$ L# }
@.umlagern(@.standort.nf(2));
) N8 |% X- _. b: n7 C4 c% Q% Z else
9 w# h0 Q; w g if @.standort.nf(3).nf(1).leer: `, [" Y6 b, l& @
then/ B. X7 w9 N; t% y# k I- M
@.umlagern(@.standort.nf(3));, o) Z7 E# U% i4 F, M
else+ ], a( f" i0 F8 B. j9 ~$ a; V
@.umlagern(@.standort.nf(1));% y- p+ i/ K9 U3 p7 U) ]
end;# z- k6 M' v* b# b4 C1 L. s% v1 |6 P
end;
7 B# X8 N5 z7 @- ~1 V+ E end;
2 N% q# x8 q% J3 z3 f end;
( o: Y; ]1 B4 @2 k end;
6 P, b1 r( k1 o# _. v5 nif ?.leer
9 n4 n, _: c4 u3 |then, k8 ]+ U* ]# F$ {2 q0 M# i. d
blockier_merker := false;
. Z7 v1 w6 m$ q' w% w$ v! @3 Rend;; e- u& y3 h- Z" P. ]
end;
$ z1 v; a# r/ q1 J- R- V4 V- j大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |