/* called by: entrance ctrl of the object 'track'
$ I0 l$ O# f1 d* z6 t/ I# K- ]8 E*/
5 I4 c |, H# g9 E7 E+ j9 Zis
/ A2 g, ^4 r" u Z9 U% J3 E part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( p [# R2 t; x. c% @4 c- odo
* O, w. K- J: F; N$ E# `0 K. @ Lan := rootfolder.Internal.Tools.AOLlanguage;+ b# W8 q0 `: P4 I
if current = @.Destination -- else return) E( k0 v, U$ U9 _, d
then
: p. l6 w6 B3 d* D' L @.Destination := void;. {& E$ a* L& @* U: K3 W
if @.occupied then
% l! n0 ?0 m- W; n: D$ V part := @.cont;
& H" C' |8 k6 R, W, u. Y8 f @.transpOrder := void;
/ i7 z6 B: o, J9 Y* h2 ]9 n: R* B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 b0 e5 K& j: J3 Y* Y | @,root.eventcontroller.simTime);
, N! T6 @2 W' C. G$ `4 I) t0 W; i3 H @.HasOrder := false;
' d0 d1 }( E, Z @.DrivingHome := true;
6 r% e7 u* @$ Q, V0 T rgManager.tryToStartTransOrder;
( D# d0 \: j3 Z& `7 m* H if @.Destination = void( r3 a& ~- k8 F- G
then -- no transport order for vehicle @- |! E, `% w# |) E* z
@.Destination :=1 ]6 N; i0 X4 W0 p6 u8 V0 d* g
rgManager.nearestFreeStation(@,track.~);
- H& S8 {' U0 }9 \ newDirection(@); 5 x% ]" X; T7 j3 j* F' `
if @.Destination /= void then+ Q; M& U- c0 M# y$ Q
@.Destination.NumReservation :=. x$ N/ r5 _4 S8 q- Z7 A8 X
@.Destination.NumReservation + 1;; _5 m/ ^$ d6 Q, f2 z4 o
end;! S/ U* `' u4 Z& C! C
@.CurrIcon := "drivingHome";
! w! ~- X8 F4 {+ u5 } @.DrivingHome := true;4 d0 w$ d5 P6 R$ H' W( M/ L
end;
& K5 @( Z# `; r% \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% h& K! X, X, E8 V2 G part := @.transpOrder;
+ B$ t$ I- M. u, _5 [( p3 w" _ part.move(@);-- load part' Z6 @& o! p& ]& H
@.CurrIcon := "load";5 ]) i8 M. C2 j! i% `) B5 q
GlobalDistObj := part.globDestination;; v9 m' t& q# O. ?+ U
assignLObj := rgmanager.rgAssignL;
' H5 ~0 N- ~ c row := assignLObj.getRowNo(GlobalDistObj);; S" T" q4 R0 ]6 C8 k1 V9 T6 N/ X
if Row = -1 then -- since 709 v& k" v! Q( o& S- Y/ B) x
if lan=1 then
* @2 d: N& I1 @ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: Q" b2 I% q) |' L to_str("in der Andockstation: \"",?.~.name,"\""));
5 e! F/ J! C' {- e; X else( h1 j' A, F8 s& S, j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 M% D! Q1 J, T
to_str("in docking station: \"",?.~.name,"\""));
0 B k2 x) y% |- L$ i end;2 W0 ]% z. R. A* L
else
5 H7 y$ i, M, H5 [ T2 t6 a @.Destination := assignLObj[1,row];% G8 L- \1 a/ _ P
end;
0 f" j4 ~0 {3 d; T$ \# }+ o newDirection(@);0 M! c5 T) v' I' W
@.HasOrder := true;. q% J2 |1 H$ R6 E7 H$ u; w
end;* D' ^2 D6 O! k+ s& c0 z9 X
end;, X7 t b# [ r' `- Y! ]) q
end; -- of the method1 T m# z! g3 w d Y" U6 V
|