/* called by: entrance ctrl of the object 'track'
1 u* m4 T1 c0 z9 J1 |+ n*/
3 o& P* x! m/ m. M, i" `is
; h, _9 Z3 f0 H. _" O& A: Q8 L! P part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ X4 j$ N& t% \/ j8 a: H$ ]/ \! @
do" s! z. L7 D9 V7 H3 f4 D* }. f
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 ^2 v. f1 V d( p9 P R5 e% E if current = @.Destination -- else return6 ?4 ]4 V/ T0 |: R+ Z
then
% j& Q" N# z8 ^3 a: S- c @.Destination := void;' _2 q; h2 ]% z
if @.occupied then
4 C) x' [+ {7 k* y% u part := @.cont;/ ~6 K R6 y# b# g) N
@.transpOrder := void;5 b: t: g+ ?0 |/ Q5 I. ^8 R; l z4 V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# j# A a0 |0 Z3 Q
@,root.eventcontroller.simTime);/ m; q. s& {9 X4 j! C3 }
@.HasOrder := false;
/ ^ ]( W, B0 |0 i @.DrivingHome := true;7 b; i4 j6 k1 \ {6 s
rgManager.tryToStartTransOrder;5 h9 g3 A+ L3 K* N- p; s5 G
if @.Destination = void
7 W) A1 Q2 Q% c$ _1 v then -- no transport order for vehicle @
9 o; H0 q: {# B7 x& C5 H$ x% s @.Destination :=
9 K9 }; J1 d, C! z2 e rgManager.nearestFreeStation(@,track.~);
5 u0 _/ X8 h% t3 g newDirection(@);
' y# [4 ~ Z) E if @.Destination /= void then/ D- i! H! m/ d
@.Destination.NumReservation :=* |# }8 s! {' Y* C1 q- ]
@.Destination.NumReservation + 1;
+ S/ t7 O* n# y7 C end;
- X& W/ g8 q- {% V8 _8 t4 w @.CurrIcon := "drivingHome";+ s$ a& r' J( Y- a: {
@.DrivingHome := true;: u: h8 H) B$ v
end;
- D# y- o, G$ k1 G else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, Y3 S5 {$ R+ t+ r$ a8 S9 q& M part := @.transpOrder;( a/ N1 j6 `8 _# W0 Y( k5 X
part.move(@);-- load part
5 Q3 O2 ?- ?7 N @.CurrIcon := "load";
, `4 w6 `. ~+ G+ g5 Z GlobalDistObj := part.globDestination;: I6 f9 r: f6 \+ U# c
assignLObj := rgmanager.rgAssignL;; Y: M4 ~- `9 j- [6 a6 O. Z: v* C
row := assignLObj.getRowNo(GlobalDistObj);; G q. Y3 P e) j2 p* i
if Row = -1 then -- since 707 D8 B8 b) A3 v0 @" m9 c4 W( Q
if lan=1 then4 N _! `& y1 P! `& W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, E- [6 A5 c U0 ^
to_str("in der Andockstation: \"",?.~.name,"\""));$ Z2 n8 Q# x; y" G
else
- L, M. a2 D, P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 y$ _$ R% S A R& `
to_str("in docking station: \"",?.~.name,"\"")); ! h- Y. d& v% X8 S, U
end;, z! S/ U; N9 K) U
else
: A9 {7 G- v, ?5 x @.Destination := assignLObj[1,row];6 S0 j: P& u; e7 Q. [3 V
end;
, y/ j2 `! `; S% {1 g! M newDirection(@);% B/ b/ s- k, F' z
@.HasOrder := true;
$ b3 {9 ~$ P4 O2 n. u end;
5 J( _+ v: j5 N end;4 u% e6 O6 U$ J! z, M g' m
end; -- of the method
- @: X5 {, [9 ~. x g |