/* called by: entrance ctrl of the object 'track'& H; ?9 z5 R6 s' W5 d* g
*/
' I$ u, @; T7 m" Q5 f- iis: I: k9 I$ |* e, q- R9 k6 m9 O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ V* W3 f9 s; {; I; M) b+ v
do# B" F+ r% I# R# \
Lan := rootfolder.Internal.Tools.AOLlanguage;
# L( `6 H! d" m if current = @.Destination -- else return) x: `# q: x- J6 t
then6 k6 {2 U/ i, n- v: ^2 g/ k
@.Destination := void;7 Y0 K& X& }9 |7 v, k3 P( v
if @.occupied then/ o! e2 c( a& A+ S) y5 V4 k
part := @.cont;. N1 h, G' V3 S& s2 M' s
@.transpOrder := void;/ F8 }3 g- p' [3 L# x4 s
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' A$ P4 ^0 u8 u0 j3 `+ B4 }4 f @,root.eventcontroller.simTime);. Q% O: S0 j1 B2 t
@.HasOrder := false;
$ T- T6 ~( ~% D3 [' | @.DrivingHome := true;
# |1 R! h# F6 p2 m5 n- K rgManager.tryToStartTransOrder;; @ s6 `& J/ y2 l& E$ ?6 `' f
if @.Destination = void) c. |, L! X$ k" i5 e4 l: U0 y
then -- no transport order for vehicle @. K. k A5 v8 b9 Q) q
@.Destination :=
* }0 k* U' ]7 z8 T rgManager.nearestFreeStation(@,track.~);4 J y5 P& ]% ]# N7 D* ?. w
newDirection(@);
# r2 C: F, I: ~& I! ~4 H if @.Destination /= void then! I0 v8 Y% N4 {% d0 V1 @
@.Destination.NumReservation :=
, a. W. V( h/ m @.Destination.NumReservation + 1;
0 c9 ]* S; Y3 [- ]3 } end; y+ J8 r; }6 `' i+ E7 G
@.CurrIcon := "drivingHome";9 c' H: z' g1 o, S) ~
@.DrivingHome := true;
' g1 U/ z, |( f) u& s$ m1 N end;2 e' \1 W, [6 u8 v! m5 D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 c/ ]3 J3 I7 e" G! X: f+ B+ M, i part := @.transpOrder;
% ?; M2 [! N3 G ?* E5 [* x part.move(@);-- load part
+ C) i5 v2 R( w1 s6 O7 y+ g; h4 Z6 { @.CurrIcon := "load";
4 S0 w; G, j% a0 d" k) w$ \ v/ M GlobalDistObj := part.globDestination;0 L) U& C( d) p. {3 s. _
assignLObj := rgmanager.rgAssignL;
+ u4 @- n# P' @6 P$ w row := assignLObj.getRowNo(GlobalDistObj);# b# u7 z9 }, ^ M8 H- T
if Row = -1 then -- since 70! H' s3 h2 u- I& @
if lan=1 then
( ^5 N+ _3 d' P* f2 W$ ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; J6 e) ?+ T1 y. `3 i
to_str("in der Andockstation: \"",?.~.name,"\""));
' M% n4 T# [$ M g( B else
4 h v# }5 ~! R4 @8 m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: ~" l* a1 Q$ B( }" x
to_str("in docking station: \"",?.~.name,"\"")); 7 `; w$ W3 V z; A0 M% C7 r/ O9 h
end; d1 U' Q3 g/ X2 k* V8 g$ v
else
' Q+ K0 r: F( F& G6 x @.Destination := assignLObj[1,row];4 W# t$ r& E; W1 R
end; l2 k9 b# a3 n5 z
newDirection(@);
* x( A; G0 z$ t9 A; t4 c; \ @.HasOrder := true;/ Y' f3 {1 P4 @! w- E
end;
- u$ g' [! G6 \' G end;( l. K" U5 A7 i% U2 _
end; -- of the method
% Z9 j9 @: f+ V: u! |3 u |