/* called by: entrance ctrl of the object 'track'
5 E& t S) d1 i+ d/ D' e) _*/
, T, V. M# ]; a: c5 _% Z: Cis
6 y" W4 m( k( W4 C part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# A6 s0 m- t, `do
4 r/ P3 ?5 ^) ?: |+ D, q! r' D' A Lan := rootfolder.Internal.Tools.AOLlanguage;
7 J. j; R, o. o, Y0 J5 ]9 P if current = @.Destination -- else return/ ?* x6 z; Q0 U x; m7 |7 H C" T u
then
1 _$ }2 C# t6 e, G @.Destination := void; ]; K0 ~+ M" B( u, Y
if @.occupied then4 q! v% T5 o8 K
part := @.cont;2 v( r" ?# c# c+ B
@.transpOrder := void;$ ?: @4 ^8 W7 ~9 X3 b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# ~8 {5 ~) n0 N2 S9 h" b, H: K
@,root.eventcontroller.simTime);7 }1 \% ^/ |9 a
@.HasOrder := false;( a9 q$ Q6 m- O+ ^
@.DrivingHome := true;, D- ~6 r) m* Z% Q# i( ^
rgManager.tryToStartTransOrder;% N9 g' n8 J/ i+ G) [2 P- [. p
if @.Destination = void% @, Q; X9 n1 a0 B' J
then -- no transport order for vehicle @* T# U' o0 Q9 `% Q& A7 T/ _/ W
@.Destination :=
: P' u1 C7 Y9 k @/ U rgManager.nearestFreeStation(@,track.~);) [# k* E- L2 \8 K
newDirection(@);
9 \. n3 e; p* M6 E, [ if @.Destination /= void then
, j1 X) w! X4 j$ ?1 F @.Destination.NumReservation :=
/ _. c l3 `! |8 d4 p; t, f) a @.Destination.NumReservation + 1;
9 P1 }* x. ]: z3 H& I( f end;
- N1 c" r) [' P" `0 V, A @.CurrIcon := "drivingHome";8 E$ [& |6 m' j) i" I; n2 f$ s
@.DrivingHome := true;
3 s. X) y+ K% d1 ] end;$ |! O0 U: N& d: d- z3 G0 Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* v% K; u8 j* l/ |, H& G1 K
part := @.transpOrder;; _5 V' {4 z7 q% I& j
part.move(@);-- load part* @* A) o5 ~4 U: I6 L
@.CurrIcon := "load";! Q; b6 h* g8 g; T. b: K& c
GlobalDistObj := part.globDestination;9 [9 z. p t6 N+ y+ A
assignLObj := rgmanager.rgAssignL;9 A# H R+ x: X1 i4 W8 H6 x% R
row := assignLObj.getRowNo(GlobalDistObj);5 U% J% L+ `! D3 n
if Row = -1 then -- since 70+ A% m3 U9 _$ y
if lan=1 then7 V. \/ V U) `4 x* E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 I4 H9 `+ ^& O4 o
to_str("in der Andockstation: \"",?.~.name,"\""));) f4 @+ K6 E* g- O: m
else/ a! y; \) A" b9 D8 H: T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) @# d- R6 V7 V( ?
to_str("in docking station: \"",?.~.name,"\"")); / f, a; `2 j1 v: F( L
end;
8 E g" i. | H O* z2 N# P else4 g! X1 |5 n s7 q% n' \
@.Destination := assignLObj[1,row];
) o% }4 G) n- I5 e- _& T end; & ] `' O E/ U' K3 V
newDirection(@);
1 Y6 i3 N3 K( A1 d. C @.HasOrder := true; `, w/ ?3 t& w0 ~: Q1 v
end;1 y$ C2 M# @/ ^+ ^
end;
$ @4 m3 O4 c! w; e q, hend; -- of the method
! B: y( f p! v/ ~5 p |