/* called by: entrance ctrl of the object 'track'
4 d" ?0 Z* W; l# p8 n5 p*/, o/ K, s- g* n( {' d
is
! L) }3 f. `% m6 ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;& @$ k4 U+ w3 }9 B6 b
do+ b. {4 n- J! P* [$ Y
Lan := rootfolder.Internal.Tools.AOLlanguage;
) P' D( D6 F2 X6 l# s9 ?; A3 }& I if current = @.Destination -- else return
F% U) f- X5 d2 P- ] then3 y! s3 T4 F; X# D/ B% z
@.Destination := void;/ { ?* w; U: Y" Q) E
if @.occupied then
0 X) y$ A8 `9 e part := @.cont;5 B$ k$ K9 q) p9 x# a# r
@.transpOrder := void;
9 r# u$ L u* L% _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 n, ~0 Z, |7 i& A1 i& N
@,root.eventcontroller.simTime);- k4 Z" r% W- T% I/ b
@.HasOrder := false;; O3 S" n5 b) B" x( M0 `$ [
@.DrivingHome := true;. V7 {( @7 a( z$ H
rgManager.tryToStartTransOrder; i: A# n( b* q( c: c
if @.Destination = void P: g: r" F1 Q/ }" P* m
then -- no transport order for vehicle @( ^7 R* H3 j- k" F3 }$ U ~, m3 M0 x
@.Destination :=& n) W/ w! ~" D9 `2 I, x6 g( |
rgManager.nearestFreeStation(@,track.~);" A! v9 y6 ]! C. n) z
newDirection(@); ) ^" i7 U8 w" v+ D& h) |8 v
if @.Destination /= void then5 n1 r4 H, Q8 G5 o7 K2 |$ W2 P
@.Destination.NumReservation :=
* T8 X+ J3 O z, O1 W5 a ` @.Destination.NumReservation + 1;
; n4 s. `$ y. P% j6 z: f5 g* R3 Z end; N6 C9 m) c, k* v G# l, C: A# B
@.CurrIcon := "drivingHome";: H1 ]& Y. Q- q0 i# D$ S
@.DrivingHome := true;
" N% m5 {% Z2 W9 b0 D end;2 M7 s+ c) e' ?( [& C/ U3 |6 M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( K' d# {$ i) H% }" v( }
part := @.transpOrder;. f' Z3 @- t, [6 f \& N$ F! m
part.move(@);-- load part
- J, J2 q4 A1 _. _( s& f# X @.CurrIcon := "load";: e. m) z; c& `. M" p" h% J
GlobalDistObj := part.globDestination;
$ p& i) E. t" o0 L% s assignLObj := rgmanager.rgAssignL;% t/ z0 U3 A8 d$ F/ U* B
row := assignLObj.getRowNo(GlobalDistObj);. R8 M8 x x/ D/ T+ c0 v) k
if Row = -1 then -- since 70
" Z/ S% }( U+ u5 p- X if lan=1 then
6 w/ a9 @ O# @2 f# f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; L1 c9 X9 T5 G: G0 A4 f
to_str("in der Andockstation: \"",?.~.name,"\""));
' A5 A9 {) d; C( P- P( M, D else& u; g) c% S, [3 l% I: ?, s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, l( b' N, u5 A9 d
to_str("in docking station: \"",?.~.name,"\""));
* K1 B( L! j( s, m+ X, Q end;9 b- v! D' z: B: `" T& d1 z
else
7 ~3 ]* y9 r/ R) f' _# V. H% ` @.Destination := assignLObj[1,row];
0 f# {- l' T* Q7 H" } end; % y0 N s& J9 r! T2 E+ P8 x0 j9 |
newDirection(@);
& _* `. |. I' K9 W8 n; S @.HasOrder := true;
, f% H, f: \' Q: A9 z- m- j end;- \0 t: W2 g& t7 W% I
end;2 L8 Q2 A$ y# o8 f1 Y
end; -- of the method
9 z6 t8 S$ ]; ~2 \+ q8 E9 v, }, L6 q |