is& L3 T# A% X5 Q4 |3 M* |0 {$ Q" A% Q, f7 t
local links,rechts : integer;
4 r- O, K; I# M, B4 A6 ldo4 }1 b- g3 ~0 c+ e; n: ]; {! b
if @.standort.nf(1).nf(1).voll4 i8 j d9 `/ A4 R/ ~
and @.standort.nf(2).nf(1).voll
) Z$ X, R4 Y4 N# S/ u5 ? and @.standort.nf(3).nf(1).voll
& @' n: K/ L1 Z9 Q then! W: e( P& S+ h9 Z( S o5 p5 K
blockier_merker := TRUE;9 `- j+ x! e; A( Z7 v8 |
else
5 H) x+ B K) V. x: B if @.standort.nf(1).nf(1).leer
D+ u$ F5 Z0 ^3 N) X then4 A7 m, X8 }" {2 J5 B. s
@.ziel := "ap4_C";" e8 ?# E% H1 |$ _! X
@.umlagern(@.standort.nf(1));
4 i0 \3 I- Z$ h5 Z0 ` else
' |3 W9 ~: a6 k links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs * u; L/ X6 U5 v6 W7 H4 `9 [+ m
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs : n( D8 N* ]' z( R2 a
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
& k0 X0 s( Z7 o' ?% \- N$ T9 w. e rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs 1 A# o, N' c/ ~) Z8 i3 h# o
+ current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs 3 @# b M6 U& ?) M! X$ V
+ current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
* B0 m' \; V3 v0 ~. q' B1 r( M if links > rechts ! U7 Y% M- q" z
then" u+ n- R9 X" \+ I# v
if @.standort.nf(3).nf(1).leer
. ?/ l3 c) o ~6 C# s! Z# Z then
6 s: L& v# f, G) S0 y( Y8 ?6 ^0 K( R @.umlagern(@.standort.nf(3));
- N9 f# m& E) r else5 i0 L( F" N- P, g, `/ h
if @.standort.nf(2).nf(1).leer) |0 p0 k8 M- @: ~7 \& S" M' S% n
then
+ f" s9 Z( b$ g' f& ^+ X8 q @.umlagern(@.standort.nf(2));" h; u+ u8 v6 b2 u0 [" s8 O
else* A: S/ p( W; T. [" s% ?( `- ^' `0 l
@.umlagern(@.standort.nf(1));
1 r, S! S7 @$ p% @* @ end;% u1 E' K" `+ O, d- j
end;
" C! m+ s7 Z7 G9 X3 \& a: e- C else
8 [* _" D) T- {% W5 z, j if @.standort.nf(2).nf(1).leer8 E0 f- z* y7 j2 V9 }
then
" Z1 i. |) v9 z( N4 l! p8 J @.umlagern(@.standort.nf(2)); ) f/ C8 Q5 D, D: ]( N
else
. ]* D% E4 ^: H: @7 [9 v. a+ x3 w if @.standort.nf(3).nf(1).leer- p# r/ u! `1 K5 b% ]
then
- e0 H' j6 W4 g E9 C8 P6 B- I @.umlagern(@.standort.nf(3));
4 z. J, T o3 @5 I4 H9 ` else
: x; m' H9 ^6 E @.umlagern(@.standort.nf(1));0 S! m: I8 R+ L
end;+ y$ C" Q$ D+ C# `6 s- C* Q% @
end;, I- S2 R* Q+ n$ j, J* ?
end; / I7 q. Q& W8 J+ p$ r( ^ S
end;
$ I3 @, K8 M1 d, z# C% R end;
. w7 T# ]4 h' L( ^' [if ?.leer
- W, q6 a/ Y* ethen
! G9 B; n% C- p, ?5 s& }" {$ ` blockier_merker := false;
. I: v! K5 N4 aend;
, j2 J% ~ M1 b( _; Q0 M |end;
% N9 [6 v( K' ?* \& G大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |