/* called by: entrance ctrl of the object 'track'
# W0 m' [6 ]$ V: D4 T*/
/ h& U( ]5 b6 F+ jis e* i8 A4 S/ f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 {5 O* d1 q6 v- C8 c" X
do
5 G8 _3 N) U, {: G. v( W6 E Lan := rootfolder.Internal.Tools.AOLlanguage;
5 R6 G7 y$ D! `- @ if current = @.Destination -- else return
% u; q. [+ X/ R7 P% X& [8 q7 N then
& A: I7 S& L0 i3 y$ M/ V* @8 R @.Destination := void;
# B' Y0 n; n. f m) k' U6 ?+ Q if @.occupied then
. q* D* F0 x. [4 B+ F part := @.cont;
; @2 z7 T4 w+ o a( @8 Z5 e8 [# o @.transpOrder := void;3 A. q; S4 h$ y" Q3 @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ w, ~: q7 _/ m# W0 A
@,root.eventcontroller.simTime);8 @$ H% ]% r+ I* x
@.HasOrder := false;
$ u2 j }* @" U; o7 E @.DrivingHome := true;( {" P" S8 s( [+ J/ r% q
rgManager.tryToStartTransOrder;- O0 L$ j, A. }% X) F" |8 F d
if @.Destination = void! h1 A! N# B+ m
then -- no transport order for vehicle @* P, h# j2 v9 o8 D9 C4 k
@.Destination :=( Q" B# ]: P) _" @2 x, i
rgManager.nearestFreeStation(@,track.~);
' c2 Z% T" D6 |+ @: c3 r newDirection(@); 7 f6 u: o" ?( h! t/ u! Z
if @.Destination /= void then
; T2 S- _8 I7 F# ~- _( \8 R @.Destination.NumReservation :=
5 x( ^; C0 [6 s8 L: Y/ |5 F# R! g @.Destination.NumReservation + 1;
3 e9 A6 C4 Z& U( p2 P) l end;7 `8 b5 v( ]8 B' J/ B, n
@.CurrIcon := "drivingHome";5 i) S( v! f& J; T
@.DrivingHome := true;, H! l& G% r; F3 W2 g9 I7 v/ d6 {( A4 c
end;) L2 O- ~0 k; e" X: W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. }" a* g u9 [2 M* P! Z' s% b/ {' j
part := @.transpOrder;4 H$ z @& I! z! q
part.move(@);-- load part3 v% [' a0 E% a: ]2 K7 k2 _
@.CurrIcon := "load";
0 e9 R: f# J/ B0 K! K GlobalDistObj := part.globDestination;
i' x; f7 I8 ~. z assignLObj := rgmanager.rgAssignL;- R: L1 B; R; Y6 E) T
row := assignLObj.getRowNo(GlobalDistObj);
( r ]8 P9 e, K# r0 J! R2 L: ^ if Row = -1 then -- since 708 W0 L2 X' i z# S
if lan=1 then$ h/ V: h6 a+ h9 G( q7 S2 x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 b/ ?* ^/ P4 _. z
to_str("in der Andockstation: \"",?.~.name,"\""));
5 R* h# s3 H" [5 R9 v7 g else2 q% o; H, b+ }) l9 C5 L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 J% T+ J8 Q) q! ^! i: o! ]+ g
to_str("in docking station: \"",?.~.name,"\""));
' P0 o# f8 y" Q } end;1 p/ X. \ u1 c7 U% e* a
else$ a- X. |: A6 E0 O: e) h
@.Destination := assignLObj[1,row];: G1 r: o5 E4 y& R; Y' X
end; 8 R; x" {: `% c" W; j' t) h
newDirection(@);
& Y/ X7 G* C; S5 e, D @.HasOrder := true;4 U! H+ ^7 I/ I' n! O
end;
' D" ^- V0 ]* L# R end;
4 d; {+ t; l1 ^4 |3 Q3 s, Gend; -- of the method9 P( T& ?! v' [1 x
|