is+ v& Y- z( y3 W: P q
local links,rechts : integer;) t, Q6 u3 C/ h" s
do/ R, m7 z* ^9 [$ s
if @.standort.nf(1).nf(1).voll1 \/ f' \7 K" M3 V
and @.standort.nf(2).nf(1).voll
" m/ h8 \7 n5 Z- O. c and @.standort.nf(3).nf(1).voll2 F5 w& c8 l9 i
then
4 N/ F' E) A# c' ~5 y7 t1 R blockier_merker := TRUE; Q! B. b* m+ L8 x# W% P
else
8 U' s# c% @! n& W- e- z# m if @.standort.nf(1).nf(1).leer. f( s- d8 H( K
then( e$ a8 l# e2 M( w3 u
@.ziel := "ap4_C";1 C, n+ C$ Y( U0 v5 T
@.umlagern(@.standort.nf(1));
! w8 H0 c2 t$ `' @& b) f ~ else
# K3 Z1 n( U7 `" v" {) X links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
. q% R5 a5 D \ + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs ; X' M2 x6 q4 i& ]; B. a9 }' q
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
$ Z. y: X) i, A3 S rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
! d: T8 g$ M- r8 v( r3 K + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs & O% L0 u/ ~6 V" f) F6 C$ c
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;; B5 V% e4 e* L: n
if links > rechts 8 {7 o0 [. w7 S7 z
then
4 {& E. H/ h9 I' M( [ if @.standort.nf(3).nf(1).leer8 [5 |2 F" P" b T. q7 H0 p) f) d3 d) K) G
then
! x5 M" K, Z) ?: [. l4 U6 b @.umlagern(@.standort.nf(3));
, w# T7 {0 v k else- v1 B" o W1 A( _5 Q
if @.standort.nf(2).nf(1).leer4 c' d7 B' @1 H: D# B/ a3 Z
then
% P- A, V h: ~ @.umlagern(@.standort.nf(2));, V9 Y: S* q; V) A; J
else
- l1 P* J8 |: O0 Q @.umlagern(@.standort.nf(1));/ |+ K7 d1 U4 R/ X3 B4 N* y: o5 X
end;( V+ Y- |- s) X7 R
end;
# {/ ^9 ~' \+ E- C7 C# s else
2 B, b: u% b. W: x if @.standort.nf(2).nf(1).leer1 s& S& F% F9 `" S5 |5 I
then5 P2 D p/ m3 ^- N# R# @3 V
@.umlagern(@.standort.nf(2));
6 Q' A. W* w$ m+ ~* @) O2 G- A& A+ E else
: s' O% w6 V% A2 E if @.standort.nf(3).nf(1).leer) ^) J' A' @9 p, [' k, w
then' O( |7 g& S J9 D
@.umlagern(@.standort.nf(3));$ Y1 y( S3 g3 \/ ]# N
else5 G, u: P! p1 w1 S4 \& Z
@.umlagern(@.standort.nf(1));( d3 Z! _' U6 h; Z. O) X
end;
7 c3 e* S5 c. w9 G; [& R end;
9 Q/ X$ v$ ?: z W% V* A end; 5 k/ v$ |% G) p4 b5 A* m4 j
end;
, D0 H( G9 I0 h) G& Q2 f end;
* d) |+ I1 u: o2 m S, Tif ?.leer
& e) W5 b( k! F- J3 z. D- q9 Othen& s9 j. v1 p3 k9 U) C- X3 E
blockier_merker := false;
, c9 m& O& m4 U" |0 A0 Pend;0 p! o# W# C! t+ @. w5 Y
end;
/ b2 T" j- @0 R) V6 G1 p: W' L大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |