/* called by: entrance ctrl of the object 'track'
4 L! ~+ k# G9 P4 C*/
" j; P9 _3 U( k2 O- ^& ris0 [+ U/ J: g- `9 K6 A+ k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% W6 B. B5 S) `& c, T
do
5 n4 S; B) K- m: A$ d) a: E. {- s Lan := rootfolder.Internal.Tools.AOLlanguage;/ H! i$ h1 d# Q" Q
if current = @.Destination -- else return* T+ p3 x' Y7 ^- g' J! q6 {
then
4 `$ _5 X; {, ?6 B. [ @.Destination := void;. ^+ I2 V4 A4 w" K3 z7 S6 s
if @.occupied then2 K$ h3 @6 M2 T. d1 T6 J
part := @.cont;
/ Q! s8 d/ R8 [ A @.transpOrder := void;
5 N" `4 o* l' k) r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 x; O o7 Z3 o' T @,root.eventcontroller.simTime);
N& u2 r+ {6 @# F- @ @.HasOrder := false;4 [ l; `2 O7 h6 k
@.DrivingHome := true;) {8 W1 D/ T8 W
rgManager.tryToStartTransOrder;3 x9 w& U" S$ {3 e9 D3 p
if @.Destination = void
' u O8 j% d, E. U/ G0 a1 i then -- no transport order for vehicle @
% x8 k" F6 n) P' h& {( I @.Destination :=$ M- s. x# Z$ `! f. I! b: i- A
rgManager.nearestFreeStation(@,track.~);" w( ]1 W+ p* E& W! u' ]
newDirection(@);
1 M% O! k# i+ j h/ u if @.Destination /= void then! `5 s2 {2 R. F+ i* c* R/ O$ n" {
@.Destination.NumReservation :=
; H. Z8 k* V* [; ^' P @.Destination.NumReservation + 1;7 \; b+ O8 e( f& m
end;/ x9 Y5 i) x% v- X, V' [% F
@.CurrIcon := "drivingHome";4 U% G! t6 u0 g* T6 O2 W) o% [0 O0 L
@.DrivingHome := true;
+ ]* R9 D+ ^7 j! ]! R end;
7 B1 @* v S5 M: P6 y. ~( I8 _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, r0 T( k3 |- a% G" j& n% _ part := @.transpOrder;
+ \1 l2 W; o7 `1 s part.move(@);-- load part+ w5 b/ a! }5 O# d3 I
@.CurrIcon := "load";3 m3 ?7 x2 O( _% e. [
GlobalDistObj := part.globDestination;5 K+ F( c Q4 F- o% k: g
assignLObj := rgmanager.rgAssignL;6 G! w& c. Z3 o2 g1 d
row := assignLObj.getRowNo(GlobalDistObj);
/ J" Q: ^* h7 d if Row = -1 then -- since 707 u; I& ~3 M, [
if lan=1 then' w1 i7 ^; h; m& d- y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) c9 Z/ L4 t5 ]% e1 X5 S4 e9 d to_str("in der Andockstation: \"",?.~.name,"\""));
! q5 ?9 [7 t; {" m6 G5 [) e- F( C; b else1 ~% ^) _: K) W- \" t8 [/ O/ @0 R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' u4 L/ ~# _# x7 v! ?/ N( { to_str("in docking station: \"",?.~.name,"\""));
S: ^$ w1 v8 d7 ?2 e* S0 m5 d9 T end;( Q, G& m0 l; @
else
" H% h( t7 z8 }) L+ `9 X @.Destination := assignLObj[1,row];
1 N2 z! c/ J' q% X7 o end;
. S( U1 I- X8 \7 e. c% D/ X* c newDirection(@);
3 i2 y9 c( {: D @.HasOrder := true;% x `& x8 n- E+ j9 W/ p6 i' J
end; W" S+ n$ |- M) p; O
end;' L* o* t4 E. |, _; K3 T; Q
end; -- of the method
" l$ l1 d3 |% `# X, k- } |