/* called by: entrance ctrl of the object 'track'+ z% }' c1 z8 |- K) y; x3 T
*/& P- G( P, R" E1 v. F
is3 o: b4 }+ |, p7 D0 k: s
part, GlobalDistObj, assignLObj:object;row,Lan:integer; }7 g1 V7 I3 A! y) t
do; @; K6 T' ~7 l `
Lan := rootfolder.Internal.Tools.AOLlanguage;# X+ }+ q6 `' |8 V2 T, {$ q+ r
if current = @.Destination -- else return9 G5 o5 j7 J/ P+ W7 u
then& B, `+ F8 G0 R: [
@.Destination := void;
9 T9 p% c: g: ^% Y if @.occupied then
5 Y" e& i3 `5 V2 X3 j part := @.cont;
2 L4 p0 t R1 t% ^ @.transpOrder := void;2 R" v0 z1 n4 H4 [1 R/ v* F, `2 `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 w$ y" g3 X# i( C6 O# U* z
@,root.eventcontroller.simTime);
, v/ T7 \; ~: o |5 w- _- q ` @.HasOrder := false;( k# h3 e( ^- B5 b# z
@.DrivingHome := true;
- k: e; A$ P7 z rgManager.tryToStartTransOrder;
( L8 Z" o* N7 l8 X! |6 L. E: G if @.Destination = void; O& x5 h$ w. y8 s \5 U
then -- no transport order for vehicle @
3 E$ D& u% K( W2 s* q- |5 e @.Destination :=
3 W! \3 H2 \! v( {. c+ B4 N. G6 } rgManager.nearestFreeStation(@,track.~);1 `" m$ x7 {7 r3 H
newDirection(@); ; ?/ Z, ?# v$ o, n* S
if @.Destination /= void then$ z9 Z" C# \* ~
@.Destination.NumReservation :=: L) K4 \: X. M( U) p
@.Destination.NumReservation + 1;7 e# n' n/ t1 c2 V- j" g
end;
3 X* \+ ^/ i" {# N0 @ @.CurrIcon := "drivingHome";
4 b9 ^, [& z; Y3 D9 i% \3 T @.DrivingHome := true;
+ E& \/ y9 c1 H' @/ m6 f end;/ {6 ~1 E6 s* z% \0 Z" t7 O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- F( c* N5 I% e9 ~) C& o2 u0 ~ part := @.transpOrder;
' |& U. m! C D- i part.move(@);-- load part
& x+ z7 q7 E* g) _% A @.CurrIcon := "load";2 V; G6 N( ~, {* R, j8 p% u/ K
GlobalDistObj := part.globDestination;7 _0 S( U, x1 \& Q3 n# [( |7 R% f$ q
assignLObj := rgmanager.rgAssignL;* B! d, r; W' a! I) B# \. U3 ^$ n
row := assignLObj.getRowNo(GlobalDistObj);* }- k8 |+ d# d& c9 W4 E; h& V4 T
if Row = -1 then -- since 70& d- J2 f$ o' G0 B% J
if lan=1 then
2 I2 j5 T) R! l' F2 t5 e5 K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," b$ O5 D. i b* {9 x
to_str("in der Andockstation: \"",?.~.name,"\"")); k" s3 r5 e3 V3 C9 d
else
' x0 w9 l" w3 |4 e/ r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# `+ r) G) @# b8 \6 L4 W to_str("in docking station: \"",?.~.name,"\"")); " L! l: K# {, }& r
end;
: o/ U* Z1 z. o% a' S% M4 ~ else. R0 N3 Z# e( Y3 g( ?& S) y
@.Destination := assignLObj[1,row];
. c% V2 w) H6 Z# X6 s+ G A- C end; 2 y7 K u3 I# v5 s. X, Y, h; J8 Q
newDirection(@);0 ~) E+ @$ l- p
@.HasOrder := true;
/ Z) `( @0 l( t end;" \. A' V* b' x0 ?
end;
) o0 h6 x! y5 _, H' ^end; -- of the method Y, S) n1 X1 v# y) a
|