/* called by: entrance ctrl of the object 'track'
& s! {2 v9 R* \6 _*/, H2 K) H3 j$ I5 ~- m+ j- E2 x" `9 u0 ^
is) |" N0 m% G2 ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 a( r# b1 h9 R( f9 l, u
do; q7 B; R0 B" g# L$ B6 T8 F
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 V# X) o/ F: O1 o, L0 ^ if current = @.Destination -- else return% {3 l0 \7 O% I0 I
then
{1 t5 j) B! J @.Destination := void;3 i( C6 r3 v$ o7 p6 B
if @.occupied then
. m" B2 ]- d$ i& N e. ^) R part := @.cont;
! B. x" n0 s, U5 s9 \" S% ~ @.transpOrder := void;/ N# W0 P6 A/ e ?$ b1 ]6 v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' h/ @) A# f |' @/ a2 f+ d
@,root.eventcontroller.simTime);
% \9 H2 S. b3 ]- G5 O8 u$ Y. | @.HasOrder := false;) R9 V/ Q1 j, R; d* o
@.DrivingHome := true;
5 M$ O$ t: A( f/ n; m rgManager.tryToStartTransOrder;9 N. J2 i) n& H3 u4 d( U/ m* t
if @.Destination = void
* r( X! r- _& I. d: ?# ` then -- no transport order for vehicle @
% |% U% N- \. P3 S+ D$ b8 v @.Destination :=$ x6 g' o0 E/ @% }
rgManager.nearestFreeStation(@,track.~);
( M( L+ f: |) ] newDirection(@); , h! D! ]1 O: {. e# h1 Q2 k
if @.Destination /= void then
8 q6 m- i) b. v! w ]4 b# v9 P! j @.Destination.NumReservation :=
( D: |) o& a9 [: P. N. R @.Destination.NumReservation + 1;4 Y$ _$ n) J: x# h- U
end;: n0 V6 M% w, k( p2 H7 V
@.CurrIcon := "drivingHome";4 A, F* B0 m1 m! N; s+ r% K
@.DrivingHome := true;
$ S# H% a! O g end;
; M- ?* V/ Y" X" V( d: y" U' ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station% g6 _) V- V# s! w
part := @.transpOrder;
$ o8 p2 D' O' F part.move(@);-- load part0 K/ t( l* ~% P! n& p# s
@.CurrIcon := "load";4 u7 M$ i0 k0 g2 `+ u8 {8 H
GlobalDistObj := part.globDestination;
) K) m! @. C8 G3 U) ^5 P" Z; e ?0 m assignLObj := rgmanager.rgAssignL;
/ O: \1 v; l/ F+ j. b- O8 h row := assignLObj.getRowNo(GlobalDistObj);; @$ N' _, H% [' }) R) P
if Row = -1 then -- since 70
0 O- D! C3 t$ \* G" A if lan=1 then
0 H/ I7 W& e; N }6 G# ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! Z5 C M \- M8 ~; o to_str("in der Andockstation: \"",?.~.name,"\""));
0 t3 v4 H( \% A4 q e else
% I& S) E6 D8 T* b5 B7 J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 J! C m* Q3 R! t to_str("in docking station: \"",?.~.name,"\"")); 6 j! s) [3 n5 M* h: d5 H1 E
end;
- X9 m& ?( L. ^# g* K else
- l! N* b" e! m% g @.Destination := assignLObj[1,row];
: a% m) s) Z1 m* B* c end;
$ R9 [+ J7 L! n/ Y4 B) Y, K! I+ @+ T newDirection(@);% q) d* W) B2 U; f9 s; f
@.HasOrder := true;2 V6 u* S- G3 G
end;
U; O1 y( B% F$ c) ~) J0 U- o) U* P end;
' L% K% N& A) {end; -- of the method
a. p% S8 V8 D" k8 T |