/* called by: entrance ctrl of the object 'track'
( B+ i$ u( M! K+ ?' L*/1 R. ?. c# _( P" ?3 p1 X
is0 v y$ a* P4 e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; l4 f) Z) p# \! W/ O& k/ w4 ~
do; ?7 }+ y3 W: [3 s. _
Lan := rootfolder.Internal.Tools.AOLlanguage;* W9 z5 j; c+ }' o7 w) y" G
if current = @.Destination -- else return
n9 b' z2 `, k) B4 q) R then
% V: w( M1 _3 L$ ^+ U @.Destination := void;7 x( B3 O' [9 l) G9 u
if @.occupied then
( j& Z0 r5 F' |7 u. a1 D7 T! ?; T+ s part := @.cont;
$ ?0 e; I. P- ^6 l9 l# t. z @.transpOrder := void;/ E( u- } ]4 ]: B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. C- L$ c9 O2 }/ R/ h @,root.eventcontroller.simTime);& p& J. ]: Q; g
@.HasOrder := false;
% Z) |3 p' x9 J `" f4 i- ?- b @.DrivingHome := true;2 z9 _8 I8 Z0 `5 O
rgManager.tryToStartTransOrder;1 V7 f; @! O" N9 g
if @.Destination = void
9 d5 O; q5 o G; \9 @ then -- no transport order for vehicle @
7 x% K$ r' O8 {4 e& W @.Destination :=6 v$ p w% E! w: `$ a
rgManager.nearestFreeStation(@,track.~);
; r+ I3 ]; G4 S4 H; a newDirection(@);
2 O8 G' D) d& e2 d ` if @.Destination /= void then
2 i! [3 o" T% Q @.Destination.NumReservation :=
2 _" X- a& R& `5 o/ ? @.Destination.NumReservation + 1;4 S- b; \; {# z8 K/ V2 s
end;
$ f+ p5 D8 J5 ~+ ]) u @.CurrIcon := "drivingHome";" ]. e/ C" ]% b! O
@.DrivingHome := true;
) K; e* y2 U* K0 i2 L6 _' O end;% N% K' ~. t$ M% e- @4 O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( k5 e' Y: p. V7 y4 h$ w9 A part := @.transpOrder;* R* z- E, Z: V! E, B0 V
part.move(@);-- load part' @/ k7 N$ ?) f8 a# V4 O0 D
@.CurrIcon := "load";
* t* s/ Y' N/ n+ L6 b- l2 P1 Q GlobalDistObj := part.globDestination;
?$ o( V$ S$ R$ O) L7 d assignLObj := rgmanager.rgAssignL;# [* s: j: v- _4 h# N# j& {0 R
row := assignLObj.getRowNo(GlobalDistObj);
, _) ~$ u( W0 _! A if Row = -1 then -- since 70# @$ h4 u- z9 l% [" \% C
if lan=1 then
" f4 B) _' n3 J2 o8 m! r# r7 i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: T- Y% Q; j3 M% d, }, H
to_str("in der Andockstation: \"",?.~.name,"\""));' Y" Y$ D! W: i5 Z# S. G$ ]
else
% q6 p; @1 n( d0 q9 C; ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# x4 L: I/ f* B- f
to_str("in docking station: \"",?.~.name,"\"")); & U& O: h. ^0 X( H) s
end;# w6 c+ N$ ]% x. p# }
else
. U6 ^$ f" a5 G! U3 d4 T0 G @.Destination := assignLObj[1,row];) v' i9 e" j% E, r. W* Q* J
end; % r' L: M4 p( E/ L+ U1 K+ ~9 N* a
newDirection(@);
1 ~/ I6 {& [ z7 K0 m i @.HasOrder := true;
& c* Q. K) t) ?0 B% v9 y end;$ q% T4 _% a8 \ B! C0 t( n
end;
/ c( M$ K, [8 A+ A4 _8 [. [end; -- of the method
0 W2 z& C! h2 b! R8 i* k9 l W" r6 P |