/* called by: entrance ctrl of the object 'track'# J# E% e" p5 l& k& S4 O
*/
' I! H6 `! ~; L- R& Sis* l; X3 Y9 i+ U/ R- X8 }/ Y7 G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 f: R4 ]; f! t4 C+ w8 e2 z
do
( k/ ]# B6 C% K h; M6 ? Lan := rootfolder.Internal.Tools.AOLlanguage;
+ o5 Z6 M- K3 W; {/ c/ [5 H1 w! {' R. P9 ] if current = @.Destination -- else return
: D4 q5 X0 v0 A1 l0 Q, V5 r then
9 L/ |. S6 Z$ z( h1 a3 P* { @.Destination := void;
8 s, D. g+ h2 r- |7 H7 M. y if @.occupied then( `5 A: B9 r2 m- w
part := @.cont;7 j$ L& {5 G& W: m* W' t! L$ @
@.transpOrder := void;+ U# G9 u. b+ q* C* \0 s
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( c( a1 Q8 V7 W5 `$ _ @,root.eventcontroller.simTime);- _# B* P' o/ {+ w( F
@.HasOrder := false;/ G1 |/ k3 n) m" V4 m+ q4 x/ a
@.DrivingHome := true;; w' ?# [' ?! @! D6 z8 U" \; o3 q
rgManager.tryToStartTransOrder;9 [1 t& {" b6 P4 G) _0 @7 P
if @.Destination = void7 t5 k- Q7 U4 t; `
then -- no transport order for vehicle @+ p- Q- Y( b' Z) Z* }
@.Destination :=
6 |8 v$ d' w9 J rgManager.nearestFreeStation(@,track.~);
% F& R" t. s, ]0 y% H- {2 g newDirection(@);
/ {; E* d0 x6 R# _% _6 W. U if @.Destination /= void then' |% _" G% h7 A+ C- @$ i1 g/ Q
@.Destination.NumReservation :=
0 C3 x# j( f: C. K! E8 i @.Destination.NumReservation + 1;% N$ w6 ~' Z6 u/ g) `% `, y
end;' {2 j8 {+ C; [0 W% i# P
@.CurrIcon := "drivingHome";; w$ p. m* g2 w/ x* f% T, s0 t
@.DrivingHome := true;' e$ u3 S9 Z$ X7 z
end;. S, \0 `1 P2 I0 H, N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 c; Q3 {6 R( Z6 I; x) B1 p part := @.transpOrder;
/ ?5 Q& N! V2 W; s K part.move(@);-- load part
) }+ Y; d0 h' G @.CurrIcon := "load";
; a8 g/ q/ h! z* y. {, P1 k) P, c6 k GlobalDistObj := part.globDestination;! P. e7 r3 u# C) u G: W
assignLObj := rgmanager.rgAssignL;
6 ]4 v1 v' {! f2 F1 }8 j. W S; E row := assignLObj.getRowNo(GlobalDistObj);
7 J y& J+ D# h7 i, h9 C A if Row = -1 then -- since 70! K3 \; |1 ~ I U; r
if lan=1 then8 Q8 b9 Q# D4 v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 Y+ c' A! t9 S9 d
to_str("in der Andockstation: \"",?.~.name,"\""));
) H7 c# \# x! d8 ? else) Q' h1 |# r: U' q# L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 S9 P, M- W P5 _, O# @+ M
to_str("in docking station: \"",?.~.name,"\"")); ' P- k- t( i' e; p( C+ p
end; `# L' k6 _* a4 }
else4 Y- d( p( n F
@.Destination := assignLObj[1,row];
& I7 R# }6 {5 A& {3 L! s end;
/ S* P& I2 ]9 V! v' s' p# C5 ` newDirection(@);7 h# B& r+ t3 ?
@.HasOrder := true;
. t+ n9 X! y# k8 J$ ?( \; r- q end;
! n- x' P" v" F$ Y6 y end;
, L/ v F% B( ?) {+ Nend; -- of the method
2 A. U7 @: P5 `& b. \& x |