/* called by: entrance ctrl of the object 'track'
- V. K8 [% a; t7 t; ?7 o*/# G% t% m N6 ^* B) [2 e z
is# m& |9 T p/ `/ ^2 U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ O# d% k! c2 v4 }+ r+ F/ Y
do0 c( S7 P, R, _; d8 o: a, b
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 L( B/ z* K* b4 P- S. o if current = @.Destination -- else return0 D( c) |. e/ I" b. ^
then$ w" ^! y& r9 K7 c$ I) W3 `
@.Destination := void;
( Z. ~( _: [0 i8 k if @.occupied then
( a) m4 z5 L" X. F5 T9 V part := @.cont;$ J5 X: ?3 K, ~0 h/ P( Q/ n
@.transpOrder := void;
4 R3 F6 Z: X* o' C9 f( V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 J S* R& w; p% t H1 M( x- _6 g @,root.eventcontroller.simTime);' V6 v( E8 G u; [8 u
@.HasOrder := false;% [, a6 \6 z' |/ Z8 U
@.DrivingHome := true;1 K8 `8 a1 g' t, a
rgManager.tryToStartTransOrder;
4 G3 o) L/ U( Q4 G7 } if @.Destination = void
! n) x' m: Y) Z# @4 t2 d/ j% L# F then -- no transport order for vehicle @5 y3 s: K6 y/ q1 r6 o) h- u4 s. |: V
@.Destination :=
1 e$ @2 A- ^" T% e8 V. s rgManager.nearestFreeStation(@,track.~);, t( `( Y n8 a
newDirection(@);
; |$ Q' G1 [' b9 o% c if @.Destination /= void then- J& j' W* w0 g1 e9 m" Y) _: O! g( }
@.Destination.NumReservation :=) q2 |5 r* T* d/ e3 u" H
@.Destination.NumReservation + 1;
5 e8 j0 v$ U ]' z, C$ q8 J3 G end;# D) |* d: d/ B5 ^
@.CurrIcon := "drivingHome";8 x3 b% [& F) x+ J4 t) g
@.DrivingHome := true;2 p) v- {2 t( D7 C( t
end;
3 W2 n6 b; a+ y8 g5 P4 ^8 ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; K4 M* f* o8 Q0 [. J part := @.transpOrder;* H; Z" B( A" q L( b
part.move(@);-- load part* X7 L* t2 V. H: r5 h% C) ?
@.CurrIcon := "load";9 x' P% i1 o" @
GlobalDistObj := part.globDestination;, M# D" H; u( B; k
assignLObj := rgmanager.rgAssignL;
- l# L4 I- z4 R; ]3 `# o$ r row := assignLObj.getRowNo(GlobalDistObj);- \8 W* A" ^* W/ N+ X. W$ n
if Row = -1 then -- since 70
/ ~8 k+ a5 u3 \ if lan=1 then
, w5 O6 j' ^6 a1 ]# Q, O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ }+ ~) d) Y( a/ X% V! f' ~3 N d
to_str("in der Andockstation: \"",?.~.name,"\""));
8 f @% z7 R7 l else
- f" [. w" C; w" r; C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), v4 F3 ~, e; g2 q+ \" o0 L0 X
to_str("in docking station: \"",?.~.name,"\""));
: F, q- i6 _7 p2 i6 `8 J6 T/ _7 D end;/ R Y$ q- I& k$ m) D7 C. s
else8 w/ X: c! ?/ ? O ]- N/ v: S
@.Destination := assignLObj[1,row];
3 T+ e9 g8 b% }0 h8 _ end;
8 V9 p4 W) P1 w newDirection(@);
! h5 z/ H* N1 a2 G3 R7 s( P @.HasOrder := true; D% W8 K; @9 w6 Y
end; B7 T. r+ z5 N8 q0 y
end;
4 _( _# ?/ C/ \% e0 Qend; -- of the method
( M$ ?. \! |, r: Y' w- s4 J |