/* called by: entrance ctrl of the object 'track'
8 x' [" z+ i$ Q7 t8 v Y6 b*/
) e- m" K6 C( Y1 b2 X. ?' t, Qis
4 P+ H6 o$ F& S, Y0 B& u& `5 |7 t part, GlobalDistObj, assignLObj:object;row,Lan:integer;" L, a$ M1 J& i) D' Z, Y$ o
do$ _7 W' l& \* O
Lan := rootfolder.Internal.Tools.AOLlanguage;' f1 y7 j) h# L9 ?. w( S
if current = @.Destination -- else return
, V" O5 I# U" R* u- A then* ^$ _$ W+ o- z$ y, h0 i. K
@.Destination := void;
; x) r L( R5 c6 N2 E; d if @.occupied then7 t; }3 ?$ N7 J' r% {
part := @.cont;9 v( p2 W& Q1 a" c3 }! n
@.transpOrder := void;6 K" H+ v! c& [& T$ S8 }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( S. ]6 p, L/ |( G, t# s @,root.eventcontroller.simTime);
5 h! V, P- U( i- P" M! @3 ` U @.HasOrder := false;9 t5 t+ f% K3 n* e
@.DrivingHome := true;
+ s3 c: m# G2 K% T- T; o ]. Z rgManager.tryToStartTransOrder;
5 H2 l; |& O+ a. k& Y' u' N6 s if @.Destination = void' [0 r8 O) G! o7 c- k
then -- no transport order for vehicle @/ _+ s5 p8 b& S2 E
@.Destination :=4 H8 D2 W) h3 v) C" h
rgManager.nearestFreeStation(@,track.~);
. B( J1 A3 u. [, p0 }' } newDirection(@); % O1 g8 ]5 |( z5 m
if @.Destination /= void then
/ R' m$ y4 |6 [- ?6 O @.Destination.NumReservation :=9 z5 N! N0 R, N; A9 U2 a- ~
@.Destination.NumReservation + 1;" p# W% U* d$ V1 W+ U6 H
end;' c: e1 X' `" U4 B5 h3 x5 E& i
@.CurrIcon := "drivingHome";! _1 @5 y# t2 H. k5 p) P. w3 p; R
@.DrivingHome := true;9 v8 Y" A6 M4 `( M: Q9 \$ S
end;9 F- Y7 J: F2 @! t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. w+ x. }2 e% U# l
part := @.transpOrder;
4 c, p. v+ [. W& r2 o$ H part.move(@);-- load part9 U7 T/ y' x, l1 o' G; I
@.CurrIcon := "load";5 H" [+ Q! L6 [; U0 d
GlobalDistObj := part.globDestination;
4 i$ h6 h+ y+ K3 W: m assignLObj := rgmanager.rgAssignL;
9 y, N# V# ]" U. |- N! w; @8 K row := assignLObj.getRowNo(GlobalDistObj);
# k7 d( B# M( Q$ b, W9 ] if Row = -1 then -- since 70- D4 c! W2 ^7 O' a6 n
if lan=1 then, Z: r" O, x# \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. Q8 b: T, o( w, K( L
to_str("in der Andockstation: \"",?.~.name,"\""));9 i4 C; t2 X9 X- K- O+ W' ^
else( N# a5 }. B. ^' k$ T0 n% L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 D9 y$ j( j+ b, d4 F% w
to_str("in docking station: \"",?.~.name,"\"")); ( b# c& d: p _
end;' a4 U2 Z. M# `
else
( y) r4 ]& t& i! R @.Destination := assignLObj[1,row];
- Y/ L3 [& v7 b) {* Z& E1 Z end;
/ p8 o* M4 ]# c newDirection(@);- \6 e! _2 }$ j' Q$ \$ ~9 B8 J
@.HasOrder := true;
- L2 Y" o! n% Y; t* b. u7 p/ _) s5 W end;
$ e M! m2 z' u+ z9 h end;% d! Q0 p" G1 i3 U$ {
end; -- of the method
5 r# B, S# f8 a$ e3 y7 ? |