/* called by: entrance ctrl of the object 'track'
8 v0 ^1 e9 E( y5 _. c% a5 L0 d2 m! ?*/5 u6 ]8 X; p" u* @' q4 b1 J
is* J; F: E7 ]" o" I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; `5 D6 k% b+ Q* {do
! `+ a+ U! X" j0 u Lan := rootfolder.Internal.Tools.AOLlanguage;3 u. c- V) ^3 r3 g- e
if current = @.Destination -- else return
) b1 J" I6 Z: v i9 c then
$ g5 G$ @9 [8 [8 \$ X @.Destination := void;' z# U- o2 f; k8 g: r$ B
if @.occupied then' f* f1 F' T! J3 I* z
part := @.cont;4 V- Q# m0 e6 L& u
@.transpOrder := void;- h( O2 N) n" S* N# S3 G- V* n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ d. `# |' ]$ T, W |/ U @,root.eventcontroller.simTime);
. m# O( \" @) O/ o @.HasOrder := false;4 T; ^* c& ~6 E. K3 ] [9 q% h
@.DrivingHome := true;6 a0 j3 e n( t# m1 o- f" f4 C! E+ s
rgManager.tryToStartTransOrder;
7 G# c2 N6 P4 C- f' J. ?: y if @.Destination = void
5 s% N( M5 ]2 Y# N- F: D& T then -- no transport order for vehicle @5 [3 K. g1 U+ c/ @ i, [4 E s
@.Destination :=! S2 S& g0 F$ k9 j1 L6 C3 @( d
rgManager.nearestFreeStation(@,track.~);
( b1 V _# i, X$ o newDirection(@); + P2 g8 [" f S" i
if @.Destination /= void then a# N* q- k# k: ]
@.Destination.NumReservation :=6 O/ D& ` R" p1 m" z
@.Destination.NumReservation + 1;" f) \4 Z; m J7 y
end;
, l6 `# o0 t/ h. l' @# Y k" \ @.CurrIcon := "drivingHome";3 W! L) ?( ^* _) Z$ _
@.DrivingHome := true;% G+ b# J H& z! a- {
end;( o9 J3 O Z2 j& ^) F; O6 h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. D' d. N5 p8 m/ \- w* h K ~ part := @.transpOrder;# P' r+ U; t$ ]) H. ~ g/ a2 O- X
part.move(@);-- load part
$ w- Y% W9 I3 _3 Q @.CurrIcon := "load";4 Z; [( j# e+ s3 S) w) ?9 f
GlobalDistObj := part.globDestination;: g& d8 t1 }- k+ n: U( t/ ^
assignLObj := rgmanager.rgAssignL;7 c: H; b! _2 H6 ]
row := assignLObj.getRowNo(GlobalDistObj);
$ F/ T, |! s# u7 C if Row = -1 then -- since 70$ T' ^7 t1 a/ j8 ^& ^" C
if lan=1 then s5 \1 Y. B& i3 u6 s `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) S6 v6 z& P0 x/ T/ v4 S$ p. p1 Y to_str("in der Andockstation: \"",?.~.name,"\""));
( ~! j( o' I/ R$ p else8 D. S( }3 V0 V6 ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 e& B7 \8 z+ p3 N( G
to_str("in docking station: \"",?.~.name,"\""));
& a4 j1 n( s: V. z3 n S end;- }4 i4 ]/ z" j9 y
else' e! a; E& o1 u) ]) Y. e
@.Destination := assignLObj[1,row];! f% x" y3 _# F) f: H1 ]. R1 z
end;
8 n$ I+ K/ X- A4 M" e# s8 | newDirection(@);1 c+ r; p, K# r0 \
@.HasOrder := true;7 l! r# c" n( a. _1 P6 ^7 U- N7 T
end;
4 n! {7 h3 X( J end;% w# [! U2 o8 d, e; s
end; -- of the method
! H9 u/ {+ I8 ^( o0 @ |