/* called by: entrance ctrl of the object 'track'
& B( R/ w4 ?6 Y*/
& k5 D; T( P/ M2 |1 g3 Vis
4 B n; n5 H Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ ~. h- I& _( R) ido
# m* \8 _$ G3 V- g. e6 m+ g/ Z3 B Lan := rootfolder.Internal.Tools.AOLlanguage;* a9 k1 J% h# _9 d, B4 \& ^ `
if current = @.Destination -- else return
' r3 I0 _! r# Q/ L then
5 r5 @+ {0 G9 d/ q6 f3 ] @.Destination := void;+ }! s: t3 X9 ~! b! L/ _5 y b
if @.occupied then& V. T5 J6 M% x# L; I
part := @.cont;
3 p ` t. j# ]+ @3 D5 T% S @.transpOrder := void;
. R7 B$ E2 l# @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 k0 E" d. [$ o0 t p) V) q @,root.eventcontroller.simTime);& P5 I& K8 F1 W+ w# U1 n/ w! v) {
@.HasOrder := false;
, c1 Y y/ K" T) _7 Q @.DrivingHome := true;" |- k' o$ H& r% @* w1 K
rgManager.tryToStartTransOrder;
3 H* p4 `0 c* Q8 @ if @.Destination = void: w6 e8 e2 W3 B8 U
then -- no transport order for vehicle @% V6 }/ i. t0 z U
@.Destination :=
) e( C! T" y9 Y' [0 g ^* k. I rgManager.nearestFreeStation(@,track.~);0 {2 k$ O4 v) j4 ]: i8 `! O
newDirection(@);
" v, o# P5 b& [) S% a if @.Destination /= void then
. K; m$ S8 j, A: A+ Y- M @.Destination.NumReservation :=
: y, O* @0 c, k) _) Z @.Destination.NumReservation + 1;
0 e1 Y6 A; P y end;$ ?, d6 Q2 N+ W! Q8 r7 u6 U
@.CurrIcon := "drivingHome"; J1 ^, Z& |* \' S* u
@.DrivingHome := true;( ?6 P4 Q1 _! }8 I7 p; d, P; R
end;+ Y6 z4 Z, r6 k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& \5 @4 S# |& s) N( d- H
part := @.transpOrder;3 G# M( e0 Y, A
part.move(@);-- load part
/ S$ c+ n" m2 d. ~3 b' a7 G @.CurrIcon := "load";
* _' a8 H* ] V5 i* x GlobalDistObj := part.globDestination;% i5 s: k6 C/ ~
assignLObj := rgmanager.rgAssignL;" {% o& K# @9 G
row := assignLObj.getRowNo(GlobalDistObj);8 i( G# \- X: ^3 t% @# u
if Row = -1 then -- since 70
+ l7 W( K9 C9 T9 B if lan=1 then3 F7 U$ e6 k* ` P/ V# U. a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 b q9 m, g7 T
to_str("in der Andockstation: \"",?.~.name,"\""));
$ r9 i8 M3 y, g; a else, h2 d: _3 J8 m' z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- x$ U& Y$ }8 i5 C to_str("in docking station: \"",?.~.name,"\""));
! l& H, P$ H/ W, @: m9 i2 A end;+ g- ?! }' Y& e6 f% V
else( ?( T' c' n6 x% {; v% ~; {
@.Destination := assignLObj[1,row];5 I5 q! F e9 c% R
end;
8 V) ]" L# f1 @" I" N newDirection(@);
. P6 c2 d2 ~+ a3 H0 s @.HasOrder := true;
* V) ?* p/ a* |) G end; t! Q% Z% L; J8 f4 l6 A- r
end;: ~! x* c3 N- j8 L
end; -- of the method
7 N! I9 E3 P5 j, f% V |