is/ M0 D& s# Y; z8 L
local links,rechts : integer;$ b* _, U+ V& V$ A( u6 e, P) {' r6 M" M
do. t( `: B5 ^+ A0 F) G( U! ?
if @.standort.nf(1).nf(1).voll
( L; T* w6 k5 X7 T and @.standort.nf(2).nf(1).voll$ X3 M1 [8 w$ K+ w4 u" H
and @.standort.nf(3).nf(1).voll1 I( Q$ R" L- ]0 _6 W- m- u4 L6 z
then
9 Z2 p! h, ]& ^9 v blockier_merker := TRUE;: u2 F4 ?% X# H' a
else4 N- ^ i% s k4 i X5 M3 P
if @.standort.nf(1).nf(1).leer
2 f% f" }0 U' z9 D then
/ V7 K/ C& m. b& ? @.ziel := "ap4_C";7 {6 T5 I0 R4 `( M
@.umlagern(@.standort.nf(1));9 x6 ?; F" c& R9 f ]# |
else+ r0 b+ C7 c( r- r9 b* y
links := current.standort.stichE.AnzahlBEs + current.standort.stichD.AnzahlBEs ; U# b! K: I) J
+ current.standort.zuf_E.AnzahlBEs + current.standort.zuf_D.AnzahlBEs & v. ~# b! O$ ?' f6 |+ a
+ current.standort.ap4_E.AnzahlBEs + current.standort.ap4_D.AnzahlBEs;
% J9 H8 r ?- C rechts := current.standort.stichB.AnzahlBEs + current.standort.stichA.AnzahlBEs
" K! E3 y7 c" i- u$ y + current.standort.zuf_B.AnzahlBEs + current.standort.zuf_A.AnzahlBEs
8 j ], ?0 T& e( R. d, o + current.standort.ap4_B.AnzahlBEs + current.standort.ap4_A.AnzahlBEs;
2 t& W4 y3 H" d, K if links > rechts
( c0 a1 _" H6 _ then: R3 E1 K9 i# q7 o2 A9 E
if @.standort.nf(3).nf(1).leer
. C, D: W& _. \" Y5 E8 Y1 j then( u: ~# m7 a7 x( `+ X6 m/ {
@.umlagern(@.standort.nf(3)); 4 A" C/ w0 ]0 F. [/ [5 O5 D; L
else0 C- Q3 o4 w2 _% W
if @.standort.nf(2).nf(1).leer1 X8 E% b8 a7 E' r) E! ~
then
! N, G- X! l- [6 e3 q: I; [& C @.umlagern(@.standort.nf(2));4 R9 t; m2 u4 F
else
8 p( W" |" \1 H1 {5 Y0 B0 d* C; I @.umlagern(@.standort.nf(1));* F& J! R- [8 d+ ^3 d: g
end;3 s* Y) H) C0 O5 @6 _. v5 v9 K
end;
4 `, Y! l# K" a2 J else 2 z* [3 E9 f- h z7 d
if @.standort.nf(2).nf(1).leer/ i: ]8 G, B& [- q/ I
then( }# Y: o O& `, r
@.umlagern(@.standort.nf(2));
9 q2 N2 b- u& o& h( F6 o s else' g7 V- v+ I$ K" t0 D
if @.standort.nf(3).nf(1).leer
9 I, ?7 U2 g/ W' a C0 Z; C, `/ W5 V7 P then
. P8 a, Y. ]! W! Z5 S- Y; x @.umlagern(@.standort.nf(3));
8 o! G) z2 Z0 ]2 P3 k, L else/ K* I3 ]( m" k# K4 Q
@.umlagern(@.standort.nf(1));. \ _1 I! X6 P; R
end;
: W. _/ X+ Z9 W end;- l3 y% a4 u6 e* S: T& Y
end;
* b8 Y6 J- V" ^ w+ `( _ end;
; d" [5 ^; j1 u5 _- \, h end;& K* o$ ^$ Q) e0 I, t, O3 z
if ?.leer
& a' {. D. @) B! k4 _2 N0 O$ t5 Mthen
/ Q- x& P3 n# F8 Q6 \1 y blockier_merker := false;; h5 X: D- \. y% X5 ]
end;
/ h+ j0 M# n# r1 @$ d7 P% c0 W' Nend;
6 ]# |# @, ^# W! E: |$ {* L9 o大家帮忙看看上面的程序是怎样实现分配的,好像用了一个遗传算法的。 |