/* called by: entrance ctrl of the object 'track'1 k: n6 x7 W9 ~6 E* q h8 N9 d9 u
*/* r- g; V/ Y' Q; w' s6 o
is
' v- @( \0 m( P" Q2 V+ n6 f part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ A& J8 r$ l) k: V
do
2 r' x( [! F3 D) f- p9 X2 a Lan := rootfolder.Internal.Tools.AOLlanguage;
9 S5 d& ^- v- Q3 F: ]5 Q if current = @.Destination -- else return) D, d+ s0 u k" G! G' a+ C! r* p9 K Y# h
then. J L* ^( v' m2 Y. d" m8 i5 g
@.Destination := void;* l }3 A) _0 ^2 K
if @.occupied then8 X, @( r4 K, j( t- ^
part := @.cont;2 F6 H" O+ C2 ~- r6 h8 N5 {& [
@.transpOrder := void;
, }1 K) D a& } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' b4 U4 n; p* g @,root.eventcontroller.simTime);
# }3 v1 |: n4 b" _( t @.HasOrder := false;
/ B& Z6 m: ?% i7 h" X @.DrivingHome := true;
% d4 x4 J; C1 Z4 d& q$ H- b/ j rgManager.tryToStartTransOrder;
! j6 G5 h* a. k, [& p1 Z( { if @.Destination = void" f* x1 n8 p {3 ^: j" H- x, U
then -- no transport order for vehicle @
2 M3 o5 {% h# W% z. D8 ]7 k+ } @.Destination :=* C5 {" I, L, t3 Z
rgManager.nearestFreeStation(@,track.~);
+ g0 l; i$ T* b: T. V7 f: | newDirection(@);
* i7 A% p8 y$ H4 d if @.Destination /= void then1 N/ x% c0 h8 I; f' l
@.Destination.NumReservation :=
% N8 i5 G0 O7 k7 z! q- E. M8 W$ C' A @.Destination.NumReservation + 1;
7 t1 d$ ~6 @2 o4 u+ G+ M end;
1 h# F! F8 p# q6 _' ?" ~! J4 Q @.CurrIcon := "drivingHome";- b5 W3 S; }# h" j" P- i" V3 S2 \
@.DrivingHome := true;4 T7 |4 W% s" u7 d) L; V
end;8 H5 @ z4 T; W+ t* D, y7 }: z& P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; v% \- M$ ~, p0 b$ c: N9 G
part := @.transpOrder;
' a9 Q" E: M! D' U+ ?: \ part.move(@);-- load part
8 N: D: u$ y8 ~! d8 F @.CurrIcon := "load";1 Q. a, B7 z: a' R
GlobalDistObj := part.globDestination;
) V0 a/ s+ T2 A! ^+ l assignLObj := rgmanager.rgAssignL;6 m, @6 x; ]) h3 ~
row := assignLObj.getRowNo(GlobalDistObj);' P. G. A9 m8 h; w$ h: F4 _- a* N
if Row = -1 then -- since 70/ g, p7 U. Z0 T: q6 A$ k Q
if lan=1 then* t0 D! Q3 d' y1 b) ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) @" ~5 K5 J7 N+ ]8 S
to_str("in der Andockstation: \"",?.~.name,"\""));
" q( h: u1 g& L i% ]. g5 r else
: j& l9 W, O, D6 D1 {# _2 s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. x% f; x; P1 g9 p# x1 ^ to_str("in docking station: \"",?.~.name,"\"")); Z- O& o0 D+ y" S5 |# Z
end;2 p1 g5 j, y$ Q- J' ~( _
else8 Q: A# W; ^/ R) a& \4 G+ S
@.Destination := assignLObj[1,row];( X# W- N6 [. c$ O y' C T5 ]
end; O* }+ k. f) _1 s
newDirection(@);- u' f U- y, n, f7 a2 _
@.HasOrder := true;1 Z W/ {6 b/ R: A
end;' |7 H. z" q6 M" f. K; Q. p8 u8 Y% o
end;
: Y7 m! I' j9 _) l2 I _1 K5 _end; -- of the method
) V% Y% O) B. Y, a, Z |