/* called by: entrance ctrl of the object 'track'3 l. Y+ o" j( ]. Z
*/
, `% X9 g, ^7 }* Z, Nis. F0 B+ x9 G2 a! g8 P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& `2 @; N$ {& V; _; A- D/ S( H4 z
do
( v t; i: A: K6 h$ q. f" z Lan := rootfolder.Internal.Tools.AOLlanguage;
1 u3 B+ M* U( ^ if current = @.Destination -- else return
0 N* k& J4 i) e+ S then
2 |7 a* }4 r# [) @ @.Destination := void;5 c9 J& O2 U" v$ H5 ], K" y4 r
if @.occupied then0 D' w9 z+ _2 ]
part := @.cont;9 o& n3 y) X7 e# ~
@.transpOrder := void;8 _2 j* \: [' A l' U0 v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% O2 a* `1 V! j @,root.eventcontroller.simTime);8 U$ x, P8 q" [5 L* d6 p- {
@.HasOrder := false;0 e5 t' f# }# h. i' X
@.DrivingHome := true;
8 m9 h, d" ^6 |% c+ t) B rgManager.tryToStartTransOrder;; X; `) n: Q/ W; Y
if @.Destination = void9 K, [ r! L a6 k
then -- no transport order for vehicle @
+ J% |2 P0 W9 j$ D8 Y o @.Destination :=
; I J7 \6 W* F8 B* ~ rgManager.nearestFreeStation(@,track.~);# [" }, G" k8 B* ~1 W
newDirection(@); % Q! t% l6 [6 c/ m$ g3 k* C
if @.Destination /= void then
. e4 B3 U7 J6 `7 c, |6 c# g. B @.Destination.NumReservation :=
' Q( h& f' o* J' D# ^$ v @.Destination.NumReservation + 1;5 S4 `$ |5 G$ P! F! _8 W( t. t3 ~/ Y7 s
end;
# T" n6 Q4 i" i z) A1 V' y6 l @.CurrIcon := "drivingHome";
& m. k& N1 T% ^% q6 k3 C @.DrivingHome := true;& Y+ }" b- r% ]. l
end;6 } W: C5 v! E& @5 Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: J1 h2 P+ U1 {7 `* t part := @.transpOrder;1 l% m6 T9 D! |: O3 ~* u4 Z8 T5 e9 N
part.move(@);-- load part1 `8 A. c2 F7 e3 Y' ]6 P
@.CurrIcon := "load";
2 n+ S% J F4 z( ^ GlobalDistObj := part.globDestination;
5 a, i3 y0 H/ z assignLObj := rgmanager.rgAssignL;" m' I$ _. ?% a; b6 e! h7 X
row := assignLObj.getRowNo(GlobalDistObj);
! {% Z5 B {$ x- ~. G8 R if Row = -1 then -- since 70
7 b9 j6 p8 b! T4 J if lan=1 then( G- t! u+ v/ S8 K% q: z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 I- u. e Q; v4 Z' m to_str("in der Andockstation: \"",?.~.name,"\""));. X% h/ N( R+ N
else! p4 I- T+ T) _- w$ I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, S3 P3 r4 u+ w. R, E# |$ d% H. A
to_str("in docking station: \"",?.~.name,"\"")); ; v7 N) d" F6 e/ u1 a/ C8 A, s
end;0 z- N' o: c( ?8 ?! B# P
else& K, A* W$ i6 ^' r
@.Destination := assignLObj[1,row];
' x3 C" ]; o1 @9 L1 z end;
$ p1 D. V. w0 o/ Q0 v newDirection(@);( k8 f4 J. U; Z8 R9 {- R
@.HasOrder := true;; [: a/ E# N$ F7 B. |2 }9 Y
end;4 N% _: D- I B4 H/ i% c7 L
end;
3 n) N1 S8 Q6 X c0 Lend; -- of the method
9 d( Z6 K" \5 J5 R+ G+ g |