/* called by: entrance ctrl of the object 'track'
# [( y' Z2 B) h/ ?3 k*/# O4 Y ]5 C% m+ `. K9 l
is/ d* j3 a7 x1 P: J9 p! c! M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ e2 z) `' }$ Qdo
# ~& S G* D9 p! F Lan := rootfolder.Internal.Tools.AOLlanguage;0 L% U1 @* D a
if current = @.Destination -- else return
& S, ^8 G) U9 q4 a$ B then
) h0 | T k4 D @.Destination := void;
$ G) R$ q) B2 ]: p& u+ v: F if @.occupied then
" z# v H/ h- f4 Y% m; a9 G part := @.cont;
6 s$ \7 u7 M0 @& D4 q @.transpOrder := void;
5 F2 ]; q% b4 H3 _. J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, h) @+ I1 T4 Z( y3 w% ? @,root.eventcontroller.simTime);% s# e( Q9 D, a( y, i6 A
@.HasOrder := false;
/ `4 q# d9 v( y" G! \( F2 ?" t @.DrivingHome := true;
o+ {: Q, N1 ?' [ rgManager.tryToStartTransOrder;' u T$ p; x- S$ z, ^+ e
if @.Destination = void
8 `$ P: L4 z/ p8 V then -- no transport order for vehicle @* j. D9 b7 g8 V- A# t; e
@.Destination :=& o+ I8 W j$ p0 e9 O
rgManager.nearestFreeStation(@,track.~);
; z: K/ N* M: d- ]8 u newDirection(@); & }" \! M& P) X
if @.Destination /= void then
3 Q* i8 N( f4 b; g( V @.Destination.NumReservation :=
' t N. D( U, D9 F" p @.Destination.NumReservation + 1;( w5 X! x! E' s7 Y" f% {# d( S
end; ~* M+ E; v) N/ R# z& R- S b
@.CurrIcon := "drivingHome";( g5 i2 |5 o4 U7 R& ?8 ~: e& F
@.DrivingHome := true;
" p* _; h! L' N1 M8 M4 _1 _7 l% \ end;
3 C) W' J' ]: ^. O* o else -- the vehicle @ is empty, both vehicle and part are in the same dock station: |9 Z" f9 W& e) ?/ [! [4 }
part := @.transpOrder;9 `: D/ V' G: R& A- g# {
part.move(@);-- load part
& h: k0 e5 m' N/ [; D @.CurrIcon := "load";/ Z- S1 R* U4 _9 n0 t7 T7 L9 T" Q
GlobalDistObj := part.globDestination;, L3 c+ C+ c8 ~* ]* I% v; e
assignLObj := rgmanager.rgAssignL;
6 E; j+ l' o- E7 P7 n row := assignLObj.getRowNo(GlobalDistObj);
' @( N# x' y* F& H% K if Row = -1 then -- since 70
4 |0 ? P0 l9 Z( l if lan=1 then; G3 p1 F- @1 m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 G5 `' A8 X& p5 \+ i( O! O1 [ to_str("in der Andockstation: \"",?.~.name,"\""));
( p& w3 W, [ T( r) _ else( H" e9 y( U' r+ _$ t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: q. [, }% z- J1 c$ s- E to_str("in docking station: \"",?.~.name,"\""));
$ H7 v8 s5 u; p. z+ W4 D end;+ q9 U) d0 S! x
else
3 a+ b0 m( ?2 ~. b @.Destination := assignLObj[1,row];3 B5 V+ m: @8 k$ A
end;
& o7 u: M/ i1 L0 e- p newDirection(@);
- Z9 r) J4 ^& M! d8 @/ t% D @.HasOrder := true;' J4 V) L0 Q& r
end;" G' ~- r* @! ]! {# C O, `1 A
end;1 ?& T6 t i5 w: b! u+ A T3 u- A6 c
end; -- of the method
/ j' |" l" a2 E1 W! @$ j |