/* called by: entrance ctrl of the object 'track'+ I. k4 `7 O1 j: H% }
*/) Y/ `$ n2 V) ^, [! m! E, i+ r
is! t/ N5 s" W; D# P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% B% L+ ?5 B) q7 I7 w, N& [) K
do# Q* [0 e. ~! {: z" {
Lan := rootfolder.Internal.Tools.AOLlanguage;$ _5 m7 J( T8 Y, ]3 m" J2 r. i* z
if current = @.Destination -- else return% V% A. g6 G8 o/ _
then
1 j; M+ s9 \" h* a @.Destination := void;2 l) p$ ?- F7 j; V
if @.occupied then
3 P" c+ G/ T9 T; i a7 @ part := @.cont;
, G( B+ M2 r( O! c: k @.transpOrder := void;) U$ {! C+ z* c' {! F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 B# x5 h/ R5 A9 |( _* ]4 N @,root.eventcontroller.simTime);
( [2 q% h \% ^* f. ]7 e$ C @.HasOrder := false;9 d$ \$ T; s2 F# k
@.DrivingHome := true;6 S+ H, C. z, g5 k
rgManager.tryToStartTransOrder;
8 c/ v0 `' J( w$ J if @.Destination = void
/ n3 K4 A9 J% N then -- no transport order for vehicle @ i5 |! D5 J2 v1 X' x: C' W
@.Destination :=
' I" r8 N% @9 n; E/ H rgManager.nearestFreeStation(@,track.~);
4 W! P, M2 q( i1 O# A3 _$ g newDirection(@); - R ?" j$ y0 @: j8 t7 d5 j# B# A1 f, T
if @.Destination /= void then
/ z: F& O% m% ~6 U2 W" H- ~9 I @.Destination.NumReservation :=8 g5 g K6 a7 ~, O( F
@.Destination.NumReservation + 1;8 O6 t3 w' K: Y/ j
end;
. @& r# c2 ]( F8 q# {$ } @.CurrIcon := "drivingHome";
; w6 ]- H- F8 R; [% B- ~3 i# K @.DrivingHome := true;1 U( |& G' _6 `) Z$ s6 e
end;
! p8 I( C. m$ ?: s else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 p) r- H u: A7 P6 O/ ]# I
part := @.transpOrder;- y6 [$ W) [3 s2 g- k) I
part.move(@);-- load part! B) U& e+ T1 ^. o, G! P
@.CurrIcon := "load";
1 a! a$ O( U9 [1 e GlobalDistObj := part.globDestination;
+ l8 u: k& N& g7 x2 g assignLObj := rgmanager.rgAssignL;# e5 d3 E2 B9 a* k
row := assignLObj.getRowNo(GlobalDistObj);
. E. K5 n: S; D9 I x6 j if Row = -1 then -- since 70
. v! Q5 }; w- ~4 k B2 E* @ if lan=1 then' k& C3 ?- ?, U; D9 c& X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( G, e8 K) F! e9 N6 }5 m3 y* o to_str("in der Andockstation: \"",?.~.name,"\""));2 U z. x: I! k2 u& {) G
else2 G" \3 E* o, I8 N
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 v# h& j/ n) g2 `9 D Q to_str("in docking station: \"",?.~.name,"\""));
* O2 S/ C9 D. O( P end;
" w/ h$ A( P$ R& K3 y( \1 `' Y else5 T7 m$ \6 U3 T$ _ E
@.Destination := assignLObj[1,row];
3 H2 V3 j# a; y" U end;
1 {9 k$ z. k7 S1 l5 s$ i1 d newDirection(@);; N- O( W9 Z$ A' C5 C) F7 y
@.HasOrder := true;" `- y) M' X8 K, \3 o" \# Y, a9 Y
end;
r2 M$ y! G+ f) W: g5 Z end;$ Z( `3 c, v) e% | [& }9 u' \
end; -- of the method
( }( [$ q( s/ z- ]! m1 r5 { |