/* called by: entrance ctrl of the object 'track'
8 d5 g: c+ J0 V* K6 K* U6 ^" @. G*/
3 g- g' ~' D( H4 l9 Iis7 P$ A" Z8 L. N$ b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 e2 P! j- o1 J% t% b! {7 T& Ado
: d# l# {; X7 W5 L2 ^ Lan := rootfolder.Internal.Tools.AOLlanguage;
; L* g1 F4 Z% K* K if current = @.Destination -- else return
1 p7 M$ q8 O: j* F then7 [' r) T7 I0 [: U) B) O
@.Destination := void;+ E2 Q8 A p: F+ Z+ q/ c
if @.occupied then
2 n1 {4 S) a* i A$ @! T part := @.cont;: _' ^" b7 L; q- e3 g: y
@.transpOrder := void;, S. ^1 a& o/ z: t5 B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- P8 ]8 n/ E$ @; n. w" t% y; z @,root.eventcontroller.simTime);
5 `3 c+ h/ K. p7 @ @.HasOrder := false;
3 U) C- E8 \) J0 f2 t @.DrivingHome := true;
4 ^- h3 i+ C* S& v rgManager.tryToStartTransOrder;$ x; l; Q C4 w
if @.Destination = void; E* U' F( \) T( j2 M. R T
then -- no transport order for vehicle @
% c, R2 P! D3 U* t: L @.Destination :=9 j5 b' O# S" ~5 u' z6 I J& S# K) q
rgManager.nearestFreeStation(@,track.~);3 g) H7 y$ m! ]
newDirection(@);
- W9 X- |: C. ~ if @.Destination /= void then0 D% t! f( e9 ?# ?' f3 |! b$ ?
@.Destination.NumReservation :=. [+ _# Q# `9 H& ?" n
@.Destination.NumReservation + 1;
3 a. ]9 V2 K& g end;* I2 |+ S; B \% P8 @+ [
@.CurrIcon := "drivingHome"; m0 r2 u7 _( e4 |; X# `" }( o
@.DrivingHome := true;
" [5 x) C8 w. H8 i end;: v$ H$ q0 X ?9 `+ a3 a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ N. I/ |' i5 F; T; P9 n: x; n
part := @.transpOrder;" T @' u! s) g# p
part.move(@);-- load part
1 t. x: Q2 y2 l @.CurrIcon := "load";: p! C' b' C1 T3 Q
GlobalDistObj := part.globDestination;) j. P/ e3 f5 @" u5 _* x
assignLObj := rgmanager.rgAssignL;
W/ _& k" }( U" U row := assignLObj.getRowNo(GlobalDistObj);6 f$ f' {7 I$ Z) k
if Row = -1 then -- since 70
0 J/ K- t$ P; {& m V( o( r2 W if lan=1 then
* p( r6 x. G, O0 y$ Q& D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 L0 j3 w/ A1 R to_str("in der Andockstation: \"",?.~.name,"\""));
5 _5 J, P, p4 j7 E- C else% r! L5 G. a$ S% V! S, _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 O0 H7 U4 i7 [9 {0 m to_str("in docking station: \"",?.~.name,"\"")); ; o c7 r5 s5 e& v
end;
k; `1 a7 Y5 c2 ` else9 S' l* V o5 p( d9 _! q
@.Destination := assignLObj[1,row];
; c6 o4 E; N$ \" _! R, Z* q2 c$ L end; ) C O5 ^7 _8 ^: B2 R8 M# u
newDirection(@);
7 o) ?5 O" h5 M0 W# s( l' ]) s& D @.HasOrder := true;* O6 V7 `, r/ V) B0 w, ?
end;
3 @9 P" l: c7 ~2 L; ] end;
6 I" l! F( R/ Fend; -- of the method
; S! ~! k9 g0 h. j" t1 ^3 ~ |