is3 Z X& T# C' b. i; |3 l
local links,rechts : integer;/ X( r3 U+ k7 d" g, ?! I$ N" I
do
5 l& m6 [" W' G# o2 N if @.standort.nf(1).nf(1).voll
: Q% a V' @0 ]% N2 u' P and @.standort.nf(2).nf(1).voll
% O6 Q8 y/ U, t* r and @.standort.nf(3).nf(1).voll, L3 ~6 a; \! U$ p* h3 I3 d
then
, `5 P. X* E: [; R9 o blockier_merker := TRUE;
6 B6 o0 E% U' D8 D. ~! w) j else
* i+ j; Y: \9 K! m) R if @.standort.nf(1).nf(1).leer* ?/ r8 S/ w; l: L2 ?% r. _
then
8 O3 ^/ r- S" V( ^ Q: B @.ziel := "ap4_C";
- [7 S6 j- D6 o3 S4 z1 l, r) R% O @.umlagern(@.standort.nf(1));
G) D, V( T G3 _ else
0 p5 s/ j8 B$ b4 [ links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs - x/ Z3 }# z& u" r) x) a F
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
. g4 w$ [) {0 p- A- f3 H + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;) U* A. p' H3 G
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
Z: M3 j" C _/ O+ a + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
/ X4 o( }7 b4 |9 y + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;8 d! ?7 h# a0 q+ N3 N( F
if links > rechts + }2 Y. C9 R( }9 e3 [; N
then! `; c# \/ w! Y/ B' G
if @.standort.nf(3).nf(1).leer. c# H' s* r5 R* U4 X1 d) ?
then
8 C: K( ]. ^8 B3 L" | @.umlagern(@.standort.nf(3));
2 }- _ {2 \& H* {2 e% d( a else4 t& H4 W! f( m2 d# _
if @.standort.nf(2).nf(1).leer% u1 B8 Z7 b5 D# L8 g
then
2 P O9 d6 E0 l& n! K8 t- I @.umlagern(@.standort.nf(2));& e- |5 |9 q( I4 n/ _ H
else
8 {* c. }: K! o. e' U @.umlagern(@.standort.nf(1));
4 m. j7 r1 W" ?6 s8 y8 h, g: T$ e% K end;
3 ?8 q. r* j: w, i% Z- m. U end;
+ [% b( E* b$ P% c else
! m- x- i: Y. u/ O9 u if @.standort.nf(2).nf(1).leer9 l, ~; ^6 }# Q/ e2 W6 ]+ R
then$ r) {3 D4 \, f8 [4 p0 z. z
@.umlagern(@.standort.nf(2)); ( Y; b/ B( ~, H; E
else
9 s( R0 V& @$ o' a if @.standort.nf(3).nf(1).leer \9 B8 q# R8 |8 N& i
then
$ o! \; Q5 Q$ Y" x- s6 n @.umlagern(@.standort.nf(3));; o- T( M7 J# m2 ^6 \( r* }" @4 J% A
else1 v" i/ f7 T/ z# X/ f( ]1 d/ m
@.umlagern(@.standort.nf(1));
$ D# L2 z) i" f( t7 _5 a9 \) s end;4 E) @* D9 `8 ~1 x% D) g
end;
" [) A& b' S7 D$ j6 q( x& H end; ! @$ H7 T/ ^# s' _
end;
, \6 l- [: f! c5 f& h# ] end;. U t8 ?! }3 ^- ]4 I2 [5 c
if ?.leer$ S, c! H( n2 |- t* _5 a" `% M/ ?
then
7 t6 [3 J* F O# j: e' U+ F blockier_merker := false;
- q4 e4 @! k M+ N* rend;
0 F3 P/ ]: i) Q( jend;
' r Q" r0 { U7 j/ q大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |