is/ ~+ S, c( k. ?- q, F& S& Y
local links,rechts : integer;
$ D4 y6 y" y/ P1 q! f0 ^; c" jdo
9 y0 |) o7 y* J- G+ z9 c4 {* y if @.standort.nf(1).nf(1).voll
, `- _' N( S2 @& R; O6 P and @.standort.nf(2).nf(1).voll* o' E8 _( T L
and @.standort.nf(3).nf(1).voll' n3 W; u* s8 u- O
then5 e+ ~% {2 G" j9 H
blockier_merker := TRUE;
& A) U5 S5 \7 y4 b* t0 g else- Q! C. i$ \3 j& A2 |: A
if @.standort.nf(1).nf(1).leer! e1 c. b0 s% @# ]& t0 }& x
then
; V# L8 c% d: C$ d' ^7 ^ z5 d/ b$ Z+ Q @.ziel := "ap4_C";( F, o/ |) [! q" B; I
@.umlagern(@.standort.nf(1));
: O: o. s( S, d* D5 O' n else7 q' B3 S* N* h
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs . m1 @1 Y. ?2 o3 }7 K( [# X/ o* Q
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs 1 l! ~+ Z# _- h9 B9 m
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
' ?/ s) H# u [. d; c rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
% i8 E: V2 {3 r% X + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
/ ~' t" Y( Z" s + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
" f/ B/ X0 _. O1 ~ if links > rechts . D5 l2 F" h4 T7 s9 E$ e8 h4 N
then% B6 m# G4 R# |: e
if @.standort.nf(3).nf(1).leer, c, \( L" A& L" H6 e! g2 G- U: F
then
* P( ]' U4 s* O9 L- j) M @.umlagern(@.standort.nf(3)); 2 }- r* w, @1 c) |7 q: Y. v6 J
else' S* i/ Z# j# Q {# d( c
if @.standort.nf(2).nf(1).leer' S' d% y: B0 R2 F" n7 k
then) F! I/ ]6 R, A- t6 S0 s! h
@.umlagern(@.standort.nf(2));: e2 B, N( |7 `$ `$ f s
else9 T/ B7 X3 w, b8 V2 f# i
@.umlagern(@.standort.nf(1));
/ x" K' P1 s& ^ end;
/ \, m! Q" c1 ]( ^5 W! B- s! E end;
6 y: Q: Q3 ?# |% H$ }( d5 i else
1 q% p) p4 Y; e7 T7 _1 B% k if @.standort.nf(2).nf(1).leer
( F2 Q. L# `* h; W! q n+ { then
@) d: g, I* E8 {( v @.umlagern(@.standort.nf(2)); 4 i5 f# c$ e# v
else: {- t |8 Z% F R4 {5 T
if @.standort.nf(3).nf(1).leer& \* M" O* k+ j6 x' k* e# B) l7 D
then
& {% g5 M' _. ~ @.umlagern(@.standort.nf(3));
& W h3 A" Y, w' F/ U+ O6 x6 b else" ~' N. D% E! g8 M* _7 ?7 f
@.umlagern(@.standort.nf(1));
' O/ M; V' Z4 I7 A9 g end;
3 C& m1 |0 m! ^1 L% p" S- ?( l end;* }3 r% X- c( m3 s. v5 o
end; - V. y+ d2 V+ D5 k
end;% _/ {, t# Z* y( a) O! G
end;
3 n" u+ Y0 s( A# n( ^if ?.leer
7 }7 ~& h3 r+ ]then
5 O, o+ S1 N$ E1 m4 c blockier_merker := false;
$ K" k" E8 z4 N& ]# \7 v1 f: ]9 j6 aend;
) ]$ ~4 R5 ~% b1 U8 }end;
! g8 G% T) q" p; j& f# B大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |