/* called by: entrance ctrl of the object 'track'+ |; {6 m! M/ H
*/
9 l1 q/ N* T& \is
* S, q7 T8 g% v7 g* {8 S1 { part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 s1 z5 a. U; R: ?' f- V( Q
do
( X1 [$ I d4 _! E$ u. ^5 J" s Lan := rootfolder.Internal.Tools.AOLlanguage;3 _! ]8 m8 {2 u& q% L9 d1 W/ @
if current = @.Destination -- else return# E( T( i% `. P1 K1 B' f5 o; ?
then
0 V* K6 k! C2 p$ C' Q& Z( S @.Destination := void;$ L) h: S2 _, m/ z# ]
if @.occupied then
( \) f: E9 F1 U+ g. v, ]! v part := @.cont;
2 k& F! d- d3 \/ j @.transpOrder := void;
3 D1 M- d) _+ w5 U* _/ p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) _2 p2 [3 v( @+ J- s6 z/ J
@,root.eventcontroller.simTime);
) ~5 z( S+ \; G) p7 b; U @.HasOrder := false;
! h" O z. |) l" j0 Y1 f @.DrivingHome := true;
( w1 l3 | z# Q( n5 F rgManager.tryToStartTransOrder;; b8 z8 d6 m6 u! c6 d
if @.Destination = void% H v. {) B6 b4 {; U+ o
then -- no transport order for vehicle @. v+ b; B& H# c" K& A+ M6 r
@.Destination := x5 O7 ^8 G/ B2 }
rgManager.nearestFreeStation(@,track.~);. N/ n0 \& `& j/ ~ i5 l9 M! k4 [
newDirection(@);
9 s" n$ ~, [4 D0 G; X# x if @.Destination /= void then! V% V% Z- J. }2 H9 J0 ~6 f
@.Destination.NumReservation :=
" _2 ~( j9 _* ?7 w3 K/ Q% a& M @.Destination.NumReservation + 1;8 K9 M* D) E; q$ }& m7 U
end;
; y- b, q! U3 A, Z- V @.CurrIcon := "drivingHome";* D+ e1 G2 I8 o$ S+ [5 H- L: m
@.DrivingHome := true;
8 ^* ^$ x1 P$ a1 ~0 q4 w end;
# n, }8 [6 d' ^) y9 h1 y$ S else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 L1 {( C, V, T6 y* g B part := @.transpOrder;: Y( Y$ {! K% [
part.move(@);-- load part
8 i5 {# _& E/ D* P1 {3 _; C. M @.CurrIcon := "load";
) K! v8 f7 \+ {8 @4 m6 T1 l$ l9 r GlobalDistObj := part.globDestination;
4 x3 {7 V9 t$ J0 N assignLObj := rgmanager.rgAssignL;
, o) y3 S9 i# ~" _' E$ f3 e row := assignLObj.getRowNo(GlobalDistObj);
- e7 L! C; h n' z$ K if Row = -1 then -- since 706 |( z/ N4 |) n6 I" n. i7 ]
if lan=1 then. e7 P$ ]/ @: x' F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' }* ^' e2 L$ w1 e' x2 y& t
to_str("in der Andockstation: \"",?.~.name,"\""));7 A7 F5 W* Y6 @
else% P* U( n$ x( Z8 P6 c. J: e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 ~$ R! s; V' \$ h4 W to_str("in docking station: \"",?.~.name,"\""));
: L# t4 z1 m9 r6 L0 S P end;
% n; U* \; n3 |: t else0 P4 h8 z; q5 ?, r. F) u) z
@.Destination := assignLObj[1,row];
' H5 Z' W1 ]9 V1 ]. g end;
. A0 D6 g& J2 o newDirection(@);
* p# m+ f8 f6 l, }1 Q0 t @.HasOrder := true;
P" W9 n7 B1 I# Y- ?3 p7 a* x; T! b end;
/ r4 A2 y, N3 l" t end;5 L2 L! f2 k* l" _7 ^2 ]
end; -- of the method& }" w8 h( O; V3 n" z$ \: X
|