/* called by: entrance ctrl of the object 'track'
, [5 d$ r9 G) T: w*/" r* g8 B7 }9 R% G$ z0 k( K
is
6 T6 V& G. x) o: Q- d part, GlobalDistObj, assignLObj:object;row,Lan:integer;& z9 R- a, E3 C' l- r
do
% T# H4 v: o6 `' o Q3 F Lan := rootfolder.Internal.Tools.AOLlanguage;' b# P ]' D2 L8 v4 A: ~2 V$ F
if current = @.Destination -- else return
+ L$ d. j, ]* G) H* s then# p: u; r8 {2 Q4 d/ b
@.Destination := void;5 o' g" m) ^& \0 Q
if @.occupied then
9 G8 U+ R+ J0 a part := @.cont;
# q$ i5 u2 v' R @.transpOrder := void;
! e" F/ P: T7 L" a) X( t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- W5 |# T( C' D! p# Q) y @,root.eventcontroller.simTime);0 P, \; n: n$ {- y
@.HasOrder := false;0 d( Q7 D1 Z2 ~9 y& h" l( q3 Y, h
@.DrivingHome := true;) s" X+ A6 c7 y6 h# |3 ~
rgManager.tryToStartTransOrder;5 Z0 z( K5 a9 s; a
if @.Destination = void
6 o9 p3 @5 h+ L( x then -- no transport order for vehicle @7 O; Z' n" W8 J) c2 z
@.Destination :=2 {) J, u. m$ ?6 }
rgManager.nearestFreeStation(@,track.~);
! T- l/ S% H# y% S, u newDirection(@); ( A7 ~6 i/ V& a4 V& w6 ?- ]* M
if @.Destination /= void then f# a" c( w7 ]5 p) c( J9 m t
@.Destination.NumReservation :=' W0 f& P, i# H+ J2 R) \: M) w# X. V4 O: `
@.Destination.NumReservation + 1;4 L) A: F1 H$ }; n( m% |: o6 e
end;
1 S4 R, m; k" j0 V @.CurrIcon := "drivingHome";
3 E1 j. @2 m, G8 [7 Q @.DrivingHome := true;
. n9 y; V. x, j! s5 v6 ? end;
# e3 e$ d3 w- y h else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. ~* R2 B& \ Y7 Q part := @.transpOrder;$ [+ d3 s6 Z+ W* c' C* C/ @
part.move(@);-- load part6 N3 {8 F- v$ j r, R
@.CurrIcon := "load";
7 P* H& @0 o5 D1 G- w GlobalDistObj := part.globDestination;
( s2 b! K& w) q: ^ assignLObj := rgmanager.rgAssignL;
9 e0 J% {0 n3 q6 f% _* i- i row := assignLObj.getRowNo(GlobalDistObj);: P. ]( k" }3 {/ J& ?. c* f5 N
if Row = -1 then -- since 70! r$ ?; ^/ W% X0 O
if lan=1 then" ?% h# ?. d$ x( m" W; |% `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 x) Z8 a5 u# W9 ^7 R2 s to_str("in der Andockstation: \"",?.~.name,"\""));9 s+ b8 i! U t5 S
else
) |4 D- i$ g9 c+ e% W9 e( m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," v5 n$ N9 M/ O: H) g& P& O. ]
to_str("in docking station: \"",?.~.name,"\""));
1 H; z/ ]- J4 V/ M* T8 e8 @ end;; @' d9 a+ R) a O4 L
else' ]& e* i1 b$ ^. n" c8 G
@.Destination := assignLObj[1,row];
6 l6 C/ a6 e+ U- U end; ' G) C& v1 ~/ L' K# g
newDirection(@);$ M2 P" ~, T; i) D
@.HasOrder := true;
6 l* S6 W! y$ a7 C4 X$ G5 j: Y end;3 G6 F" z& I. b5 h2 E) P% G
end;
$ b, |# i# B& q- a; Aend; -- of the method
8 g: _( L( R' V; q6 `! k- i* e |