/* called by: entrance ctrl of the object 'track'
% b* ?* I' @! j, Q2 C*/
8 h5 |& @3 o" m; Z) zis
/ _* W& h$ C" w% ~1 z part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 x1 }+ Z9 q. j% w7 |& ?5 o: e- A
do6 J# l; U& O0 M0 X6 t% I% M
Lan := rootfolder.Internal.Tools.AOLlanguage;$ `# b' h3 f g$ l. Q8 ]+ B
if current = @.Destination -- else return
/ ?9 c8 Z9 u/ S9 Q2 I then1 n/ K* D+ o+ W7 }' q/ r) y
@.Destination := void;- U- ~# z! D9 A
if @.occupied then* b- S6 W- Y7 `7 h
part := @.cont;1 W; H1 Z r! L# n$ K+ Q G: Z1 ^
@.transpOrder := void;& |; Y" @1 o4 t' \$ B4 W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% I: ]7 g' n! [- m9 b8 z, @3 p
@,root.eventcontroller.simTime);
: R. _4 I6 F+ w4 T( o @.HasOrder := false;$ M/ v A- e) }. m6 t! ^
@.DrivingHome := true;3 H" E5 @! V3 |: Z2 K* W
rgManager.tryToStartTransOrder;' T: f. Q1 F3 t+ j1 |
if @.Destination = void
; E- O7 y( _% s; h then -- no transport order for vehicle @
! l, |4 b; G+ X @.Destination :=' a: [* n; I+ g R" g
rgManager.nearestFreeStation(@,track.~);
" A7 S$ c) d) E newDirection(@);
# c- B) z, }( B if @.Destination /= void then
( ], n5 a) N; @/ l5 U& P! p0 q7 p: `" E @.Destination.NumReservation :=
6 _1 S4 {8 k2 {1 \8 {' ~2 b @.Destination.NumReservation + 1;' y# L+ D6 ^. w, q4 W0 u) O& S& j
end;
0 \) q( b1 `: d! z/ e @.CurrIcon := "drivingHome";
+ Y: l7 r7 B- ]4 c @.DrivingHome := true;
s9 y$ \1 \) O7 x1 U, J( O end;, R z- T+ d% A* [0 Z6 E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 g! U" {# g% A2 x7 L% } C9 N) ] part := @.transpOrder;
3 C" g" P+ U0 w" [ part.move(@);-- load part( N; @1 ~- s. z( M8 t {# R. K
@.CurrIcon := "load";
M1 I- c! }( @2 U) V1 b3 Z GlobalDistObj := part.globDestination;: e6 p) |* C5 ~4 C4 K# ]
assignLObj := rgmanager.rgAssignL;7 d; `$ G( L2 ?" g- G
row := assignLObj.getRowNo(GlobalDistObj);/ N! Q7 w! Y. h$ `
if Row = -1 then -- since 70* z& n: L0 J% r+ Z( r" @0 V# g
if lan=1 then
8 z; }; C3 [" s: j$ [8 D- m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* a, @6 D! m. f* n: k9 Q6 d
to_str("in der Andockstation: \"",?.~.name,"\""));( h, J. F* G) Z0 r: K* k
else
3 k& Y+ n5 D& d! a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ |0 Y, I5 A T to_str("in docking station: \"",?.~.name,"\""));
" s# v. W: k. A end;! D. ~% s0 C. O1 y! B) o6 B
else
' L. F* R5 U; t' T: z @.Destination := assignLObj[1,row];
" T( T& r/ } d8 | end;
" B0 h& ]/ W) `1 C2 n. \1 b: d newDirection(@);* g( o) A- e" C- c0 O
@.HasOrder := true;- Y# [, M8 t2 l: D
end;6 Z8 t7 m1 [! z7 A- O9 I m
end;
s+ D6 d* V+ qend; -- of the method
+ ~1 V. X' T2 e7 p! T8 ]0 a |