is: u; R6 C) j+ Z/ U
local links,rechts : integer;
. {6 k( t h, g5 xdo5 w( ]2 h7 R' [( h) N3 W/ `
if @.standort.nf(1).nf(1).voll
7 Z& Q) q. E/ a' C2 t and @.standort.nf(2).nf(1).voll
! W* [9 S* [) S9 c and @.standort.nf(3).nf(1).voll
, h% z3 R/ u. a2 j then/ c. t1 s0 G) t
blockier_merker := TRUE;
$ h* s3 @- ]2 v+ L else4 ?: F: @; m O' U
if @.standort.nf(1).nf(1).leer
/ j/ r3 R" t7 R then
/ ~ h7 O8 m( |1 D+ u% a6 N @.ziel := "ap4_C";: y- q& m, Z+ U$ _
@.umlagern(@.standort.nf(1));
# R6 V) t/ J* |& J. q; K N5 u else
$ e8 L# q# u8 L+ M" x+ I! j- p links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs
4 U1 ]# ^ r7 c [ + current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs ! }2 I9 z3 ^! e" g- C- T
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
) `2 q2 p5 U: J/ F; s; p4 R rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs 5 E( l' Z9 c! H) v; F* |( `
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
; f) T Y) p0 ?& e/ { + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;5 v; [3 r% S+ {' j. M/ k, g
if links > rechts : j" }! \0 e$ o) e- n& |/ e
then' f) L2 y- O9 z* p9 T, ^8 w: m
if @.standort.nf(3).nf(1).leer9 Y: F8 Q3 b& h% {5 f
then
# x7 r T% f5 T4 Q/ O7 @% Q& \ @.umlagern(@.standort.nf(3)); : r: L' z0 w' s: U) j/ N
else/ x5 b- ?1 t' [6 }( ?/ W, c9 u
if @.standort.nf(2).nf(1).leer
& l8 R# {0 d2 G/ j: o5 q8 |* t then; v9 p/ h$ A+ M6 b( ^- N" T J
@.umlagern(@.standort.nf(2));/ X" y7 |+ ]% t; i7 T0 ?7 f: y. T
else
8 q% ]% U. L4 _* n7 @ @.umlagern(@.standort.nf(1));
/ c4 X# k7 ?3 S# v end;
, H% S2 b+ A6 g9 H& Q1 l4 d end;
" n' L x+ h r$ D! s else # T6 w8 t8 A+ |
if @.standort.nf(2).nf(1).leer* L- G. R: O1 i, n3 U0 A
then
7 F5 d- O S) H2 p @.umlagern(@.standort.nf(2)); # d3 ^( a ?" W: M1 W7 @" A
else
& d' a+ s) N% o8 b5 Z# G if @.standort.nf(3).nf(1).leer1 H) m3 P+ _) j8 z
then- o- v# z3 {# B
@.umlagern(@.standort.nf(3));+ p) P* | |4 R: |4 @1 y9 l
else6 `* Z# T9 q) A
@.umlagern(@.standort.nf(1));% \2 S. T. [7 I# ~/ q
end;$ v4 D! x' A2 M1 C; a
end;8 ?5 p& n, }* }# o" T0 v5 H
end;
/ `! x6 c# S( [ end;
: U% Q) |1 P7 [" _ end;
: m5 l4 h3 ~& b6 J! O" Aif ?.leer
% N+ n8 D$ s* k- D* zthen! r" d* t8 O- l% p( [
blockier_merker := false;
! G- \: Q" B p# C hend;: a8 t: _: c# S1 k0 ~5 p
end;
4 g) c6 k: q( u3 \& D# _( p: S大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |