/* called by: entrance ctrl of the object 'track'- h4 \+ B1 j: u0 K
*/
; B8 l: J! K2 |$ X* j( m! M# His. | r( B. M( x% M& B- N% q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" L/ N+ \, y' w
do
4 d, D: _6 F! a# q/ A; z Lan := rootfolder.Internal.Tools.AOLlanguage;4 j; ~/ V: C8 V) L2 z8 B/ u
if current = @.Destination -- else return. |' q4 h- |/ p: P0 K9 D/ R4 g m
then/ v- [3 Y* ?9 B, B J( P* d
@.Destination := void;
. b* \* X7 D- x4 S if @.occupied then) b( S1 E6 F1 l9 {9 ~
part := @.cont;% l# t1 l, f f7 y' K% C) C2 w! ?
@.transpOrder := void;
& @: w+ m0 H9 k. J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& P8 ^ d; Q4 [1 ^* E
@,root.eventcontroller.simTime);
5 u t: ?; ?# U" \( v+ } @.HasOrder := false;
: g+ J" B1 _* T+ \( s4 e) M @.DrivingHome := true;
8 N8 `& f; S8 p. a' A d, u rgManager.tryToStartTransOrder;
3 Y2 U, c* Z. [8 ?) I1 S& n1 w if @.Destination = void D7 p/ ?3 ^, }8 |
then -- no transport order for vehicle @! g7 {" N# |/ [9 `9 [2 \
@.Destination :=. s' n) D! @: Q6 F) F$ ~9 h. C5 _5 Q
rgManager.nearestFreeStation(@,track.~);
( H* D) J' F2 x6 R2 V4 t! U newDirection(@);
" ]/ k/ ^) t+ h. L2 \ if @.Destination /= void then' v l8 {) ~4 ~/ P y3 l
@.Destination.NumReservation :=
# V# U& i0 }: N8 N+ G# A$ h4 h; s( z @.Destination.NumReservation + 1;
9 P+ _7 J+ j, R5 R* G! w& Q# ` end;8 w1 \4 \0 _7 u4 u
@.CurrIcon := "drivingHome";
& I$ u7 R4 Z. o3 g2 T @.DrivingHome := true;
6 C6 q8 v/ }5 n3 h% Y end;9 v0 x1 C p: d% L; w Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% [2 w" A8 e# b
part := @.transpOrder;
4 K: N; H( x* U0 D part.move(@);-- load part
+ G; e2 x) [9 C" t9 a9 O @.CurrIcon := "load";' @! t- F, @3 {0 N4 @. B
GlobalDistObj := part.globDestination;
. f) v5 W3 V) l a q- ]; g assignLObj := rgmanager.rgAssignL;1 f& G- q/ q/ m) e
row := assignLObj.getRowNo(GlobalDistObj);) J! i: `" R# w; W# `
if Row = -1 then -- since 70& K# @+ \. q+ P
if lan=1 then
- |6 l' U1 h$ X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% Y* e' p+ v9 P& a& Z
to_str("in der Andockstation: \"",?.~.name,"\""));
/ k$ V& j* G- I else
- V& y+ u! a3 v- P C7 k; U promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. N. R3 c" Z4 M- y- u) Z5 ^+ t0 C to_str("in docking station: \"",?.~.name,"\""));
6 C2 d! g. K0 k% ~6 i/ f4 ~ end;' G- Q) h5 U2 s, d
else! G8 a+ ?- |" n6 Q- `6 f( z% e
@.Destination := assignLObj[1,row];! |; c) g& M% \- l# H
end; 2 a: |+ {2 q$ j9 _+ B# ~0 {' p+ U
newDirection(@);0 m7 g, \6 ]- F0 z5 U
@.HasOrder := true;1 s" o; f, e/ a# t% H
end;
; k( t. u" W% s end;3 [% |/ M' k& |6 R; g% q
end; -- of the method
% B. h! q; m8 Y* [' j6 P |