is3 x! I7 P& Z# ?4 t9 x: D. P
local links,rechts : integer;
* P. q8 m- q) r4 Xdo
8 H) d {1 K6 Q' ]4 t8 \$ h if @.standort.nf(1).nf(1).voll; C) L' l- o0 B. d( N
and @.standort.nf(2).nf(1).voll) z1 ^: n; f% K* d- \0 f
and @.standort.nf(3).nf(1).voll! P8 Q8 Z& S$ H
then Q( S) C9 k2 D- P2 Q; F
blockier_merker := TRUE;& t3 x& V: R6 W& p. Y' m
else- C( A' f& [1 t. V
if @.standort.nf(1).nf(1).leer
* q- y( [) G- d" V then
: l! Q9 p$ k) g. h% U) I$ H @.ziel := "ap4_C"; K4 y# c* c$ ]" e
@.umlagern(@.standort.nf(1));, P- o1 N# g3 v" L/ [- K
else2 B% @0 _$ s+ D1 P* P" p: W& ^9 F
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs ( C5 ]4 @; ]) a8 ]% a; ^" f4 ^3 _0 j
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs 1 D4 v! A3 [* s- N
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
: a, N$ p% S! T, v2 \ rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs ; N* K) }3 b. C: \: o- A
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
' [5 c+ Z# l a8 }0 L. I6 M + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs; U4 l+ {! I/ B' p
if links > rechts
( O* [ h F; F# w4 [ then5 W7 ^& S: G# `9 t: A
if @.standort.nf(3).nf(1).leer" ~3 p3 S3 Q$ Q. u# ]0 X
then+ | e* c7 F7 h& q4 }7 f
@.umlagern(@.standort.nf(3)); : W2 S$ y' T3 \% \8 j1 y3 E& ~1 U
else+ e1 B+ M1 N+ `' u
if @.standort.nf(2).nf(1).leer0 G+ J6 ^- ?/ R) C, T
then
5 O" k& L9 P8 M) Z @.umlagern(@.standort.nf(2));
* t& l- W* [5 H2 e) J else
- k+ f, U% B( E @.umlagern(@.standort.nf(1));8 \6 P0 e1 ]4 ]. J* r$ a/ Q" _% H
end;
3 H& \3 c' F& n" v end;
( L1 Q$ X3 ]3 j3 i7 @ else
# D/ F; p- }5 N8 p7 j8 [8 G/ A if @.standort.nf(2).nf(1).leer! ]4 ~% j7 N# ~ c. F7 s
then
1 f6 D/ [3 ~9 E3 e$ V @.umlagern(@.standort.nf(2));
# w9 g& G% k4 G* H# j else4 K% L. u' Z- B+ ?
if @.standort.nf(3).nf(1).leer" b1 D$ L1 _# H, H$ B
then
6 D7 T, [/ N7 V# n3 j5 z) G; g @.umlagern(@.standort.nf(3));/ E# r- y5 k8 u% d) P
else
5 c3 h4 N& v- C7 u* p' G. x8 p @.umlagern(@.standort.nf(1));
0 R! Y, z/ F' S! U1 r& G end;2 V: Z, w1 F# X$ S7 ]4 b
end;
o6 O- Z$ Z# T2 O+ D end; ' }5 c1 w' [ V% D g# j5 ]# U
end; K5 m6 c1 ~: W
end;6 L" h9 p) j' j9 N( e; u5 K
if ?.leer: ?2 b2 L% A# S; Q2 R& b3 m* m) K, [
then
. Y y# ^) K' Z/ |6 w- Z blockier_merker := false;
+ T. @) E% o6 O: n4 o3 E& Jend;
$ r$ G0 i* ]3 X z% E0 wend;
/ o1 e; ?1 m: c7 ^0 o' t大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |