/* called by: entrance ctrl of the object 'track'
9 y: k# }4 [& B( a+ x*/
+ r7 Z' b& F& j0 fis. z+ A- Z& S, H+ g, Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
T& \6 I$ ^" L; |5 ?' Ado3 ~4 |2 g K0 a
Lan := rootfolder.Internal.Tools.AOLlanguage;
: g1 C% E1 @' r: C5 i if current = @.Destination -- else return3 X+ j0 E! b" R% j4 w! [
then
! a6 o! l I; r! m9 s @.Destination := void;
- D l4 l/ Y' u6 s9 h; g if @.occupied then
" X# a* v0 M* [- K( i* x/ {5 D part := @.cont; t8 {8 Y9 h$ T% o; I+ q# A+ v
@.transpOrder := void;
9 R* \* N0 [) u) P, ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. i8 _2 Z+ T% ~( k% D4 p5 m
@,root.eventcontroller.simTime);, X9 g; w# V4 X5 i0 Q u5 ^3 l
@.HasOrder := false;
- \5 q2 A4 s9 u @.DrivingHome := true;
' N, W/ t" z0 j2 A rgManager.tryToStartTransOrder;
% R: v x# N: J% i( A' ]6 q if @.Destination = void5 Z) T( \1 m- F
then -- no transport order for vehicle @
9 f' x8 M4 H6 n! H u4 U @.Destination := x G* E$ u3 {; K) |) ~
rgManager.nearestFreeStation(@,track.~);
) O/ M5 U4 q% P newDirection(@);
1 Y- L$ `+ {- W6 a+ R+ n& j if @.Destination /= void then8 v4 [; U: a* ~4 T* D4 T2 A* [
@.Destination.NumReservation :=8 ]* N2 W- A4 ~# C% }" { Z- H5 m: e
@.Destination.NumReservation + 1;; P; P& H; ^ [ Z
end;& @; C# O# S3 C- D: U' M6 N
@.CurrIcon := "drivingHome";4 L/ j$ U! f* ^$ j4 @2 i: o
@.DrivingHome := true;
0 z6 }9 A* H5 t9 K end;$ ]; k5 i3 q" o: }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; K. A, W- G# g5 o) D) d part := @.transpOrder;
1 t# ^' ]/ {/ _( q* a part.move(@);-- load part; D6 l3 \: s& I$ ?; D0 N1 `+ R6 U
@.CurrIcon := "load";5 U" @/ g" Q! M K. Y2 o4 r" D
GlobalDistObj := part.globDestination;
( A! p" y: \' W( ] assignLObj := rgmanager.rgAssignL;& { n0 q5 Y( {7 ?, o% Y1 G, R* E
row := assignLObj.getRowNo(GlobalDistObj);
( S0 o4 ?' V \$ O if Row = -1 then -- since 70
9 t1 {6 w2 c" Q: D- y if lan=1 then, G N' z$ n; V# x7 k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ q; I4 A* v+ X+ `3 A6 i" z$ }
to_str("in der Andockstation: \"",?.~.name,"\""));7 g1 U; ^+ k( E1 X# f* M2 c: a4 i
else
/ p7 G5 d) U6 p, f1 S% M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( e7 K4 p1 e9 O2 p/ w to_str("in docking station: \"",?.~.name,"\""));
( j/ {0 }, [3 r7 Y2 o9 [. y5 G end;& b2 m+ _) K$ X3 {7 u
else
L# N3 X6 O* v1 W0 ?; c* _ @.Destination := assignLObj[1,row];
& i* R7 W! S, X% S* z& ? end;
Y% Y9 w. Q: n$ L0 s5 Z( ~+ | newDirection(@);
4 W6 Y, ~: L# ?9 }6 } @.HasOrder := true;: m: h0 A; j8 ?& K: k
end;
: \' d$ v+ r" \; Y, V- R1 r end;& m, U/ K) o) h4 [" _- N
end; -- of the method. i: ^ V4 e0 N# U
|