/* called by: entrance ctrl of the object 'track'
% V" e- Z( g1 t n: n2 R" g*/0 D S f; ?, m D8 b3 J
is
" ~; C: T& y7 { part, GlobalDistObj, assignLObj:object;row,Lan:integer;! E( U+ ^5 T; j# R/ x# p7 G# q
do
/ u" f4 Q1 u2 z; t8 x& E Lan := rootfolder.Internal.Tools.AOLlanguage;
% {# E* E5 @! X if current = @.Destination -- else return
! Z* s" Z+ O" b7 N" r! x, d then% f, Y. j5 p% F
@.Destination := void;
- Q5 D% v* }" r* J7 r, k5 _$ Z) W J if @.occupied then) d/ \' b" ~5 i) V5 s5 B! z$ c
part := @.cont;! `2 Q) K$ k4 ~( h7 g( }
@.transpOrder := void;$ A& ] y7 |9 J5 r- R/ j- P/ p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. E/ T' ?+ G2 F. d( }, Q6 `8 I @,root.eventcontroller.simTime);
; n: z$ D. [$ w- c" [ @.HasOrder := false;' T9 O; A0 G& j8 G" {0 e& w3 ]! w
@.DrivingHome := true;
$ A8 I- x2 ?; ~. S5 S1 b rgManager.tryToStartTransOrder;/ ? d* D: _( a
if @.Destination = void( N; e+ w% _. y2 x$ [1 S0 X
then -- no transport order for vehicle @
+ }1 h) C% y! w$ G9 J' V, _ @.Destination :=0 n* T5 Y; l+ }; \
rgManager.nearestFreeStation(@,track.~);
" \) Y7 r4 ]8 J5 H' O! w- P; V newDirection(@); & V" J# I7 p4 {3 q) ^5 g
if @.Destination /= void then
+ Q5 ]( S, V5 m @.Destination.NumReservation :=- e4 _% p( e& ^5 ~
@.Destination.NumReservation + 1;
, I- t$ n& d9 | end;% B* y& I7 X0 f- d$ H9 j8 I
@.CurrIcon := "drivingHome";
' l3 c+ l& U9 [ @.DrivingHome := true;
6 y0 X3 I1 u8 n8 K1 W5 P' T/ r end;
2 E3 Q' l$ u4 A4 R% `' y. } else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 P* g# v" K/ I. k; S
part := @.transpOrder;" y8 i, L [. n+ e9 |- W- H
part.move(@);-- load part5 Q! S9 a ?" X/ B: k% k6 \
@.CurrIcon := "load";2 f/ t& q* u( ~, M5 j
GlobalDistObj := part.globDestination;8 Y% x4 D2 L3 U. b: o. Q; j
assignLObj := rgmanager.rgAssignL;
- q4 t5 m2 A& \' F! v5 E row := assignLObj.getRowNo(GlobalDistObj);3 A3 r Q, p& o* m
if Row = -1 then -- since 705 U/ ~9 e4 P8 ~ h' N& U4 s0 M
if lan=1 then! I2 `: F! y5 d8 d! r. y7 O0 Y4 e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 c/ R: R, t9 G$ q: ~6 p' ~1 ~7 w/ O$ y
to_str("in der Andockstation: \"",?.~.name,"\""));
. L, {- C5 n! K7 u* }0 p: F7 ]# N else
0 `" _. T# \, T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# D3 S) f+ Q6 h to_str("in docking station: \"",?.~.name,"\"")); $ a$ C) Y1 I5 g9 }
end; Y- w- R) [1 O2 j3 `
else
% A, I; b: N7 V; \ @.Destination := assignLObj[1,row];
) L% B. ]/ J3 s' q3 b end;
# P4 v) y0 D: T4 a- P. T newDirection(@);
' l5 ^$ W% W8 a; d. e @.HasOrder := true;) v' h4 u3 W$ q; y" O& @
end;
. K6 N7 C* D; }0 W# t end;! l6 j, N) z: f- R' q
end; -- of the method
, C4 I2 f% O; Z& y+ p |