/* called by: entrance ctrl of the object 'track'
, n& Q" {$ i- V5 _2 l- V6 Y$ i7 C*/& I1 k# ~* A2 A* Z0 j! y* b
is) Z' O2 P, M% C2 ` P6 C* T' y# S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 ^: @9 L# z! x
do3 ?0 v& p5 N) K
Lan := rootfolder.Internal.Tools.AOLlanguage;; o9 M: k0 A" @: ^2 q% T
if current = @.Destination -- else return; Q$ N- u2 o. S* @7 i5 A2 o) i$ G
then
0 e; Q- }+ {7 [ X; s( z5 ]9 Z @.Destination := void;
2 \* l% ?) k8 x if @.occupied then
2 l } ~5 ?, G5 {% j$ c8 p N0 ` M part := @.cont;1 @' Q! i$ x# }2 m4 N& o& G
@.transpOrder := void;
* R/ @! @* P: l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 G9 V( K. r+ f% J6 m/ Y @,root.eventcontroller.simTime);6 o0 l- o, n& ]: I% ?
@.HasOrder := false;5 [6 `- _6 X+ _' m/ p. s' d, s" e! O1 E
@.DrivingHome := true;
x t h7 X B0 S, y3 f# K rgManager.tryToStartTransOrder;
) \1 O9 v. x' |; }" Q if @.Destination = void
0 V. m4 m) @8 P# ~ then -- no transport order for vehicle @
4 I Q& P& |5 g) e @.Destination :=) q: }2 }* }& q8 |$ m9 c+ B6 X
rgManager.nearestFreeStation(@,track.~);' B# C1 _) J7 @8 l& `: T
newDirection(@); ) x5 \3 W: b9 q% ~
if @.Destination /= void then( n% I9 T/ c+ W
@.Destination.NumReservation :=
; d4 ?8 R u+ @' w9 N' g @.Destination.NumReservation + 1;5 o3 D r/ Q$ \* l- E8 a
end;9 D j) m1 `& w" @" F
@.CurrIcon := "drivingHome";- q6 `: W# M% f6 q, x1 V. d
@.DrivingHome := true;" I1 b* T5 @! H- `. \
end;$ W; [, ^# B7 n6 }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, I3 F7 R' C3 f7 E
part := @.transpOrder;
, Z# T! |9 Y$ N% }& V; Z6 } part.move(@);-- load part# O! D; |; T$ d$ O; v0 u
@.CurrIcon := "load";
3 ]; b* o# e h' v6 v8 Z GlobalDistObj := part.globDestination;- @* F+ R5 f8 j b
assignLObj := rgmanager.rgAssignL;" A* S/ a" R' {
row := assignLObj.getRowNo(GlobalDistObj);
2 o, G( E) i! X6 S7 g- U if Row = -1 then -- since 70
( L! {) B) r5 V( U5 z if lan=1 then2 L) t Q; i$ v: Z2 e7 d4 Z+ X& S- {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" ]3 T, W5 E3 U/ ], _ to_str("in der Andockstation: \"",?.~.name,"\""));
: R+ d7 X# o/ s* V: s else
+ U/ ^$ }$ e9 v% c3 B5 m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 T/ o* V# `7 e" O. j5 f to_str("in docking station: \"",?.~.name,"\""));
& O R) H2 B5 c( |- s1 b* U g end;/ U+ A. e( A% y/ g8 ~9 W
else
3 n2 j+ R: @$ c. U @.Destination := assignLObj[1,row];
0 x9 s* ^: \* F0 L' o, P L/ f1 t end; 4 p& G& y! Y; n
newDirection(@);/ ?) M* {# B3 h4 Y3 `$ T4 r
@.HasOrder := true;
6 z7 O( e6 R% c% [( Z3 e" t- z( j end;
* o+ Y8 z1 y+ B) X3 X9 A% E* S6 h) m end;0 ]# n! \2 A: r3 u; u
end; -- of the method
3 Q* {! n ]8 R* b5 B! s- l% F0 Q |