/* called by: entrance ctrl of the object 'track'2 W) N% t& `. S8 Y& i! c7 n
*/" n# \$ b, n- h5 b; @ M* b
is
- E; B! K5 q7 g# T, z$ Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ F' o9 G! u3 r# D: c; U; x0 S; ldo
8 {, \, a/ T+ v7 l4 _ Lan := rootfolder.Internal.Tools.AOLlanguage;
/ [ L; b9 }" C1 o8 e, ^ if current = @.Destination -- else return
9 I+ @" H* q$ {: W( v$ | then. `/ q( S5 J2 N" R& v4 |
@.Destination := void;
* t' X d+ `, U% W/ J* z' C if @.occupied then# c. i! _$ e/ f
part := @.cont;% @5 [2 A* \) o
@.transpOrder := void;
R4 z/ v( O+ j+ H4 V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
L. M& A, c% ^ `6 K, U6 l5 U! a @,root.eventcontroller.simTime);+ Q5 j5 {* g @
@.HasOrder := false;# A) f- I4 m3 V
@.DrivingHome := true;* Y# x* S8 d3 A. |9 c) q
rgManager.tryToStartTransOrder;2 a- o2 M* S) {; U9 [9 g
if @.Destination = void9 ]! a. B" P4 p& j
then -- no transport order for vehicle @
4 o" j% k" F: w" d1 T @.Destination :=
4 b9 o3 S; R Q C rgManager.nearestFreeStation(@,track.~);3 P7 e M# U0 f$ l6 K
newDirection(@);
^" y* q# g; a0 ]5 C% O if @.Destination /= void then
6 O. J: V, U: I7 T! {9 ]: b) r @.Destination.NumReservation :=
. b6 k( E' h9 @: O3 R @.Destination.NumReservation + 1;5 Y* Z, D! b$ a
end;8 M- }, l7 }, K
@.CurrIcon := "drivingHome";9 x9 z8 j. {, g* \
@.DrivingHome := true;: K+ S# K. F7 P- i- R
end;
( k! ?/ C+ m$ Y# U) U7 @ n( g else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% R; ~0 {. W; p% C, P; \( }* S part := @.transpOrder;$ c& k. L- f% P
part.move(@);-- load part9 t2 c5 \, U6 J, D! T
@.CurrIcon := "load";6 m @- h* I' q
GlobalDistObj := part.globDestination;
$ S% X8 G- `+ I5 B2 j+ a assignLObj := rgmanager.rgAssignL;; ]; r( j* s/ \" x- x8 n. K
row := assignLObj.getRowNo(GlobalDistObj);1 z4 K! _, ~# {: x3 E
if Row = -1 then -- since 70
! [0 I. u, F0 u if lan=1 then4 v" r5 G+ m! f4 V) q7 o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), P- G- Z+ ~+ ~
to_str("in der Andockstation: \"",?.~.name,"\""));5 t; t+ ~9 |" o2 @
else
1 g2 x$ `6 h& e. T4 y2 Z( A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 L. h) j5 E+ v3 L# Z1 @
to_str("in docking station: \"",?.~.name,"\""));
0 C$ k' \' |6 I! B- S: ~ end;
1 L& m( I" K: A! H/ S* }- r5 c else4 q6 u2 {4 F T m' P6 z# C$ [+ N" ^2 r- h
@.Destination := assignLObj[1,row];, W& j- E/ }+ a
end; 5 H8 ^: `9 A: [
newDirection(@);# e% H6 Z# \! o2 n- T# Y
@.HasOrder := true;
$ n' s! D9 i1 E) f+ i5 H& z end;
6 }5 u; ]1 P- @. o8 D end;( X( U) G8 p* K$ f0 b- d
end; -- of the method
7 [/ Q: O( t% b+ y; u |