/* called by: entrance ctrl of the object 'track'
R# j! l3 U7 O*/6 `. m- l* [/ ^
is4 o4 e0 h! [# {0 Q/ T$ g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, ^( b+ I) [# x9 S
do
1 X3 j; L% U5 J/ p# C) r4 v2 J: W Lan := rootfolder.Internal.Tools.AOLlanguage;
+ k4 x; m$ U5 C! C if current = @.Destination -- else return) T) e2 E; e# t8 z
then0 ^1 e% O; J \. D: [4 r% g
@.Destination := void;) r! h: m+ P4 f' ^
if @.occupied then1 d. o% t+ C1 W( s9 F, \) S q
part := @.cont;
& k7 e8 T* ]6 L6 g @.transpOrder := void; `' b% r- X4 p# [; X6 ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 n) K4 m, l) e5 Q0 h3 B" Z- b
@,root.eventcontroller.simTime);
0 L6 p/ }7 R6 w0 ^- { x @.HasOrder := false;) i) Y) z" {. x6 [8 i8 ^
@.DrivingHome := true;2 J2 T% y' ]' T1 q' u: a
rgManager.tryToStartTransOrder;" Z; ]9 ]9 ?! z/ d8 r
if @.Destination = void
% s# r" C/ l/ h8 S: n7 l, X then -- no transport order for vehicle @ F# s1 U- h, _/ Y3 a
@.Destination :=2 K! {; `/ n! L, s' {8 K& D. ]6 }
rgManager.nearestFreeStation(@,track.~);
) l* H$ T: f) ~ t% p2 }8 y newDirection(@);
2 a5 }; _) Z1 d) p9 V if @.Destination /= void then
; Q) l/ r# H- N% e3 ]* O5 x @.Destination.NumReservation :=
. c7 B. _9 u6 a2 z! Y @.Destination.NumReservation + 1;
D/ h8 U( l/ G end;6 o5 ~, @% d2 ^
@.CurrIcon := "drivingHome";* k' X2 n5 ]& x7 ~) i
@.DrivingHome := true;" H# ~% x: K4 S5 U8 y
end;
8 {7 k( B' a1 Q! V else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 O+ K! R* P$ ]- H. O; `" L
part := @.transpOrder;
- j- A$ x$ v3 G0 ~) @& G4 y part.move(@);-- load part
6 }+ g/ N- J7 _. ^0 y7 T8 L7 n$ l/ u @.CurrIcon := "load";
/ a; Y9 q% h) h) ?0 E GlobalDistObj := part.globDestination;6 d) S, P: @, G" R7 R0 L0 J: \
assignLObj := rgmanager.rgAssignL;
0 V+ E1 d3 |8 u& J: w& [! R row := assignLObj.getRowNo(GlobalDistObj);
; [, l; f# H) ^+ @6 L if Row = -1 then -- since 70 D# l: b) [% C9 p( L5 P* w
if lan=1 then
" G8 K( R0 a0 x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! o5 R7 H- A" F8 s0 S
to_str("in der Andockstation: \"",?.~.name,"\""));
" K& d/ ?' t" B& i1 ]/ ? else* l9 i1 p/ y) H0 B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& ?3 _/ B" n N2 _* p8 w, o" W to_str("in docking station: \"",?.~.name,"\""));
4 A1 `5 D# {1 E% a/ R; y end;
8 N8 s0 E7 S" I3 u2 R else: G: ?0 T- y# g4 u; G r" c( Z
@.Destination := assignLObj[1,row];( ?( V" u+ I8 Y) x2 w3 t
end; / [4 Y4 @: i2 N) e+ y0 A E# s$ ?8 k
newDirection(@);
. O; l% h; X2 i9 b @.HasOrder := true;
0 I: z9 Y5 y& N, G' F! C* c end;
3 p# f0 O; K' P' G. _% J end;% ^; w3 S7 _ z+ X# X
end; -- of the method
5 @ G) j0 ]( W. }" T/ }$ \7 o |