/* called by: entrance ctrl of the object 'track'; G& I# {% \. D, z) I! k$ w3 L
*/
, v! r% q' h! qis
) t% C' M) x9 r8 v# z2 y) m0 H part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 X0 g& L% I( ]2 p2 E! y
do
9 G1 A2 C0 g8 d2 w/ B1 s8 s a4 u Lan := rootfolder.Internal.Tools.AOLlanguage;
; H; K3 ]. R, k( Z if current = @.Destination -- else return1 ?4 n) s9 m$ i: ~( P$ r' G$ h
then; V6 p' |" H1 F. h: A
@.Destination := void;; R, R* W: m0 N/ }! [4 v
if @.occupied then( U% e. n% _! N. t. J
part := @.cont;
+ S" p: F0 a/ O5 i$ A% ~ @.transpOrder := void;" H% z$ C+ O' w, `; H8 f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" p& l5 S$ J6 z! }, X @,root.eventcontroller.simTime);1 ?/ s' L% \. G2 U" {: J6 n0 o
@.HasOrder := false;
1 ?8 u. C8 A+ v; C @.DrivingHome := true;
% m8 e5 h t0 p2 _% C rgManager.tryToStartTransOrder;
( q2 Z( H8 O0 b5 G A if @.Destination = void& q W6 V" U; m) F% }* y
then -- no transport order for vehicle @( G6 Z! O* t8 o$ j, }+ `
@.Destination :=
* }( |, p. n) G/ |0 S6 B: \ rgManager.nearestFreeStation(@,track.~);
/ o1 |5 r; e# f newDirection(@);
4 v% a) t6 n! j9 K* ` if @.Destination /= void then
( q5 n! U+ T. X) c# l% z# d! \! k @.Destination.NumReservation :=0 x. C- z3 v8 p2 A
@.Destination.NumReservation + 1;
, f3 L' k6 u3 D8 v7 Y end;. T! [! @, E+ {. Q
@.CurrIcon := "drivingHome";
# Y/ e% a, o/ ?& [! i% s( a @.DrivingHome := true;9 y+ H+ }) V- q; I' m2 B
end;& F. r {8 V+ G& f! Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 D( k5 S: j- L: F part := @.transpOrder;
8 Y' b3 k6 N. W4 H! q' P part.move(@);-- load part9 I6 G/ h8 v! f6 w9 Z8 c/ X
@.CurrIcon := "load";+ ?1 C7 L" q5 V3 s
GlobalDistObj := part.globDestination;
+ i+ p6 @& A' v: u8 d5 H assignLObj := rgmanager.rgAssignL;) I A2 `& B0 B7 V. Q
row := assignLObj.getRowNo(GlobalDistObj);' x q e1 S; J. _5 O
if Row = -1 then -- since 70
. Z( |5 u, V3 J if lan=1 then" G$ g8 C4 q6 F9 @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( A' g2 a9 b( S" d to_str("in der Andockstation: \"",?.~.name,"\""));
$ e" T- p& ^+ }: v else
+ v& P, c" b4 A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; T2 h# R3 N4 C- @8 g/ {7 Q. _ to_str("in docking station: \"",?.~.name,"\""));
' ]& O+ M" H! U' P- C end;0 [, p8 e. u/ _, L
else
. F( d- N, A6 D8 h3 C @.Destination := assignLObj[1,row];
y5 p) l* {) O5 z* ` end;
5 Z" f# s. Y& A$ \& O newDirection(@);
0 ?( t4 j3 g5 G1 y9 U: | @.HasOrder := true;
O; J6 x8 h& s) O0 [+ f end;1 a( ?9 a$ `# L( |1 e
end;3 K4 A6 a# l- M! H
end; -- of the method
% Y& i9 L% m! i. Y: i. F |