/* called by: entrance ctrl of the object 'track'
6 I+ o* ?( O3 ?$ Q3 |*/* C- ?5 Q' r9 R$ Q! T; A
is
& h: I) i- W. r6 \! ~+ q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* E# u! o5 Q! odo
, i( [% q5 [, o& @, y; [* p Lan := rootfolder.Internal.Tools.AOLlanguage;& D8 ?6 u$ T. J, D6 a. C6 n8 Z
if current = @.Destination -- else return
9 D/ Z* j! u2 M4 ^5 A2 U& z. b then" i5 S8 m- e0 s9 s( b( d
@.Destination := void;0 B8 @+ u# J. w3 v
if @.occupied then3 l1 {9 u' C3 C, b
part := @.cont;
( M; v- L! f' @: }* z @.transpOrder := void;. ]% n/ j8 L7 t" I$ ]' z' A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 m: x3 \, y' p6 f @,root.eventcontroller.simTime);7 w2 U# T8 A3 ?8 @
@.HasOrder := false;
i }8 G3 b7 V7 I+ I @.DrivingHome := true;0 ~. j/ y4 W6 h5 e7 X* B0 m( b
rgManager.tryToStartTransOrder;
7 z+ j* C2 W7 r0 q if @.Destination = void8 l' {0 J% Y+ d% V$ b
then -- no transport order for vehicle @( l/ z. @6 Y% |) L# ~, W
@.Destination :=' X& J- a( X+ G( n
rgManager.nearestFreeStation(@,track.~);; k, ]8 Y" @# v+ c
newDirection(@); % ~ L8 s2 @" {* K! s L* Q' ?
if @.Destination /= void then# K( R+ ~; a5 E7 S
@.Destination.NumReservation :=. `4 m& ?' w M `& I, a1 v" m
@.Destination.NumReservation + 1;
% t# J, t* n7 {7 F- x end;# ]4 S- g5 n( \" Z- \2 E- i3 s: o' w
@.CurrIcon := "drivingHome";7 W- D! W. B0 U c6 A0 s. R
@.DrivingHome := true;: t, O Z# w1 C. Q
end;
$ T! p: M; K. Y! R, W else -- the vehicle @ is empty, both vehicle and part are in the same dock station# P, P. [+ J6 N" o
part := @.transpOrder;
$ v) m" E$ d' T( ` part.move(@);-- load part
7 Q+ T; }# _- \4 X: y3 \ @.CurrIcon := "load";
/ a' E7 p, l6 l2 h* a3 y GlobalDistObj := part.globDestination;
3 C {" d- h4 P% w# C3 B assignLObj := rgmanager.rgAssignL;4 s; p+ h6 x% L4 S, d
row := assignLObj.getRowNo(GlobalDistObj);$ r# d# e6 A8 T& [1 H
if Row = -1 then -- since 703 j' c( F" N; A( T: a
if lan=1 then/ D1 r, P: A5 Q+ I9 G, J$ G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' o! b, F% F2 q+ B9 }7 p
to_str("in der Andockstation: \"",?.~.name,"\""));# U, G, H& o. B4 e$ l. j& g
else
6 G) C# g% T o# S0 } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," {4 |$ \% B& S( R5 p5 ~# N& d
to_str("in docking station: \"",?.~.name,"\"")); 3 j% i- |9 s8 W+ V+ d
end;
" G$ W. c) z% O5 [" s else( ^. ?9 A, F9 }4 e$ \5 }0 f- g
@.Destination := assignLObj[1,row];
( w m' L$ P, H; W/ G% B% Y; l end; 8 @+ M- \; z. C8 g& z
newDirection(@);
r5 o' |) X7 x1 z @.HasOrder := true;
( o6 k0 |6 `1 j end;# r6 j! h) a: Y, |) v" U
end;0 V6 v- f/ e1 I0 j3 W
end; -- of the method
% n2 g! `0 O5 `5 e9 w) K( n9 e |