/* called by: entrance ctrl of the object 'track'
) Y$ E C3 Z% l A4 X7 x*/
C! o5 S Y. j# W Q1 \is, |) |( W9 H) g2 o8 v) M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: R2 p# t7 ?2 Ydo8 X9 j( E! ?9 O2 t, k9 e) l/ _; n
Lan := rootfolder.Internal.Tools.AOLlanguage;0 E& ~7 Q" n1 ~- O, a
if current = @.Destination -- else return" e; {' O; h: c" x0 n
then; R) }7 r: L6 |, _/ X9 x( A
@.Destination := void;4 K9 K5 h/ n; q$ F
if @.occupied then
; Z2 o8 ]- l- d. l4 z part := @.cont;6 y' O1 S# E5 ~9 t9 _/ o$ ~4 V
@.transpOrder := void;7 T* x# Y" F, |5 |* A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ U& a3 i+ y- J7 k2 `" ^
@,root.eventcontroller.simTime);/ z) o& U6 [2 |- z
@.HasOrder := false;
. y8 m5 J' w V3 h1 h1 @, \8 B @.DrivingHome := true;
d- ?- U: [1 I. z4 _' q9 \+ G! Y; M rgManager.tryToStartTransOrder;
+ p7 l: _5 F& b$ T, H. V if @.Destination = void* f6 {/ ?1 s3 u; m5 V
then -- no transport order for vehicle @
4 i6 \7 N2 e, R' c: ^6 x' H @.Destination :=5 m, N2 q! P: J
rgManager.nearestFreeStation(@,track.~);
' I6 H- u P$ T5 U( S newDirection(@);
4 A" A5 T* B, P8 O/ L! P( e0 k, T if @.Destination /= void then
7 X9 m5 j/ Y& X @.Destination.NumReservation :=2 S5 O0 G& u( }0 J( S
@.Destination.NumReservation + 1;
3 p2 z! e! Z; B5 \# g end; x2 T. M1 ?: v0 U' E6 T0 T
@.CurrIcon := "drivingHome";' e5 N4 [& K' w8 S/ M
@.DrivingHome := true;* M* p/ Y6 {7 p9 c$ {9 |( U! h$ |& ]
end;
% Q: {- s" t8 `3 Z) a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 y- J9 c1 E* Z part := @.transpOrder;" L- k" C. [& |
part.move(@);-- load part! W) z+ B# s6 R* t# I4 {; F
@.CurrIcon := "load";, F f, Q) F. w- e, \2 L1 Q a
GlobalDistObj := part.globDestination;2 q9 h* ?) N4 e( x
assignLObj := rgmanager.rgAssignL;
* o7 f: i2 x$ _( T# G6 }+ Z row := assignLObj.getRowNo(GlobalDistObj);( [7 r5 Q/ F5 M: J- o2 d" @
if Row = -1 then -- since 70* G; v2 x0 _0 w& ?1 g
if lan=1 then
. b5 L4 d% x$ _! ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ S' [1 I/ X0 o, n8 @7 @6 k to_str("in der Andockstation: \"",?.~.name,"\""));
5 I# E3 k R! w- w7 d else
4 l# [' }0 t# n: H promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( W; t4 g j4 w5 S) d/ W, @
to_str("in docking station: \"",?.~.name,"\""));
8 j$ Q+ B( b: O* W6 i; ]9 j end;! u; f* [/ n1 I( m4 g7 Q/ A
else2 }/ H& P) J" W- I7 d
@.Destination := assignLObj[1,row];# }- Z% I: j4 W: M5 _% X
end; 8 l; V6 {9 l' D5 T; k: l
newDirection(@);
, u9 R# r% u/ g+ N! o5 v# F0 k e @.HasOrder := true; g @7 I) R' }
end;
; c8 Z i. Y& m; z! t& x end;* P8 ^ e1 Z, X7 Z
end; -- of the method
& A. p: @& g) B0 \' g' \ |