/* called by: entrance ctrl of the object 'track'
: f! ~) z' E2 `0 y0 M* p*/7 L# A: y2 e) H: J
is- s/ C6 |( H) g# t$ S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 X9 m! p1 q: @' k' ^8 Q/ Ddo4 x& h1 l0 o: _
Lan := rootfolder.Internal.Tools.AOLlanguage;! E4 m7 C! [: l$ n/ h" Y; ?4 x
if current = @.Destination -- else return# }7 l4 Y* }* O k% L6 H2 ?
then) S0 j0 _$ v) u$ Q
@.Destination := void;
( H! L1 S1 j6 P if @.occupied then
2 Q* t) Y: d2 x+ g: J, Y, D part := @.cont;
8 Y* d; v2 x; s, C/ p1 K @.transpOrder := void;, f- f. z/ n7 D h2 ` ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# Z. C8 Y3 }7 C" `' j3 h @,root.eventcontroller.simTime);
1 f; q% z6 \: F* c7 C @.HasOrder := false;5 s+ f. s/ M* E4 i& D
@.DrivingHome := true;
4 @6 h$ ^, m8 c& o; K0 U rgManager.tryToStartTransOrder;, q! B- d& Q- B' k2 D6 i
if @.Destination = void! J/ W. Y+ m3 |. q
then -- no transport order for vehicle @
' V8 H& |9 C) b @.Destination :=
- D0 q) u# x; p rgManager.nearestFreeStation(@,track.~);
; M( n/ Q$ v6 { newDirection(@); : d* d+ t8 N$ ` V" { d0 s
if @.Destination /= void then3 J! ^, f' D! i- b* |. F' j! R
@.Destination.NumReservation :=& d. G/ U' x5 M
@.Destination.NumReservation + 1;
6 y0 J7 W" o Y- d9 N* R end;) e6 |8 Q0 ~+ }: } q. V: L
@.CurrIcon := "drivingHome";
E4 I% [/ L# `% ^ @.DrivingHome := true;$ C" ]% @: F7 ?/ \3 W$ D
end;0 ?* O9 f; Z M" @3 W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' E# Z$ s; g6 D+ s3 f' ^5 `
part := @.transpOrder;) j& f2 I. W$ E3 {9 L- q6 ?
part.move(@);-- load part
# a3 l: W1 c3 ~* L @.CurrIcon := "load";
$ n0 _7 S5 Y3 b GlobalDistObj := part.globDestination;, ]0 O! {# \. G# ?' G, s' o
assignLObj := rgmanager.rgAssignL;% A* U) Q8 p. P
row := assignLObj.getRowNo(GlobalDistObj);8 v3 O6 y) N% e* C
if Row = -1 then -- since 70- _9 b$ x+ Q+ x6 I; k* y
if lan=1 then- T8 r1 M, B/ k# K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" z- n& L C1 g9 t' s( `% s to_str("in der Andockstation: \"",?.~.name,"\""));! l$ k( j! D% ?) F+ W. D, L
else' \8 q& Y7 w# O( {
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' u, F/ B( q( `1 g- v0 c9 ` to_str("in docking station: \"",?.~.name,"\""));
/ v% e i: [. G6 {& @ end; E6 f; F9 \4 ]" R' C
else
% v7 l; p3 A! a: ` @.Destination := assignLObj[1,row];* \2 N5 U2 |0 M
end;
1 S7 w4 i) q0 D0 t: M' l" @ newDirection(@);
- L& t W- h. ~6 r @.HasOrder := true;
$ f ]" o/ k0 D% W r end;+ D9 `( r4 }: q, i5 L) s+ B( Y" L# L
end;
/ g4 B* l! x3 q: G( X6 ?& pend; -- of the method
6 F) R( A9 \/ }, J, Q |