/* called by: entrance ctrl of the object 'track'
~' h3 |9 g5 l( }& _ o*/, H, c2 }. r8 h) X6 ]: _
is
6 D* X0 s5 Y$ { part, GlobalDistObj, assignLObj:object;row,Lan:integer; ]) l0 T2 J, x$ p( C
do
' {3 A' e; o) [ |. Q Lan := rootfolder.Internal.Tools.AOLlanguage;
6 t% N/ T" E' L" I! F if current = @.Destination -- else return
w$ ~$ h" Y- t w then
" h+ [0 o8 o; u+ z$ {8 j7 U @.Destination := void;5 c- O" x2 P7 m; Z' a
if @.occupied then9 w- b9 q* ?; `" R \7 X
part := @.cont;
. i8 k( k1 e& J( { @.transpOrder := void;# A9 V0 q% C+ h% V% {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 W: j7 K# \. L& q# R0 x6 H" r2 [ @,root.eventcontroller.simTime);
9 q# ~# {& @0 B/ l6 D+ }- P @.HasOrder := false; V! h! l, X# Z; i
@.DrivingHome := true;
. w3 e: D! [( t% N' W rgManager.tryToStartTransOrder;2 o1 U" {8 t' V5 A% X+ z$ V# r' _, X9 e
if @.Destination = void7 E2 m8 k6 r& b+ ]4 k j; w
then -- no transport order for vehicle @. K3 X# A |& S5 }8 m. f
@.Destination :=
' B3 A8 D9 P* R: c ^3 y rgManager.nearestFreeStation(@,track.~);! h! E5 u: J" x2 X; X. k- q
newDirection(@); 8 y6 Y W T0 ^( N/ q% _* N
if @.Destination /= void then& Q) c5 ~4 n, y
@.Destination.NumReservation :=
5 ^+ k; B" b9 J) R: V @.Destination.NumReservation + 1;" Y/ C# y; U' ?7 P
end;
& N5 K$ l0 a# t& s: t$ M1 U: K @.CurrIcon := "drivingHome";, Y$ t2 {8 z% n: h: B
@.DrivingHome := true;
+ Q0 \7 }1 N! F8 J+ h5 [ end;
2 R& @: v4 _ {( y5 }/ g else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% i% D% J, g. K! Q0 V* S# _ part := @.transpOrder;
- N7 F3 c9 t9 s7 i1 l part.move(@);-- load part
4 p7 a; _' J( Y @.CurrIcon := "load";
# Y% n+ {, o8 [# L( h GlobalDistObj := part.globDestination;1 Z! t u9 ^+ J# E- e! [ Z/ f
assignLObj := rgmanager.rgAssignL;
. C0 E" B8 M& }: T# X$ A% o: b row := assignLObj.getRowNo(GlobalDistObj);0 n7 W0 \" k4 ]$ l
if Row = -1 then -- since 70: a! ^" k8 S n7 [4 P5 t+ |5 }
if lan=1 then
! Y* X; z A6 w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& `5 ?' ~" t Y+ u+ R& l) Q to_str("in der Andockstation: \"",?.~.name,"\""));
6 x" h3 K) a- L, Z/ M0 M else
. P# B& k* E/ y3 S% ~4 h) H promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ m/ Z8 \) v6 p0 Y/ P K; h
to_str("in docking station: \"",?.~.name,"\""));
; z/ E9 R1 j' i8 S. z" ^# R end;
7 w3 e+ c* M( ~0 T else. }8 I& B4 G- D! _
@.Destination := assignLObj[1,row];
- p* ]1 d7 r2 q# K* T/ B4 H: ^2 N end;
* Q( z! e4 V9 @& X) Y$ s9 ^' A) E newDirection(@);
/ I* X7 i; E7 m3 J! Y+ M# W @.HasOrder := true;; g9 o& K3 I( i
end;
2 i9 _* u* `/ T# H6 H end;" [- c" Z1 q! u q8 {1 l
end; -- of the method
/ k$ J- k O) T5 b |