/* called by: entrance ctrl of the object 'track'/ ?5 c* p( D6 i( l
*/
4 o9 C" j+ {0 c9 g" d1 C6 vis$ X8 s8 T- `. R& |
part, GlobalDistObj, assignLObj:object;row,Lan:integer; T2 z6 J, H D5 S
do9 l0 d1 ^% {6 Z( B
Lan := rootfolder.Internal.Tools.AOLlanguage;. \: o2 ]8 l) T9 Z# E
if current = @.Destination -- else return
4 J' x: }+ @) u" n9 M- x& I. O then, C: k: `9 Q( e5 `$ ]* e! T
@.Destination := void;/ h; k& `8 ^8 Y( O( q( z
if @.occupied then
9 t" n5 w* Q" G! p part := @.cont;
2 U+ e" c+ b% r: b6 T' I0 T2 M @.transpOrder := void;! d- k7 E+ h2 {* d5 u5 Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 d& G0 O6 a3 o3 o @,root.eventcontroller.simTime);
5 O' N. \4 [+ B, ?' X \0 V4 E @.HasOrder := false;
9 D" Q0 U1 ?6 I& S" Q @.DrivingHome := true;
" J g% F8 I* |- I- E rgManager.tryToStartTransOrder;
; n8 A+ U3 u* J if @.Destination = void& R3 m X$ Q4 K: d
then -- no transport order for vehicle @0 H% S+ u# o! j9 H) _, d5 O
@.Destination :=
; R( {8 Z, d8 O; ?) B rgManager.nearestFreeStation(@,track.~);
" y5 @$ z' Z0 ]& F) q( J newDirection(@); & J2 P& u% M w/ X
if @.Destination /= void then
2 I9 k e* [8 g3 y# O, q& ~) E @.Destination.NumReservation :=
. v5 _8 M* ]; O' T$ K$ n @.Destination.NumReservation + 1;
3 S* s& I, h" v: J; ? end;" K# I& F$ `1 x1 U" E& \" Y
@.CurrIcon := "drivingHome";
* D1 i2 p- \4 r c+ H$ ~( { @.DrivingHome := true;
" H# h5 ~* S; Z7 F+ p end;
1 N7 r% K; v. `3 Z$ {2 t else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 p' ?0 ~3 Y" P0 _9 ]
part := @.transpOrder;
# D) a8 T% i4 L4 H- ?: N8 a part.move(@);-- load part
7 o; P" _6 Z! k9 ~+ @+ V$ M9 U @.CurrIcon := "load"; w, V& w3 r; D; i$ X
GlobalDistObj := part.globDestination;! N1 D- P5 V7 U, E3 X1 L! x
assignLObj := rgmanager.rgAssignL;
. J6 y3 n' l8 c. ?1 Q- { row := assignLObj.getRowNo(GlobalDistObj);
2 W; z, y1 O0 M4 ` if Row = -1 then -- since 70$ |2 ]/ y! M( s& b& o" C
if lan=1 then' H, a! U7 |$ J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" H4 l$ _- j3 @7 m% ? to_str("in der Andockstation: \"",?.~.name,"\""));
+ Y2 I: Q7 O! y5 R. D/ Y else
) m; S; _( X/ E/ w* i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' I' m; ?8 P% d1 u4 H6 C! P: }
to_str("in docking station: \"",?.~.name,"\""));
& @% S4 |; W& t6 k/ e7 z end;$ B4 r: w' D6 |$ Q! T0 X
else! t" |& J! }5 C0 w* v
@.Destination := assignLObj[1,row];
% A+ f, }, {3 Y9 X1 b end;
, `( W; H2 V8 D# t& E+ W3 ~ newDirection(@);
/ R5 P- n8 |- K# i0 ?' ^ @.HasOrder := true;
9 e/ g x: c% i& @9 ? end;: r0 h( G% U. z3 {5 Z( S2 U
end;
" Z& _, p) e' K5 \9 oend; -- of the method% x& u$ L+ Z7 k" f: h- B
|