/* called by: entrance ctrl of the object 'track'
( `/ s5 t/ \$ m*/5 f5 {6 X( _; k; Y1 z
is! Y4 } @; F! u4 y, v# y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ c9 s6 m _( E. B! K' v; b" O jdo
! j5 }2 Q( S* v: k7 t y Lan := rootfolder.Internal.Tools.AOLlanguage;$ @6 L9 h" X/ ]3 d! D2 G) a+ k
if current = @.Destination -- else return
5 u3 Y: N; Z* S F5 J+ u% h" Q then
# t% L, Q: Q* v: C5 u% V# K @.Destination := void;% k/ L; x, p4 h
if @.occupied then. f! U/ T7 o% ~' t0 a7 j" j' r
part := @.cont;: M5 j/ g) Q+ E; {' y$ _5 ]
@.transpOrder := void;
, g0 V L2 ~2 H0 U; v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 w8 f0 y r2 M; E) ^+ C1 b6 q" V) t @,root.eventcontroller.simTime);
6 a( Y. D, `" I8 { @.HasOrder := false;( z/ s! E7 i |( n! D: C
@.DrivingHome := true;
$ e! t( Z2 S9 _3 O) n+ k: M rgManager.tryToStartTransOrder;& R2 ` p$ E+ G; K1 g& V
if @.Destination = void' q+ r& c# w, V) B
then -- no transport order for vehicle @6 b7 f! b/ D" i! {5 [* ^
@.Destination :=* Q; F. h+ K3 R4 `1 V+ L* G$ }
rgManager.nearestFreeStation(@,track.~);' l2 w0 S2 r. d
newDirection(@); ( z9 A& g9 G$ x* Z9 @' C$ }
if @.Destination /= void then
4 {+ G) s4 p% e. e/ Z @.Destination.NumReservation :=" G( H/ E, U0 I
@.Destination.NumReservation + 1;
. E, n9 X* q; @0 Y, R: D end;
9 j$ X$ w1 h, S1 V6 @* \ @.CurrIcon := "drivingHome";% G" z! }5 B+ s9 a+ ]' g! n( O
@.DrivingHome := true;& f" u" i- M- C& p) B$ M* I
end;& d9 \$ j. W+ H5 n( O' O/ Z+ S7 z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 w- ^5 w' u$ O- G( g) P
part := @.transpOrder;
9 f, }0 [( g" d1 F5 s' Z part.move(@);-- load part
$ s; `( a3 Q$ [: N @.CurrIcon := "load";6 F3 S% r( ^6 }/ H) q
GlobalDistObj := part.globDestination;
$ y# B) e7 C F' w assignLObj := rgmanager.rgAssignL;+ v3 \, U! p Z5 g: \! U4 D4 e, D
row := assignLObj.getRowNo(GlobalDistObj);2 m6 K/ L" r: c8 x- Y( w
if Row = -1 then -- since 70) _, }$ O3 w; J
if lan=1 then
% u2 y& s! u# S4 g0 F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 N b2 q# x7 k8 h, w to_str("in der Andockstation: \"",?.~.name,"\""));
" P8 i/ Y* F8 W else
0 k3 ~5 t2 C% b& t3 k1 v7 L" y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, r: C+ a# G$ E# y
to_str("in docking station: \"",?.~.name,"\""));
* T2 M7 O! ~* @. H( P, t, f5 }" q end;0 I) d7 g) O1 `4 ~$ S
else" n# J) }2 m% }/ u
@.Destination := assignLObj[1,row];- M& _) C" z2 o8 A+ a2 ?3 ~) D
end; - E: Y8 ], `1 N/ Q0 q' n p; \
newDirection(@);
/ F, G5 M: L2 i @.HasOrder := true;; L/ Y5 b$ d! k
end;
" g Z A* A+ z8 W end;7 K% U7 c) N7 ]2 _7 {
end; -- of the method: W- Y& \5 |8 W5 [- Y3 |
|