/* called by: entrance ctrl of the object 'track'
/ ]5 H% S1 E* w7 Q*/
! f+ i8 z. s5 o R7 u" ?is H6 u/ i' u; E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* i+ M$ Y6 P- ?6 G8 V' }
do
$ D6 C( b8 Y! r e" \ Lan := rootfolder.Internal.Tools.AOLlanguage;
) j' @4 D4 `$ e% R if current = @.Destination -- else return% `* f5 A, B! E6 V0 v# ?
then
8 S1 |" n- `3 C5 b/ T1 i( _ @.Destination := void;
' \7 g; ]0 e" }2 c0 j. [ if @.occupied then
, P( r. |. H6 a5 [; O3 _0 C! M part := @.cont;
; ?1 s6 ?, R3 Z) H( _. y @.transpOrder := void;
O8 n) N, l! A6 r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% {) d, H. D! y5 u' h K @,root.eventcontroller.simTime);
# e2 u7 }/ W" G# N( Y @.HasOrder := false;4 m! A4 Q, z6 j# ~1 C
@.DrivingHome := true;0 U7 H: ]; |( w( V
rgManager.tryToStartTransOrder;; h5 X7 b: B! S. h- l
if @.Destination = void3 t$ @" ^$ \* f/ k! p: x. H
then -- no transport order for vehicle @5 m4 a6 F p; J. n- j' W+ f, ]
@.Destination :=# h2 |: ?) X! v' V: T, Q
rgManager.nearestFreeStation(@,track.~);% O" l. r8 o. b: e' K
newDirection(@); l6 t6 A4 w" _5 h- g
if @.Destination /= void then& A1 k% k( z4 B
@.Destination.NumReservation :=
& y: R- a. W5 `8 q4 c3 l$ a6 i @.Destination.NumReservation + 1; g4 a1 B8 g" l( `9 \
end;% ]. J& I# x4 p) ]
@.CurrIcon := "drivingHome";
2 @) S2 x! l' V% J$ g6 Y* n @.DrivingHome := true;
, a% G& F1 a! [ `# q3 S& s end;
- }3 V4 }. J9 B r( ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station& k! k9 O2 V2 D" O7 T
part := @.transpOrder;) z S0 N2 Y# ?" H3 H6 ^
part.move(@);-- load part c3 L9 l! v) g, s
@.CurrIcon := "load";& @ s* h$ p: Y7 V+ n8 K) W) K( b9 N) A
GlobalDistObj := part.globDestination;# u( j7 w5 T* S) k6 F
assignLObj := rgmanager.rgAssignL;
9 \7 M7 S$ K: X' _3 I4 e" i4 |9 H9 E row := assignLObj.getRowNo(GlobalDistObj);( _8 S6 J) Y" A, [) t9 U
if Row = -1 then -- since 70
& H- L4 ` M) }3 W, g& s, ^ if lan=1 then6 ~' {0 o; Z$ a% t+ ^) _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 C: u9 [* }5 z# Y
to_str("in der Andockstation: \"",?.~.name,"\""));! B" d- }* w7 _
else
9 k0 N. a3 i' A6 z) g3 { t1 f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' O5 w8 t7 L0 J& A
to_str("in docking station: \"",?.~.name,"\""));
1 Z7 P# _/ j7 z- s end;, }: n/ ]- Q0 M" A
else$ Z# w+ C" g- P2 k
@.Destination := assignLObj[1,row];
+ [# x- F6 W# d6 D end;
# \ o" ]+ w$ E$ Z3 z7 f7 `7 ~: B newDirection(@);
7 {+ k! u( X1 R @.HasOrder := true;) d$ y- ?5 x# [( x
end;7 y; {: K6 n% A9 D, [9 n
end;
) ?& b" X* N, u0 @end; -- of the method
" n/ x9 }. `7 K* q- D+ q# S |