is
3 V3 M) ?6 Y, [8 V" u- k3 Blocal links,rechts : integer;/ p: A7 C5 E9 d+ e
do9 L: P6 N4 K7 t2 w( y! J; M
if @.standort.nf(1).nf(1).voll$ w7 A& F, B, u5 K$ I
and @.standort.nf(2).nf(1).voll
8 Z( [, h. F' q$ R and @.standort.nf(3).nf(1).voll
9 x7 {2 ?5 s; W5 h then
& G3 S4 ~; K. t5 W blockier_merker := TRUE;
% _) x- c0 g2 f2 N# X# r else K+ V" O6 Q% U' X/ U+ ^" W5 B, Y
if @.standort.nf(1).nf(1).leer
9 _% D5 R6 y: {. O: o- g then
1 Q9 c. Y" t! f# x$ R6 c# ]: q @.ziel := "ap4_C";
+ M) R& r5 o# D& r- K& l @.umlagern(@.standort.nf(1));
- y* ?( O1 v" a- u9 P, n7 r else$ K0 f% g( Z6 x- J9 ^ b
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs ! o0 u5 i8 ]% {
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs
1 S8 Z9 E$ |: g! G9 C" l% x( v$ F + current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;& L# g8 C; ~. m8 Z4 H E
rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
5 ^" _9 Q& H @* k) N- \5 N + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs 5 w7 y8 g* G: r$ o/ e9 a9 ?+ \4 `
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
% c0 k. h: y) V% ?9 k if links > rechts $ Z C# A$ K/ S
then4 e8 I, e. A: U# h( Z
if @.standort.nf(3).nf(1).leer, V9 S: [) o- p6 W# Q+ q$ [
then
7 O) X! S4 N3 I4 U+ y. c @.umlagern(@.standort.nf(3));
+ }- G5 @! T& y" A V3 E else
5 ]8 a& {7 J" f7 ~ if @.standort.nf(2).nf(1).leer$ `2 `6 P* c* U- s
then9 Q1 o; G7 ]- _( c3 C
@.umlagern(@.standort.nf(2));0 r( S: P9 T$ N3 i
else1 w( H; _, A/ M! W, o8 `) B
@.umlagern(@.standort.nf(1));
, H3 K2 H- m' U: q7 z end;
; ~3 i& Q" x( t C- z9 n/ V end;4 S _2 ~+ [ `4 C) i, a
else
4 v! M* u6 n! U8 w& M9 k, ]$ V if @.standort.nf(2).nf(1).leer1 s2 P# [9 T5 O# K$ r/ W
then+ n4 `9 F1 ?. V: `' x3 |9 J
@.umlagern(@.standort.nf(2));
: W2 Q7 N" ~$ `( ]3 _ else
( L' q2 K% ~1 c$ Z: n if @.standort.nf(3).nf(1).leer) R3 P$ b, J" C! |5 ~
then1 e; e- C# W% M. r3 w. ^
@.umlagern(@.standort.nf(3));
6 i% l7 S: ?1 U! M) W0 [ else
- n! Z5 @$ J2 I& N$ e) Y' l @.umlagern(@.standort.nf(1));% e5 E2 r; _$ I M. Z
end;$ r( B% H, N ^& k5 O
end;
. W4 F( P0 Q1 C: l/ {" o/ e end;
7 K( ?6 @: l% U end;
% G3 a9 n. @: H$ p# _5 D7 Z+ t end;' j1 s- U- G- V6 c. ?
if ?.leer+ q. ^- [* |4 i% t; T$ y+ [% `
then; W/ H6 D5 v) x; Y; h
blockier_merker := false;
* N; p9 b* J$ P/ R. r4 Gend;
$ U2 d% s9 f# C4 _* ~end;
, l; V) ^0 f5 x4 B0 o大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |