/* called by: entrance ctrl of the object 'track'
; R0 V- \2 c- X* R: E$ ~*/% |5 ]% S8 x' A0 {' y! i
is3 x, O+ R* A( P+ Y8 s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% c+ |: x8 [# Pdo9 b- @3 r* H8 O* B' D1 a- B
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 ]" j* s5 w0 \! N/ G( L if current = @.Destination -- else return
) N6 M2 u4 S! n then
+ L& x% m( x) s @.Destination := void;5 x# U4 o: G7 z- C( H* Q
if @.occupied then
3 N4 {4 z' C9 y/ ?, E part := @.cont;
: M( k( m1 y6 T3 n @.transpOrder := void;, q( N+ N' @4 g% U5 v# Y; z7 H& v+ n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ M! r m2 I/ d0 q8 m9 \2 R$ S @,root.eventcontroller.simTime);' h& u; l% @, R* g5 j
@.HasOrder := false;5 Z! e L+ [3 A7 k" w& l
@.DrivingHome := true;. y' h/ e6 w3 K2 B0 d5 v0 F
rgManager.tryToStartTransOrder;
" f8 \' H4 {8 d0 |6 V" d. A if @.Destination = void
3 F1 d# g$ ]4 v" _ _- B then -- no transport order for vehicle @
: y2 a9 B, k2 e @.Destination :=% b6 \* c' v1 R3 ?) S8 n
rgManager.nearestFreeStation(@,track.~);
/ U+ [. k6 @" h. S newDirection(@);
8 t3 U: T" f1 T- I1 { if @.Destination /= void then3 J' w1 R4 U' l) i5 y
@.Destination.NumReservation :=
, Q E, S: p H5 H& t @.Destination.NumReservation + 1;9 p7 _1 N% t1 ], Y
end;
: M( s; ]" U! r: H; N" r. x @.CurrIcon := "drivingHome";3 F) T5 \5 p. u& a% _+ c6 d, B
@.DrivingHome := true;
; o7 e* s. K) @! q" F, F1 r end;
" z5 Y7 o5 y# [9 a! U else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 c. M1 p B6 ?/ h$ a part := @.transpOrder;
3 I5 I) @- p9 B8 k$ ] s3 N part.move(@);-- load part
- d# }" s4 W. m8 O @.CurrIcon := "load";
L( w9 j! @# @' z GlobalDistObj := part.globDestination;; ^% U' n8 b+ f) j$ }2 s" F2 @* f
assignLObj := rgmanager.rgAssignL;
6 ]5 }: U8 Q& q$ W2 O' y row := assignLObj.getRowNo(GlobalDistObj);
9 e7 l4 i5 M% K" _' c* [& C if Row = -1 then -- since 70
4 V, D8 c$ l' j# \1 g if lan=1 then
8 o% E; ]* e% I, _! M% Z% s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) i; w6 r; m; O5 F2 O: T6 v4 t# q
to_str("in der Andockstation: \"",?.~.name,"\""));/ X9 E/ s% M# {! L' ^
else
5 ^' ]! H- h# G; W4 {! W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: M& e" q- w# q+ S9 G$ {- F to_str("in docking station: \"",?.~.name,"\"")); . g+ f3 O3 H' [. w
end;
+ b3 H v- @$ B8 K else1 z* M) W c# B* E2 w4 c" U
@.Destination := assignLObj[1,row];) R$ Q, W# ^8 G/ n4 e1 }
end; q$ s& N. a$ V! g- A5 f) F( K4 K. m
newDirection(@);
4 E7 i& H1 v/ G0 N/ N, Z- t @.HasOrder := true;
' t+ V: |" ^" I: w5 _ end;
! @5 r8 O! ?7 V7 y2 F5 J3 {9 k end;
. D/ t: t- @ s4 Cend; -- of the method
- L8 A5 A/ G9 v$ P8 t |