/* called by: entrance ctrl of the object 'track'4 R0 Q$ z3 O) d6 r- J
*/2 |* F0 i# Q' Y( _: [0 K
is
9 M2 Q- w; P/ V3 U4 I! @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 |" l7 }% t+ j
do$ e& m4 h: c' }' A3 G& Y2 J
Lan := rootfolder.Internal.Tools.AOLlanguage; C6 W# C/ X; ?( k g5 f! u! m
if current = @.Destination -- else return
; I& |. o+ L' V3 n, D9 n then
* ~3 _) R$ H9 J( Z) V @.Destination := void;
2 L- n: Q; Z9 o; g9 m' D5 l if @.occupied then7 D8 j( \2 j) d. j) }' b
part := @.cont;
( D# y' R& w& P& H! O @.transpOrder := void;
- z; k- f/ a5 @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 ~, h8 ?% v9 [4 O$ U6 K2 P7 p @,root.eventcontroller.simTime);# \- e& o! X2 `5 b8 ]" {
@.HasOrder := false;: P; v1 a; p( s l, |! k
@.DrivingHome := true; I* e* Z, b; V" O& y5 Q, i3 ]$ b
rgManager.tryToStartTransOrder;6 `: I, ` F2 _7 l' J: ]: d# r0 w2 n1 O5 f
if @.Destination = void
$ }8 n, E5 v" D. o9 J then -- no transport order for vehicle @4 W8 d) \0 v( _: p
@.Destination :=6 K: s4 J/ f! G3 z
rgManager.nearestFreeStation(@,track.~);
% N- ]5 {: Q8 n9 P newDirection(@);
, a0 y1 g% B2 F& d if @.Destination /= void then( r8 q: {9 ~% o5 l
@.Destination.NumReservation :=+ r0 D" g9 B+ X, ~: f( }0 s+ |" P
@.Destination.NumReservation + 1;
* J; W- i/ M( g5 X# \' \ end;6 P* e. L$ M; @3 j2 Q
@.CurrIcon := "drivingHome";
7 \( ?1 j- e! x/ | @.DrivingHome := true;
( t$ n: e# _: p" p9 C end;5 i& ]7 |8 v+ n0 O- n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 G. f% n3 Z7 f1 S% R part := @.transpOrder;
9 W# g9 g. |. t) ?! X" O part.move(@);-- load part
4 I( H2 }5 J# [9 h @.CurrIcon := "load";
8 g$ {! D6 l& D) B3 O) ~, Q9 ~ GlobalDistObj := part.globDestination;
6 Z" Z0 r0 j7 B assignLObj := rgmanager.rgAssignL;0 s: J: w0 V$ y
row := assignLObj.getRowNo(GlobalDistObj);
* \) Z0 a, g3 p b2 ]) F if Row = -1 then -- since 70( L# e& h7 M v/ N- D
if lan=1 then/ d. d3 g0 U, d) [8 w4 C7 i4 H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! ?% _0 k: Z. M' {% v to_str("in der Andockstation: \"",?.~.name,"\""));
: z4 E6 Q8 c, E6 z; h: |4 F! r else$ C. e, l' f# Z# H( x0 _3 ^" s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 v% ?3 d7 s9 O3 ~
to_str("in docking station: \"",?.~.name,"\""));
) a4 f6 f# c% [2 F! b! S; q7 F end;. C+ V9 I+ f' {* x- b
else9 |) R$ X4 f m5 q4 f0 ?
@.Destination := assignLObj[1,row];- w2 [. {9 S A- y, i9 k" _
end; : c% f1 `4 b& u1 r% P8 {
newDirection(@);9 m5 p2 E+ y: t' f* B% J0 d, P$ f
@.HasOrder := true;
7 u5 E, y# v, A% t/ Q. k ?% P end;! O1 p' ?$ }* x8 E8 H6 p6 a+ i
end;7 B, X; ~# ^7 q/ b/ `6 r% p
end; -- of the method
0 P) L" r4 V$ v# t: Z% p0 G |