/* called by: entrance ctrl of the object 'track'* J9 ^+ M% c4 G( R
*/
) M* T8 N1 n' h1 ^- ~( @, eis
% u( l1 h' j% o1 e$ o part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: E: i A% H0 f. l [: N8 hdo+ P; Q Z) {# s* {/ ^; Q- P
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 n9 U* V0 ~& B& ?4 z" k2 U if current = @.Destination -- else return3 n6 v( g- D0 ]; D
then
! Y/ `! n& G3 ]/ F' @- N1 x) D3 N @.Destination := void;. i* Y' v2 L/ B: X7 X
if @.occupied then. N" F" M# ]2 G
part := @.cont;4 z9 N# K+ ]! M) @
@.transpOrder := void;
# J1 o4 G o; j# Q0 k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 j; e0 A# P, A, H @,root.eventcontroller.simTime);. M) h* j/ K3 ?9 m5 V
@.HasOrder := false;7 W# [% p7 B7 c$ j6 }" ?* t" d
@.DrivingHome := true;# r' `7 ^' j, J! p3 S/ R4 I
rgManager.tryToStartTransOrder;: _/ q4 f" @; }" H9 ^
if @.Destination = void0 @* T o# b* I; E+ t: e
then -- no transport order for vehicle @& A! c/ ]( N# P6 q2 v! w
@.Destination :=
& L6 n; u o; V" O rgManager.nearestFreeStation(@,track.~);
0 v% P+ \5 R' q6 B7 Q2 ^) J newDirection(@);
' l2 g% o k0 m5 S8 @ if @.Destination /= void then$ Z+ O6 F& ?% n, L
@.Destination.NumReservation :=
) d3 V s" N1 F) x4 {1 a. {. [ @.Destination.NumReservation + 1;$ h4 w4 d/ u X3 U4 T, M+ v
end;( T# Y% B# V) ^
@.CurrIcon := "drivingHome";
: r% J- G4 `* u2 J' J @.DrivingHome := true;* K- c$ F. T" i
end;3 W! z0 f' h3 }* R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 t; b+ G m- X; }# ?! o
part := @.transpOrder;
7 P- p3 V& I2 X, @ i; G part.move(@);-- load part/ ]) n% [- [& L$ U9 h) N
@.CurrIcon := "load";
S( S! q# A1 {, N& ^ GlobalDistObj := part.globDestination;
) X; z: O c% L6 Q assignLObj := rgmanager.rgAssignL;% E7 s5 }' K; I: k
row := assignLObj.getRowNo(GlobalDistObj);9 Q" [+ U0 C5 ^4 [5 N4 y: A
if Row = -1 then -- since 702 i: b9 E* {2 `3 n( b; u
if lan=1 then- O1 S( H" F- r" X5 b- o! B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( ~. y% @1 l4 r; s to_str("in der Andockstation: \"",?.~.name,"\""));( H9 v( V, n' J3 _: F) @& Q( n! C
else
. I- \ s* B' O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% s" q/ e2 \$ W, t% { to_str("in docking station: \"",?.~.name,"\""));
+ H1 a9 K6 R6 k s: [0 x* S end;, g8 ]' A2 f6 z) [, `/ u6 M
else
: }9 O# B. L; j @.Destination := assignLObj[1,row];* e3 \! g. X6 Y" H' V
end; & G# {9 U$ i7 H: S
newDirection(@);+ B' ^7 _) l. ]. [' {& P) J( f
@.HasOrder := true;
' _) O2 b7 S" v) k$ { end;" @) n9 T- d6 n1 K3 ^% m' ^7 G/ @* L
end;
- Y4 N4 S& J" Y# wend; -- of the method
I8 E5 A5 k( q) y3 L$ {# B4 Q |