/* called by: entrance ctrl of the object 'track'
+ R8 A6 c- E" M- A*/% H, m. ^; p# p A/ E
is a0 P$ W% Z0 A' c: U* K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! ^' f# b1 o9 M; _6 s z* P' X$ L6 d
do
. V" y8 U6 W8 V! b. z Lan := rootfolder.Internal.Tools.AOLlanguage;
& T( K: e# [; d if current = @.Destination -- else return7 z( e6 {) k; T
then
- l& w% u8 v8 h9 H, J$ M @.Destination := void;
0 ]/ {% ~; M4 g6 q, v2 s, M' _ if @.occupied then
3 N3 O$ i3 t6 q' T' ]) ]: }* N+ S* z part := @.cont;, Z8 w: H0 e4 i3 c! W5 p# y: s
@.transpOrder := void; e" P( q+ Z4 ]$ Q1 _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. d% M8 x& s- }9 Y7 W% g P1 O @,root.eventcontroller.simTime);
' Z ]" L# ?. p) D% H# ^2 M, c- e. Q @.HasOrder := false;. b$ s- C; q* P" u. }' @ a
@.DrivingHome := true;
4 p# y2 k& V) H rgManager.tryToStartTransOrder;$ p* p) m- O7 ^
if @.Destination = void
' S' @: y$ f, F then -- no transport order for vehicle @
: ~- c& h) m0 u: V' I @.Destination :=
- H; `" ~6 m, [; t rgManager.nearestFreeStation(@,track.~);
7 }$ [8 N4 R4 A4 V4 V newDirection(@);
1 _' M6 l+ r% X2 Q& a, R7 G L9 T if @.Destination /= void then+ k1 F0 K g' t* N0 Z2 ]
@.Destination.NumReservation :=% K V2 ~% c1 ?3 u, T' b6 l! [, P
@.Destination.NumReservation + 1;
% i6 @1 N, B3 z/ ?5 Y. }6 l' ]5 G- q end;
% k4 H; Y$ [" O$ }7 a @.CurrIcon := "drivingHome";6 J8 ^2 g' F/ |% x) v* ]% L3 i
@.DrivingHome := true;3 I4 K: h" A9 g+ H8 \5 C
end;8 D) V$ z# s2 M: s% v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ r4 s G4 q# v part := @.transpOrder;
0 c+ _$ n: M( o part.move(@);-- load part
9 i/ q5 i1 M" ]( X2 ]. S: M @.CurrIcon := "load";8 w& w1 F* \/ e, q
GlobalDistObj := part.globDestination;& ^ s0 K; O! ?+ U) Z/ O3 ]
assignLObj := rgmanager.rgAssignL;
$ b( B: z& |' n( `7 B7 M row := assignLObj.getRowNo(GlobalDistObj);% }, E. y' z' V' X
if Row = -1 then -- since 70
0 k. q' q4 O7 ~, `; N4 o if lan=1 then9 W# Q$ [$ l/ }; K! {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. i- V8 F0 n* g4 \" R
to_str("in der Andockstation: \"",?.~.name,"\""));4 y% O1 D1 c- m3 |9 ^! ^
else
( m4 D# g Z n0 B V1 O, a+ b. d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 S: g7 j' g& F4 G/ g+ \) W* V
to_str("in docking station: \"",?.~.name,"\"")); 2 q8 U/ C$ P7 h% W
end;
% e. F) [' r3 W8 F. \ U3 ?8 E5 z else0 [3 B* t# p3 G/ z
@.Destination := assignLObj[1,row];
. r& |: L( N4 X4 a, V& O end; / m `' n% N! Y; G
newDirection(@);6 i9 C2 O K& I$ e! }% G; r" [
@.HasOrder := true;
: O7 L# p2 x0 \2 S, Q' `0 D end;0 p5 ]" G' |- U" ~$ g+ c% J0 n
end;
m+ |# E0 V, V) k. w! Xend; -- of the method
, G3 s" u3 }7 g$ v2 k |