/* called by: entrance ctrl of the object 'track'& i- I. } S6 j9 C! g6 m h% J( r, U4 x
*/5 O7 I- S" R/ Q* F' p
is) z! H2 k; p3 c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) @! z5 b) a' J' B# d
do
- ^! J3 o0 t4 w" Z0 G Lan := rootfolder.Internal.Tools.AOLlanguage; ]# X* T2 ]+ l2 r
if current = @.Destination -- else return
. o" K& Y N; [) z4 k& i9 n then/ [8 ~# C {& r+ {2 k
@.Destination := void;, e9 Q; [9 I' N; B9 ?
if @.occupied then
) d7 H% y1 ]1 f8 h8 n+ B; X part := @.cont;
0 [# \ n( t; p: U @.transpOrder := void;0 ~0 v7 l- k6 u/ k- C& d7 H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ ]) w3 [3 S' c: M
@,root.eventcontroller.simTime); q; q. H% u( |7 K, v* k! i
@.HasOrder := false;
* N8 g( Q h% d+ z1 w8 ~7 C @.DrivingHome := true;' I. F1 x1 ]% F( n
rgManager.tryToStartTransOrder;1 H2 _# j/ X% K
if @.Destination = void& i' A3 P" f! N5 v+ H+ P" a
then -- no transport order for vehicle @
$ [! ~5 u$ N. V @.Destination :=
7 m$ |1 D) W9 E0 n$ t5 p rgManager.nearestFreeStation(@,track.~);* ^8 i3 h; g4 b
newDirection(@); ( P, {( v i/ F' I& F
if @.Destination /= void then V- G$ z' N+ f+ K* Y
@.Destination.NumReservation :=
) `5 D, x! C% O! |+ _5 Q @.Destination.NumReservation + 1;: p' C: d4 A# I
end;* I3 T* _- @( l+ m6 t) ^4 f
@.CurrIcon := "drivingHome";
, U3 V! K! f( I0 d) Q @.DrivingHome := true;1 P O, U$ ?/ M3 ~9 K
end;! N* T0 p# \" E$ p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 {4 A F- o! N. u& A
part := @.transpOrder;
2 c% H% r: F) u+ `& F part.move(@);-- load part
1 h$ C' T6 r9 l1 O. S! S @.CurrIcon := "load";
" P$ H$ C0 e# n GlobalDistObj := part.globDestination;: l! q8 w) u( {8 |% q1 m( h; I- b) v
assignLObj := rgmanager.rgAssignL;
: w' n) y/ C- ? row := assignLObj.getRowNo(GlobalDistObj);6 A2 K2 T' K% G5 i t
if Row = -1 then -- since 70) T5 w4 \$ U% Y2 Y, ?' S* ?8 l
if lan=1 then
`; V7 i! Q/ a4 @; Y. ^7 A5 R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 x7 ~& J) N, G& U6 v" h* B( U% x2 p
to_str("in der Andockstation: \"",?.~.name,"\""));6 g, Y2 \. \2 M( R: V2 p7 B2 s
else7 b0 {! `( S- i0 x+ {' [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 N& x' Y$ m( M0 M( |, ^* A to_str("in docking station: \"",?.~.name,"\"")); ( b0 _) z5 v# \$ U$ g5 w! k# p/ [ G
end;- q _- `0 F, Z% J/ ]3 Y8 I
else6 I- }1 f# a. F. @1 @4 K
@.Destination := assignLObj[1,row];
3 h: e, z4 c, O8 T6 o3 z end; . D& V( D# W7 ~) Z5 R/ T
newDirection(@);
$ A0 c( T7 O' T' e5 Q) e' Z @.HasOrder := true;& |# U7 l2 Q" ]. p& y: X* }
end;+ }: p0 D) } a& S1 I5 l
end;
' ~6 d4 w- O7 Z* y! m2 ]end; -- of the method
* k9 @' g! q3 R) P |