is F8 [1 i& V& ]9 X
local links,rechts : integer;
% T% k x0 C, ddo
! T: G+ r$ T0 @& j" q if @.standort.nf(1).nf(1).voll
: p5 w% d5 k7 W0 Q0 x and @.standort.nf(2).nf(1).voll
: x6 Z) o" C! i3 ~1 M and @.standort.nf(3).nf(1).voll
* T3 K: x% s* s, K: _ then
( ?5 D: s5 A0 E blockier_merker := TRUE;# v, B& z* f' y; i) u- a, F
else% H8 t) [- l/ c+ i7 J4 V
if @.standort.nf(1).nf(1).leer$ s4 [+ V3 ^0 _1 d' @
then* \' e5 M+ ~* ?( q. J$ `
@.ziel := "ap4_C";
" W4 y, z% U8 d @.umlagern(@.standort.nf(1));+ z2 x# E5 ~4 q; z: I
else
, Z) X/ O! u2 J0 \/ H" v% ?& O links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
5 {2 ^1 w i& T1 m: v + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
) G* I0 r* E) Z3 X# l" ~1 b + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
& d! ?& [0 P" C" T; ^ rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
0 d3 S7 H* u/ v# ^3 c + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs 3 s3 v/ N5 b+ A. T
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
0 }; m2 y8 ~. D4 a( [4 J if links > rechts ! B5 P' e. j9 Q4 a# T8 c8 [: Z
then
_" R* {/ m8 D' V7 y7 v. p b2 e if @.standort.nf(3).nf(1).leer
1 Z: k/ i5 w4 @) t# L then
0 @ R. n0 M5 M7 D5 K6 M/ `0 c @.umlagern(@.standort.nf(3));
9 m1 c. _ ^9 a. T i* }# x else
6 @9 f) G1 G% @* z n. x if @.standort.nf(2).nf(1).leer6 x- r$ M: V+ A. G7 R6 J3 |; }
then
% n, p& {% {( W q* s @.umlagern(@.standort.nf(2));
/ @) ^1 a$ i2 e3 F9 F4 s else
# J( s$ x/ m5 r @.umlagern(@.standort.nf(1));9 x- L- Y& t0 t- Z* i
end;
8 P% q+ P. Y, ]3 V/ I8 d8 n end;
4 y4 K% W, x$ h7 d! |+ w- F else
, j1 s2 d/ h9 | n' q if @.standort.nf(2).nf(1).leer( w. Q7 S5 }" Z5 x4 ~3 E% ~
then- x$ P4 M2 {9 t9 D' C3 V% y) d4 p
@.umlagern(@.standort.nf(2)); ; X e9 T% s! d* I; V# B( p9 y
else
1 U9 P0 ~* Q. { if @.standort.nf(3).nf(1).leer2 S; Q+ e) W) n
then
- ~; a/ \9 I: Q2 e# | @.umlagern(@.standort.nf(3));* P3 h( C9 V* g, ^3 S, x
else
+ B; r t' G% ]+ y @.umlagern(@.standort.nf(1));+ k0 ?1 `0 K% }7 R
end;
( i* m9 Z% n! k @ end;
+ S" c1 l, d' k% s% P; Y end;
6 t' _6 z0 ], _" Q9 R end;5 }! `' T3 q/ B, r
end;( O' q2 B4 \+ {
if ?.leer
: S' M, E# { B, V8 c! Q1 Uthen K( k9 b( c) o' Z# h
blockier_merker := false;
5 V5 t* C1 y. Nend;
) ~% X. x+ W& U: R; S Send;, d9 r4 ?8 n ]$ p- L4 ]8 a
大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |