is- k# N: ~# v0 ?) u+ h
local links,rechts : integer;7 E/ w/ T' j: y' a' l
do: U( K- [, D) B3 F
if @.standort.nf(1).nf(1).voll. |; g9 b1 ] ~$ r; } q/ V
and @.standort.nf(2).nf(1).voll
% X3 g7 F* V2 G' @. G' W' T9 p+ ~3 n8 }7 _ and @.standort.nf(3).nf(1).voll/ S( n; K8 j8 h- I
then4 Q3 k. }1 [1 Z9 w
blockier_merker := TRUE;. v M$ L, V* m+ i- k
else
7 O, Z' v: t' T if @.standort.nf(1).nf(1).leer; ~ Y7 ~; c# Y3 T: I
then& m: D7 h+ ^( E3 k: {5 ^( v, N
@.ziel := "ap4_C";
- Y$ Y0 a3 Z" ~( A0 ^# A, L+ V @.umlagern(@.standort.nf(1));
/ I0 O/ x3 y* R. @% Z3 n) z3 J2 ~ else" Y% ?3 J* X4 `
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs 8 L6 Z% t; }. D% W
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
8 Y# Z4 l+ L0 N# j+ n2 t) W + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;# a9 U$ s. _7 b7 b! [
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
g# c" C) P/ } ~ + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs ! K2 m+ \# \" ]3 c
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
9 F( W0 Y/ p$ g# ?: B if links > rechts
0 K! S3 }* c9 u. |4 c# o then
8 O' S" V3 l, j" o! s9 S. t# f" Q if @.standort.nf(3).nf(1).leer* C& u* p& d" j0 z5 m
then
: h: L$ D$ Q; R+ j J @.umlagern(@.standort.nf(3));
! n- i6 F) D' O. ]0 s$ i else
7 P3 f2 `2 _/ v# P0 X; z if @.standort.nf(2).nf(1).leer
' k' I" F$ b" _! v0 p8 K5 s then
- N6 W; @3 W$ L' E4 D; p3 q @.umlagern(@.standort.nf(2));: y) i7 x- y8 i1 F8 l
else
! ~6 q+ F( x6 B' i8 P1 P @.umlagern(@.standort.nf(1));
- a4 {, D9 e0 _+ v7 ` end;/ p3 N# C, V# f0 x4 h% |3 H0 U
end;: J7 l6 f- ]6 V$ X5 {8 R2 F
else - Z8 C, Y { D9 f& {: L1 y
if @.standort.nf(2).nf(1).leer
+ w6 L6 T- t* r. ~9 x$ w: p then
H! y- h5 B0 ^ t E @.umlagern(@.standort.nf(2)); ( T8 `& m! `7 ~ h4 v6 O
else% a9 {, w/ P- k
if @.standort.nf(3).nf(1).leer
! [) ], ?+ s9 X; D3 {+ ]9 |# i then
- f1 _4 I* O9 Q! j( x8 ^+ w" P @.umlagern(@.standort.nf(3));2 s" b# y: _ x9 s Q }
else) c: p& I4 j0 |! M- }+ o; G
@.umlagern(@.standort.nf(1));
2 @* _. d& t; A- c& [! P end; R9 _4 {5 |) H0 b! T; a1 `- f) s
end;1 O' Y" i4 B: K+ m% M4 g' P
end; ( ~0 w }7 F+ P: n% E
end;4 F" Z5 N U( \( _
end;
0 v% l3 p7 d, a4 o* `' `if ?.leer, R6 D9 }$ i, f: `+ \% Z
then3 t/ Q% R. n4 {- Q$ Y
blockier_merker := false;, ]4 J* c6 k' B* t& v( _7 n1 p5 F8 |
end;4 z+ g- u5 _! @& G* k
end;
% N( O* x1 v5 `. f9 W7 r9 Y大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |