/* called by: entrance ctrl of the object 'track'
, R6 e) M. Q& P1 l! f) h*/
4 u* t4 q9 d2 Q# ]0 W& r) Ois
+ R8 J {/ ^ w4 Q1 i% m' s5 t: ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 B5 x4 W$ s0 u edo5 ^& Z& Z# O$ ?' B1 [9 X# K" H1 q
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ h: _" j0 W( A& m if current = @.Destination -- else return
7 q N0 H. ^9 k- L5 i, D then
# G* O% J) V( B: b @.Destination := void;. U# P3 _4 F& O4 d! q! W' I" b
if @.occupied then6 b0 h3 B* T# ?+ v
part := @.cont;; j; t/ a7 E8 D% I. i5 f* l7 A* g
@.transpOrder := void;
% A. R3 n3 ?2 {$ P" i2 L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( f1 B! h8 E8 v v1 Q, V9 N% X k
@,root.eventcontroller.simTime);4 R7 X& a: x2 {9 K/ K
@.HasOrder := false;
. c/ }3 C1 G% N9 O- Q. a @.DrivingHome := true;
z% u% P& T. ^ rgManager.tryToStartTransOrder;( ?' e( h2 Z" ?, V8 r
if @.Destination = void
3 a w+ W5 }: b- w- l then -- no transport order for vehicle @
3 B7 t( c( |; c. G5 r( k @.Destination :=
+ O3 A4 H7 Y) c) s) a rgManager.nearestFreeStation(@,track.~);2 p& n) p% X' |$ Y- W
newDirection(@); , w( T" d3 k% W. S+ z
if @.Destination /= void then: B5 @$ p& i9 N9 n8 X" Q
@.Destination.NumReservation :=
6 s5 ^& t3 `# l9 _! [ L0 U @.Destination.NumReservation + 1;: E7 g! W/ N; ^) W4 Y- \8 E3 r
end;
5 l+ i! s/ [$ o @.CurrIcon := "drivingHome";% w5 H2 ~% k6 G) _% N) Y6 ^9 b: o; e
@.DrivingHome := true;
g$ f3 O. W- ] end;: q9 a. o! y! h( a( ^+ P. j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: N0 W) _ E: \- ? part := @.transpOrder;! s& ?. R; e- {" a3 J! \ H- q
part.move(@);-- load part$ e# P; a$ m2 o! m- N/ m
@.CurrIcon := "load";, S* G1 O; j8 k$ H. L
GlobalDistObj := part.globDestination;
$ e, F3 j1 z4 V7 \6 I assignLObj := rgmanager.rgAssignL;
# [0 u' f# z+ s row := assignLObj.getRowNo(GlobalDistObj);
/ I" n1 r" t( }9 ~! a0 {/ \ if Row = -1 then -- since 70& t: l5 M0 f# D- f& j- t
if lan=1 then7 R9 e. R7 C2 n8 r% q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 Y& y4 {- ?+ K4 [8 K9 L$ o* O* j to_str("in der Andockstation: \"",?.~.name,"\""));
; x. V2 u, O& k2 R6 l+ D P& X else; x- U' n% ~0 O9 H4 j# k k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& ? v; U6 G4 {1 X0 r0 K
to_str("in docking station: \"",?.~.name,"\"")); : }6 x, ]% X' v
end;1 {* M; t2 r0 J* A
else" h. ] `, _% ?8 g+ A9 M. |% P
@.Destination := assignLObj[1,row];
! g7 _- x" F3 H8 z' \! P1 u end;
8 m/ S3 Y/ ^$ W, z newDirection(@);
; G) k3 y! Q3 h$ E$ C8 a5 [ @.HasOrder := true;
' f U/ j5 }% t* C" F* t end;
( _% ^) h8 n% |# c: M end;5 y- _" b' D0 O; S; e
end; -- of the method ?. p# p. q0 K! \% Z) X
|