/* called by: entrance ctrl of the object 'track'; L3 \1 j! S6 t: `' k$ z6 `
*/
$ g5 x8 d" U |% Dis' h4 m% ?, }) N7 G' a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 ]+ r6 e; x2 ido
' g+ E4 Q- `9 p Lan := rootfolder.Internal.Tools.AOLlanguage;
$ ~6 V# o3 s2 a8 V+ }' f9 m. P4 D7 k if current = @.Destination -- else return
( A, R3 s( n# n( A2 P5 o then
# @. p6 r3 U- v* g: I& X0 M6 m' W @.Destination := void;- G- \, C5 q5 M2 X* s' G; A
if @.occupied then+ a# l/ P' ?$ Z) ]
part := @.cont;0 {0 V: t& {/ x8 B8 ?8 }" e
@.transpOrder := void;
% k( k+ f/ D' N V& Q' D. H+ ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* z' O2 Q( T8 V% {0 e3 y7 A, _3 f; t; S& p @,root.eventcontroller.simTime);
# h8 D2 ~; ?1 M0 }$ a. L @.HasOrder := false;
. [% L" g4 X; W b @.DrivingHome := true;
% m& x0 q. y( w rgManager.tryToStartTransOrder;
/ }/ z$ O' y9 B9 R& ?. |" k if @.Destination = void8 _3 p% @6 J7 r( w4 L8 A' l; y0 B
then -- no transport order for vehicle @
7 ?+ P8 h+ c& b! s& K @.Destination :=
2 e8 Z( K: H# }) f) _# x rgManager.nearestFreeStation(@,track.~);
! H3 ^' e: L1 E/ h, [ newDirection(@);
+ h" }& \0 R2 a- ~6 e if @.Destination /= void then
0 G" N& o" A, f" q+ Z6 U @.Destination.NumReservation :=; J) p! K: q5 z' j: v# Q
@.Destination.NumReservation + 1;
0 n: _7 C& X$ o5 v5 Q$ L end;
' l' ~9 i) E' i3 ?1 K5 T @.CurrIcon := "drivingHome";
: j7 q$ e; W& ?8 O- n6 c7 d @.DrivingHome := true;9 Z8 v( }2 V1 f: B/ X2 e
end;; k' m# T8 O/ B: K- g% e3 l! y5 h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( q; b5 v, d# [
part := @.transpOrder;
* m' V& |8 v7 H$ m& {) v9 Q" ] part.move(@);-- load part7 a& w3 O4 A, N
@.CurrIcon := "load";5 z) ~! J* u/ I5 `
GlobalDistObj := part.globDestination;
8 q$ j8 ]% t+ p2 a) V assignLObj := rgmanager.rgAssignL;8 C7 L- ^& G. N3 h
row := assignLObj.getRowNo(GlobalDistObj);$ `1 {1 d# W( m, ?7 p! P+ ~
if Row = -1 then -- since 70: l1 |; ^$ d- Q V4 a( s6 U
if lan=1 then
: h9 y1 U- ~# i/ C9 B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% w9 {. D: s( q4 p5 o f
to_str("in der Andockstation: \"",?.~.name,"\""));
2 e* e' i }4 L: Q: i" X else0 K4 L$ _, _) m. u( S! y) @, ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 m! M; p3 k+ n# U$ e: K
to_str("in docking station: \"",?.~.name,"\""));
7 r. t- A- f0 V8 d5 a7 m* k end;
. q" r7 A6 [, ~ else
; Y% V0 f6 x) x" Y/ H! F @.Destination := assignLObj[1,row];
& F7 W& k f, ` end; 3 o/ J* m3 |& ^9 s9 b! S- P3 @
newDirection(@);. |2 W% z+ s+ B7 |$ K$ T
@.HasOrder := true;/ [$ o8 l) y4 [- h
end;
5 Z0 F9 n& J2 U; H end;5 y! H z6 n4 t* r# U
end; -- of the method
/ [& J. F ^4 W) ~& C# } |