/* called by: entrance ctrl of the object 'track'
) Z7 M/ o, S$ o+ a, @3 f# z5 K( l*/+ d1 C6 p+ H& j& V* P
is
1 i# f4 w# R* J. E$ E% ] part, GlobalDistObj, assignLObj:object;row,Lan:integer; K6 p+ M- R6 ^9 T q+ p* n; l
do4 u6 M. X/ a7 u P) e) R( ~
Lan := rootfolder.Internal.Tools.AOLlanguage;
: h; [! s0 I, A if current = @.Destination -- else return
& [/ L% C$ _' V& j7 [% H: x then
+ b f; D6 G0 }/ f5 Q* ^, \6 ^ @.Destination := void;
) Q/ l/ T9 W! {( | if @.occupied then
3 i0 g+ ]/ L' L8 n; o" k part := @.cont;
& _2 s x: U% _! h$ h8 O @.transpOrder := void;& Z, V a6 F/ V* [7 ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: y) E& l: Q# o3 A! m: ?' A2 f
@,root.eventcontroller.simTime);: t% {: I* K$ w5 Q! ^
@.HasOrder := false;- ?* g* F+ Q y( X H5 c
@.DrivingHome := true;3 Z# [- J; s% _& C
rgManager.tryToStartTransOrder;9 f* {8 R7 g/ J% A( z, K' g7 B/ l- `& H
if @.Destination = void
+ a' K+ P: S- \. b& m* ^ then -- no transport order for vehicle @
9 l& t7 h$ f8 `& W/ s @.Destination :=8 F3 Y# C4 Y4 [
rgManager.nearestFreeStation(@,track.~);
6 y* i z3 g# _) x' h( L& M* i M( Y newDirection(@); 3 [) B9 t6 {& M, B
if @.Destination /= void then+ P+ \3 M3 \% I
@.Destination.NumReservation := q6 S4 }& z" L' n
@.Destination.NumReservation + 1; o' o7 R( }! g6 ?3 J
end;/ }, B: f/ V+ j1 `* i k4 j
@.CurrIcon := "drivingHome";3 c3 W7 P" R- X
@.DrivingHome := true;
7 ^: g' p5 Q1 n/ G4 ~0 H; @ end;
' c( p x1 E, i0 G; O else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 W3 U0 F, s: \ part := @.transpOrder;
1 t- b) o' d: s' [% m' K part.move(@);-- load part- z2 { u+ q% |
@.CurrIcon := "load";1 p; p. b. U( C! H0 k, ^6 S
GlobalDistObj := part.globDestination;) f, w5 G1 F$ |
assignLObj := rgmanager.rgAssignL;. \- E6 h& a/ t1 O
row := assignLObj.getRowNo(GlobalDistObj);
( F5 f' y& ~( Q+ C8 R if Row = -1 then -- since 70
; o; {8 u& h4 h7 g! Y" W( ~ if lan=1 then
. b" A9 n; c# O4 k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 p4 Y8 J9 i* h4 M
to_str("in der Andockstation: \"",?.~.name,"\""));- x6 K- O3 z! M4 n1 n* y- B0 X3 r
else
# Q( H. E8 P% A" p5 J! \ } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ E" _) T* T' p& f6 C to_str("in docking station: \"",?.~.name,"\"")); 9 {. ]6 d* ~+ y4 j2 U
end; M& y: ` G% q; Z. i2 M
else5 h i5 G, X8 d0 o# z
@.Destination := assignLObj[1,row];2 p- w5 j, f, c4 y
end;
6 X5 d( \" |4 B2 `/ V# |. V' K newDirection(@);
" E& x: D: @; U8 x# M/ z4 o @.HasOrder := true;0 l" n. u( i; f1 N* D1 S7 w
end;. X7 M) B# x8 F! O5 V5 q: P! d3 N5 g
end;; a1 Y0 A3 A0 l; P
end; -- of the method
- S6 _% F: c5 X4 V7 ]% p |