is" F. P, G, A5 S" f: m6 l- ~
local links,rechts : integer;% x& c( y/ P8 ]4 \; W7 L2 l8 R
do
& z: j! f" x; e- n3 e/ U if @.standort.nf(1).nf(1).voll
8 c3 ^( Q4 ]6 ~* z and @.standort.nf(2).nf(1).voll8 r$ g+ O4 t; a1 a( A
and @.standort.nf(3).nf(1).voll) C" N( Z6 v, M% E8 ?" m
then
! o: G/ ^5 t+ ^1 V blockier_merker := TRUE;& K, d- P$ c9 Z: c- g* w i$ P. K
else% a7 P" ^) x# f) ~( p. x
if @.standort.nf(1).nf(1).leer' g* {% Q4 |" B* Q# `8 j
then [' P! m; X/ q( @& B1 M8 l' }0 D2 i
@.ziel := "ap4_C";
& Q0 E$ U" v; Z4 [7 F+ W4 z @.umlagern(@.standort.nf(1));
- t8 n% g6 w- [6 g else
/ k M( C. I( K2 L3 m6 ` links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs 7 D2 o' r v, R$ o8 ]2 ]+ C% X
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs . Z7 l8 e- ~: u( J- L1 g
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
9 z9 e& H: i: o1 {2 F rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
" e- V e, e7 j2 W5 Z + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
/ m2 D8 E# M6 J5 u + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;1 [/ p; c- E+ B, v, r5 g/ v
if links > rechts
; i4 ^4 v# n; g* C" M2 d9 e$ V9 w3 ` then* v( d$ e4 Z" B6 C
if @.standort.nf(3).nf(1).leer
" o9 _% l: x" s then
" O1 ]. g# z3 K9 X% @ @.umlagern(@.standort.nf(3)); 8 h" c! f7 L/ C1 ~
else5 l0 k* R! h7 z ^
if @.standort.nf(2).nf(1).leer) H4 B" x) T4 ]+ J9 P6 R
then0 A4 C C: T2 v5 @; h8 e
@.umlagern(@.standort.nf(2));
4 i. v0 m3 }- z( i, V else" j/ Y) u. E6 K3 y B5 `/ M7 c
@.umlagern(@.standort.nf(1));! I( c$ W/ H- @* K7 M
end;+ A6 N+ L+ r# \. L% M1 \3 [! z5 R' E
end;
% h- s& V% D7 ^) } else
6 I( G1 K3 P6 \6 S% C if @.standort.nf(2).nf(1).leer6 Y) V8 W! ~) `
then
4 j, o4 @. a( F9 M @.umlagern(@.standort.nf(2)); . B f( j9 l* j
else
1 C$ f8 U4 S5 R! R. U" l" l if @.standort.nf(3).nf(1).leer7 @ d( u' s3 C3 J0 ^
then" m }) \4 M- I/ ~/ {0 K) x
@.umlagern(@.standort.nf(3));# G) e, a' |) B, V3 Q3 m2 e
else
6 ^1 q5 _0 {2 M% Q @.umlagern(@.standort.nf(1));0 {2 d4 Q* w$ m: s* Z' ~. V& L$ ^
end;
( ^9 {& G. H" P' O. d$ g6 A& S+ H4 X end;
" @0 ?$ {- B6 \1 w: e4 c end; * c7 Y5 W2 v8 E/ J, g& m( F2 \
end;
. u; D* F; t" k2 M end;
d# J# q# X4 |' {" Y7 Nif ?.leer
4 E6 k; H O2 a M" `7 y( Lthen6 e8 |6 t% w* S
blockier_merker := false;6 n& J% f# I5 I& b
end;1 V5 `5 O8 V2 @( X# h! Z: n+ l& r
end;
6 @" d9 u$ T, W( ~大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |