/* called by: entrance ctrl of the object 'track'; I+ C% ?* L8 \
*/
8 k' u, s5 @/ P4 f$ lis
5 i- T0 j+ j: ]" S# P/ \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;! W+ Y: L+ J( w+ v
do
6 T# m" h0 L2 Z; _2 i! J Lan := rootfolder.Internal.Tools.AOLlanguage;! ]/ L4 c3 T1 r
if current = @.Destination -- else return7 R/ G: y4 s5 i: V3 E
then
! `8 B+ [" w# f( Z7 ?$ T# k8 v* @+ T @.Destination := void;- i- O& W! P5 ~6 o/ D6 m+ a3 R
if @.occupied then% d4 t7 r9 F2 s- u
part := @.cont;
' z! B% _7 x, z! W! | @.transpOrder := void;
2 t4 Z2 e* E5 [. x% l/ R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( \) b8 e& |' V, J' v8 q, E @,root.eventcontroller.simTime);) g' \$ C, A! c0 W
@.HasOrder := false;
7 i" S; B4 C5 h1 `& Q @.DrivingHome := true;
1 D9 ]/ `" ?7 t0 k rgManager.tryToStartTransOrder;
/ `/ r* @3 i( D' t: _ if @.Destination = void
( [$ V- W( P# b# v then -- no transport order for vehicle @
5 p9 z- Y: K3 A: S; a& ~ @.Destination :=
8 Z* B4 b. i) X( H, J/ m rgManager.nearestFreeStation(@,track.~);7 j% X. N n: R7 Y' C
newDirection(@);
5 D& B. `1 w, r if @.Destination /= void then
( d' C$ E) o! {& s# z' G3 I, { @.Destination.NumReservation :=
# {! x$ _, s9 ]; U: u @.Destination.NumReservation + 1;- F5 s- |( O' y
end;/ y/ l) ^; O+ Z
@.CurrIcon := "drivingHome";
# w+ H. l5 o7 G4 f( [: r- q0 g5 ?9 q% p @.DrivingHome := true;
' U) f1 `; G% ]7 z end;
# q9 ~6 z2 G8 X0 D else -- the vehicle @ is empty, both vehicle and part are in the same dock station& m1 j9 j! ~* _% O" Q2 G
part := @.transpOrder;+ C( X7 W4 ?/ ~2 J4 {5 D4 ~
part.move(@);-- load part3 O+ F0 ?& r, G& l
@.CurrIcon := "load";
' ]* Z* H& I9 \ t GlobalDistObj := part.globDestination;
# I. s1 U' M) i2 L; Z assignLObj := rgmanager.rgAssignL;
# ], Y; J: s! @3 y# M- u, R row := assignLObj.getRowNo(GlobalDistObj);
# `3 @5 _( t x% n* C5 [ if Row = -1 then -- since 70: A9 E$ z# ^: a' S" m h- U' d
if lan=1 then
: A* }! G S! s$ f) g- o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, Y; \+ s$ _6 s- f% U4 C to_str("in der Andockstation: \"",?.~.name,"\""));
0 v7 z2 d- Q. G; s: ^8 w else( k3 ~* J; ]$ D4 e" t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 ?! @9 l- j ^+ m
to_str("in docking station: \"",?.~.name,"\"")); : \7 f( k: p# B5 B# m2 V5 C4 T3 Z
end;
6 y# z( O- e* Q8 m" A else9 h8 `+ B+ L( ?/ j, e( a
@.Destination := assignLObj[1,row];
% h8 y" K7 h0 |. m end; 9 \( i5 Q: P* U) W6 s/ r
newDirection(@);
$ p7 }( P- m4 H3 t; K% @: h @.HasOrder := true;
* W7 ]. U0 A; t( f0 n7 v+ L end;
; S$ T2 } G D# e; V. Y0 { end;( W$ |: d/ q" k4 x
end; -- of the method
% E: G7 y% z9 W% y |