/* called by: entrance ctrl of the object 'track'
' z" J3 `' q2 y*/
7 ]0 _3 [' j+ sis, {; \$ b3 x/ u6 s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 Y% `/ N5 q# N' y' ` ^do: x( Y0 Q# \) I& H/ Q2 ?; U
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ q) Y" _: ~! d# H! D7 g if current = @.Destination -- else return* \7 D( }2 E# C
then
C5 w3 n6 o8 f' @; ~9 q9 @6 l/ n @.Destination := void;
* Z2 }1 v/ u( T if @.occupied then
8 Z2 Z( G/ K3 \% u3 C: H part := @.cont;0 [% m4 I! N h( C& n1 I
@.transpOrder := void;, s* [* ?% p- P1 w2 D( D3 D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ d+ E, B( K( R7 `
@,root.eventcontroller.simTime);
* n; `; z! e& x @.HasOrder := false;! M; A' x' e) Y* o W7 k; m
@.DrivingHome := true;% P* j4 [. e5 ^- b' x
rgManager.tryToStartTransOrder;
+ e0 w% o* R0 \' W if @.Destination = void0 O3 X: e# _1 F4 T, m8 Z8 H
then -- no transport order for vehicle @. k1 z- w; T X0 J& o0 _) X3 B# E
@.Destination :=; c3 [7 m( E. ?0 k) E( X+ C
rgManager.nearestFreeStation(@,track.~);
4 `+ P' {3 e x1 w7 z2 m newDirection(@); + L3 v. U& {+ l1 Z
if @.Destination /= void then
+ f: [6 `8 F3 s" T4 z @.Destination.NumReservation :=! s6 P6 F7 {1 |0 s
@.Destination.NumReservation + 1;$ q6 O3 {9 l/ P E
end;
& w$ G g% R L: d6 E4 y# ^7 h @.CurrIcon := "drivingHome";
6 ]% t) X6 I/ Y: u @.DrivingHome := true;- L0 M, q* C+ ^! T1 B! H* q6 Q
end;
8 A0 u# ~( `- {+ v6 D- A( { else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 o0 z8 s ^. @) o2 k part := @.transpOrder;
: w5 r% s3 Q% L( z1 c, B part.move(@);-- load part+ q( l R$ x- @" `: \0 }
@.CurrIcon := "load";
( Z7 q! o8 {' P GlobalDistObj := part.globDestination;
3 o {: K- ^. e; T9 q8 D assignLObj := rgmanager.rgAssignL;1 `6 j0 q' W" x1 M2 D6 Q% E& R# u
row := assignLObj.getRowNo(GlobalDistObj);% w, }" s# q- S, u; L3 n0 |. h
if Row = -1 then -- since 70
% p9 J' T/ l$ c6 A if lan=1 then7 L, g7 M/ g& r9 T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 U7 o4 ^( |" y9 R2 x3 y) l
to_str("in der Andockstation: \"",?.~.name,"\""));8 ^, j8 Y8 H- [! Y) g! m$ ]0 `
else5 H A. F! m9 R' e* A$ L' R+ P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) ?$ D& a8 R5 D, ~9 S( |/ u
to_str("in docking station: \"",?.~.name,"\"")); 2 Y5 I% W# [7 P: y* j
end;1 P9 S& h2 z" U* \# Z% U) q
else
" ?6 w3 a. j: B0 R6 W @.Destination := assignLObj[1,row];% }( Y% N, ~0 l" c
end;
7 K' ~) u) S' s$ e newDirection(@);: P' |/ a, V/ z/ v! a' V& X1 T
@.HasOrder := true;
% X+ B& v7 d& F1 J. F( s8 I end;/ q" q3 T) s' o- K9 ]2 R5 k' U1 c
end;
' I4 i& I; j4 e- p1 wend; -- of the method
- J6 i4 Z. D6 g1 K; a7 ^ |