is; c4 g9 Y6 R* a) e% ]* A% n, t
local links,rechts : integer;1 P0 J" s" J: l( z
do5 h D8 \3 g- j) d
if @.standort.nf(1).nf(1).voll
" r( v4 f! x# M2 M2 \% k and @.standort.nf(2).nf(1).voll) U# i% R' T7 b, {( f1 ]. e
and @.standort.nf(3).nf(1).voll
3 W9 n/ J8 d8 i) R( {6 T+ D3 W3 q then9 ~# Z3 T' o: u% o) x
blockier_merker := TRUE;9 V% S4 Z) T3 N5 ~
else. q" [0 _3 J8 X0 e/ g& B
if @.standort.nf(1).nf(1).leer
6 v/ W) H- a: C: g g5 v then
( d* I; Z9 M0 g# w& u @.ziel := "ap4_C";2 m5 f5 S+ i/ N& a; L) n `0 H3 H1 i
@.umlagern(@.standort.nf(1));
& S" d8 E* J5 M0 S L* [ else( u$ U$ P4 h( b" i5 Y" L
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
5 V7 a! k" Y) K* Z& ~ + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
- ]/ Y( \: X1 Z + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;% G5 g0 q4 f0 { u0 Q; `
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
, l2 p( B6 i( I, L + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs - @9 Z3 {' h ]$ W
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
4 I7 \4 u2 r; R+ x, U* q if links > rechts ( l& S/ z {0 U4 `! e: Z
then
4 R% m0 L( j) y- k9 Y if @.standort.nf(3).nf(1).leer
' Y' H8 J1 ]$ q7 b( E7 \9 ^ then
3 i: |3 }4 d) J2 C1 Q5 P9 t% ~. p$ \- k @.umlagern(@.standort.nf(3)); , Y( U. w- R+ D, v) Q+ X
else
4 M- `6 i- U2 ^- H" f" t* N if @.standort.nf(2).nf(1).leer T$ M! { a; O5 j g6 T
then$ Q+ @& R; T3 P6 Y
@.umlagern(@.standort.nf(2));% x- n C [3 {
else/ Q4 K0 [) q: p
@.umlagern(@.standort.nf(1));
' Z' _ s4 K a; \1 H# }8 v$ |$ m end;
6 ]6 Q( b+ w, C end;: O' ^0 V! t. P& f
else 1 ?# @; a9 J m. P. @% v9 d( M7 x
if @.standort.nf(2).nf(1).leer1 s* V: J: k8 N3 s
then
- @+ X6 H! ?! S# ^' B4 d2 X5 @ @.umlagern(@.standort.nf(2)); . J) G0 y$ ?: T( r% E0 ? x* ?
else& t: I& { Q" g% G+ D8 y
if @.standort.nf(3).nf(1).leer
7 l( @% |% z- v) v then
3 w* j0 o# p5 j( i# U @.umlagern(@.standort.nf(3));
8 X) L/ y% D) k3 f1 M8 U( A else
% }1 s# f2 `: i8 d n; e; I @.umlagern(@.standort.nf(1));6 s- v5 G/ o& Q
end;
. W! e! `$ d" i6 R1 D" D end;: u1 |7 w% i" g
end; 4 y. B; y$ Y" t* o9 J- {6 V, J
end;
S4 R# ~! c" r; h8 G' o* n9 S; I( r9 O g end;
1 B- s1 ^" Z, T( L5 H$ O9 G0 Fif ?.leer
2 }% C4 T f7 Q3 U, K3 a/ qthen
0 u1 e8 d& k5 A' F! ` blockier_merker := false;8 O F9 R+ x3 p. f2 W
end;
8 G3 m9 f; i: }( }) \end;
: P4 v4 w; k5 `+ b- u/ d大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |