/* called by: entrance ctrl of the object 'track'$ D" d* [4 O! n+ {$ B7 b* A# ^1 b% a( m D
*/
$ O7 c% d w0 Y% ais
/ [" ^5 v5 Q' D5 X part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 J/ A) j0 b1 W# r
do
. p6 f$ v7 r3 e& \ Lan := rootfolder.Internal.Tools.AOLlanguage;
% A% e- g Q+ m( ]$ ~# u' g1 o if current = @.Destination -- else return7 `* q. n! Q1 v* p+ z# f8 e
then# w- z; I; Y( G
@.Destination := void;
4 e5 \7 ~$ j" o& V9 b' b( H& l% ^ if @.occupied then
7 T* V3 O3 Z4 O* E& s part := @.cont;1 }7 S% P& O1 j1 U
@.transpOrder := void;
6 L$ O6 P0 @& b! X2 v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
H! H3 H8 z$ t! [; C } @,root.eventcontroller.simTime);0 T$ }! S' j* g' P
@.HasOrder := false;
3 ^9 U" G3 i: d" M) Y$ C" g$ ^ @.DrivingHome := true;
- b$ J% q4 q, A8 W8 [$ c, ~ rgManager.tryToStartTransOrder;( @; i5 T* D3 R0 h' s* z( [
if @.Destination = void* c3 \* r: b$ v5 c: U& \/ m# B
then -- no transport order for vehicle @
0 q8 T. C9 S) g1 ^ @.Destination :=' h6 g- r5 u7 m5 V+ q; W
rgManager.nearestFreeStation(@,track.~);1 x, y; } c7 g9 d
newDirection(@);
! u4 }) D" a& D9 b& p$ r6 \, e if @.Destination /= void then+ y: V& O7 q' j7 z$ ?5 H: V
@.Destination.NumReservation :=
8 `+ Z `4 F$ ^0 u/ U0 ~ @.Destination.NumReservation + 1;
6 ^3 x1 S/ J/ G7 Q. g+ k$ ?4 j end;
& u1 |" S O3 J, W3 P( k @.CurrIcon := "drivingHome";
1 d* l- I9 T% @" K @.DrivingHome := true;# P( N" d$ o/ g. a" }
end;: ~+ ^, k9 K2 d7 j2 ~, f( S' g5 m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
N, y V& Q" q/ x* Q$ e part := @.transpOrder;
p$ ~& A3 H4 P, i part.move(@);-- load part
. P4 E, r& w6 r5 ^/ E& H @.CurrIcon := "load";) K+ l) d# v4 a
GlobalDistObj := part.globDestination;
8 Q' J/ k4 A+ `9 a assignLObj := rgmanager.rgAssignL;
1 Q+ V8 \% {" y row := assignLObj.getRowNo(GlobalDistObj);
* v' B+ E1 P" p if Row = -1 then -- since 70
' L; x1 E9 D( w. L* @/ ~ if lan=1 then# e; s& a5 E% d! g& N( k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; z; h; O! q( O. L4 \! M4 b to_str("in der Andockstation: \"",?.~.name,"\""));
$ a, G8 [4 W7 J( ?' z0 W else
3 q+ l7 }$ _2 @; M$ W5 }; L" d6 P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 a% T9 V. x9 p8 ^) r
to_str("in docking station: \"",?.~.name,"\""));
% r7 ]! ~; L( j. i end;! k) o7 N, \3 f. {
else
' B4 x! j5 Y! D, D) v( R @.Destination := assignLObj[1,row];
q" j$ M' O: V! ~ end;
3 W: w: P3 K! {$ q1 W% M newDirection(@);" K A, L# B1 C8 t; y- B$ @
@.HasOrder := true;
( s/ ~: |6 y; ]$ [' Q2 v end;: A0 n6 O; ?4 F3 n. p# ]1 ]
end;3 l, f6 P7 z4 X1 Z* v o+ Y
end; -- of the method* z2 p- ~+ k r! N A
|