is
3 k9 k i, w% _local links,rechts : integer;9 s3 M3 @" }8 o
do3 ~/ g1 |7 q* D) M( o- w0 Y7 E( |8 @
if @.standort.nf(1).nf(1).voll
* p4 w! I% F3 A; n and @.standort.nf(2).nf(1).voll: |8 ?0 _1 ^6 b3 H: o# A
and @.standort.nf(3).nf(1).voll
! r5 S7 b0 J, q( t* j then
7 J8 d, B. g o9 S9 R) @ blockier_merker := TRUE;7 l6 W0 D' H, q0 E* w5 [- C
else
, @9 v8 X, I R2 W; n5 O0 i if @.standort.nf(1).nf(1).leer
8 p4 Y3 C# l$ j3 w- M: W then
+ d6 q- ` o4 v! V4 d @.ziel := "ap4_C";
7 G( v0 D9 k$ s, C* L1 p @.umlagern(@.standort.nf(1));2 F) ~7 f2 [4 J# |# u. J2 M
else, L: K& p/ W1 y3 s* B
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs ! P; k& g; H# o3 ^0 ^
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
. p$ e ]1 } J! H B' R; ~ + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
" Z( a! E/ }4 ]5 g6 v2 `( E9 q8 H& K% r rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs 5 d) L6 q7 \& M3 u: c' Q/ t9 Q+ j
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs , n; d' l; `: g Y. s
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs; G4 p0 Q# {; C, n+ i
if links > rechts
; L; H' I* M+ s8 _ then
; W* p f* {% }+ ?. f if @.standort.nf(3).nf(1).leer* g. J/ J) F, o7 k5 O0 ]
then) h: Z% e+ C1 t* N v6 B) v
@.umlagern(@.standort.nf(3));
7 y3 }; f* W7 A4 I else
8 l1 C1 l/ K" G, o, S; U* Y- \& Z( h if @.standort.nf(2).nf(1).leer
; z2 q0 j5 h4 z# C then+ q) Y4 n0 m1 n+ L
@.umlagern(@.standort.nf(2));
* l( k3 y8 x7 h; q) l4 n else
3 f# B5 X- U4 V& W( d @.umlagern(@.standort.nf(1));
0 b) O0 a" q9 v end;
( J5 }" V( |: O+ H end;
/ Y) i$ q2 w, }& t. M H5 H4 E else
0 g& d" P' j& @0 J! q if @.standort.nf(2).nf(1).leer7 W$ I9 v$ s6 T2 M7 Y4 B+ z" E( |
then
8 K2 ]1 B; X; w9 [* ]+ K @.umlagern(@.standort.nf(2));
% Q$ b! M$ P9 p" \" p else. P0 o v8 D5 O1 P# E; S, M' ^* A
if @.standort.nf(3).nf(1).leer3 r/ g0 J3 Z8 \+ f9 H! v5 f
then. S4 Q* l! R% g
@.umlagern(@.standort.nf(3));, e6 C6 X) g" r
else; x8 M; |& ]) X; b$ B
@.umlagern(@.standort.nf(1));& Y( D' F2 A! h$ W
end;
) H& M; ? Y# F- @" S# |( Q( m end;
, Q1 I e# S9 N, j D end;
/ m3 `& ~) [ d end;5 b5 r7 d: I6 g7 s) \6 L# F; [
end;
& g# ?2 d! O$ w+ rif ?.leer
" n* n/ Y- q. H$ ]then
* {/ T5 ^) x4 { blockier_merker := false;* k/ @7 m+ k# U6 x7 h/ B, Q
end;) W% e. v: r8 e* w& n
end;
8 O/ `2 X5 V* b大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |