is- S3 u& m; }- K$ C/ ]$ ], a
local links,rechts : integer;5 W" ^* q$ a7 [" k$ s
do
: f# U4 Q; O$ d5 C; @ if @.standort.nf(1).nf(1).voll
; E. [3 p; S; a and @.standort.nf(2).nf(1).voll
0 y: i- V# p* e" W% ] and @.standort.nf(3).nf(1).voll, H& Q4 T- t2 y. `3 G3 e+ s8 f
then# z6 g i3 j4 b1 Z. [
blockier_merker := TRUE;7 ^% o- f$ P& m* d. M
else
/ k) G5 d$ J, c! k8 P if @.standort.nf(1).nf(1).leer
' K6 f+ M: D+ {' Z* ~! d then9 n F7 ]- w# l+ O- d# H
@.ziel := "ap4_C";, V) M3 ]0 x/ g
@.umlagern(@.standort.nf(1));
1 P, }$ o6 M# M0 {$ {7 ?/ e else
3 p1 P1 X' o% M: ^" s5 z9 S N" m links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
3 H1 E. q$ B0 L: ], G9 f" t + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs . G, c( c' a0 l+ V5 a& o# C/ S, y
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;; ?" m- v( I; B3 x4 Q
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
. h+ U8 a5 F! Z8 w + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
# ]% [; p. a% Q) o% e5 [* N: z y + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;1 C/ \( y9 l. L
if links > rechts G+ U9 x7 h. t& J
then Z: {$ i; G/ H$ Z4 y5 ?( r
if @.standort.nf(3).nf(1).leer
, A4 `! h6 H8 N! \: I- [9 G4 H9 ^ then; ^, @ D9 _* v- U/ ~
@.umlagern(@.standort.nf(3));
2 W$ k5 a& [) j5 y else
8 j' Q& P" @' n# C) [) L8 Z if @.standort.nf(2).nf(1).leer
' h, l1 P1 _- P6 e. ] then) M1 Y5 e6 S$ ?4 c9 b
@.umlagern(@.standort.nf(2));
1 t, D* C2 l0 ^; \4 Q# p0 g" s else0 Z r( ]" [ P4 ]# k
@.umlagern(@.standort.nf(1));
3 T8 p/ }, {$ H# b end;
- a J+ {# P* b s% x* v: u end;
8 a D! M9 F) x4 S2 D- m else 6 s/ H. \; _4 ]8 f; M, [
if @.standort.nf(2).nf(1).leer
i# t$ Z! V. m- {! b9 |1 O then
4 k6 n4 F; u- ]" a' C& E @.umlagern(@.standort.nf(2));
/ Q y0 U, U+ z, Z5 U" N else4 u/ M$ `5 j6 d* ]$ o* o
if @.standort.nf(3).nf(1).leer
7 f* e6 I) q5 e: \) k+ m8 \4 T5 o; g _ then* [) s8 I8 M" n7 |
@.umlagern(@.standort.nf(3));
0 `# T, d1 Z$ L2 t else
3 j$ b K7 N2 { W @.umlagern(@.standort.nf(1));) c) m3 x1 @5 X
end;
* l/ Z: Z+ w% P- X i% ]& N+ ~ end;; T$ q& E* f" _ Y5 W7 u+ q
end; 5 h5 z2 ?* q9 ]
end;$ m* n$ P' }) c) h
end;9 L2 J& E" x* |! c0 `$ U# J
if ?.leer
$ B" P3 f) ^# Ythen
, t, b {& g$ ~8 Z/ c% w- g4 j blockier_merker := false;% q5 l& [# Y# r2 g7 B% C
end;
6 w& w- I, r* p( J) [0 g3 Eend;0 t) t4 O+ M/ N9 T4 K5 L
大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |