/* called by: entrance ctrl of the object 'track'3 @/ i( ^' T1 Z
*/
0 X( z4 U, d8 v2 r4 ?: sis
% i# F2 t% Q- j+ Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& _- ] l4 k9 B* t: C4 E+ B1 Xdo
, ^8 D! o/ i/ l0 E9 e s5 }/ C$ O Lan := rootfolder.Internal.Tools.AOLlanguage;/ [+ T. J( M- E3 @7 w5 p5 `5 |4 m( j: h
if current = @.Destination -- else return- U2 g, h4 E6 o( s y/ u5 j
then
" }! c5 l3 y7 B& B1 L @.Destination := void;6 \; N7 z, K9 h
if @.occupied then
% u* F1 z. _0 ^# i0 ] part := @.cont;2 D0 U* M% C5 j& a# r1 W
@.transpOrder := void;
5 G/ e& H9 E3 P# e) z3 z* x, a3 H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; F- f2 K0 `8 E$ N1 R3 B
@,root.eventcontroller.simTime);4 P! Q+ N, L Y6 y
@.HasOrder := false;
* U4 \: F. {& A" c% [' Y& B @.DrivingHome := true;
5 m. Z. p1 Z9 k+ c6 n8 p rgManager.tryToStartTransOrder;8 I% u. A9 z% N; J3 f W
if @.Destination = void& R0 q' G& a9 x8 y# t9 E. ^3 u( g b/ d
then -- no transport order for vehicle @+ B- Z2 y6 u2 f6 }, w
@.Destination := h7 _) W$ o" _
rgManager.nearestFreeStation(@,track.~);* D: g' U, `0 K1 f
newDirection(@); U! c* d: t3 B/ @8 H
if @.Destination /= void then7 ^; U8 T0 R1 [) N1 u0 t, f% Q
@.Destination.NumReservation :=
4 u& D! L$ R* Q3 @ @.Destination.NumReservation + 1;4 Q; ^% o! ~7 i5 V
end;
2 Q* e- v3 q+ J) L6 c) C @.CurrIcon := "drivingHome";
, m7 U8 y8 R& V. F8 y+ x @.DrivingHome := true;, l. I$ h3 p* z3 _
end;
9 r, E3 v9 D0 A2 M else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 a1 y) x/ x: F
part := @.transpOrder;3 N- w R, e1 c5 M
part.move(@);-- load part4 N3 e, i8 N7 A$ p& f E9 B
@.CurrIcon := "load";
& n- p8 T; o' t" \" S1 c3 @/ S GlobalDistObj := part.globDestination;
2 ?+ M: S# `& Z' x; y assignLObj := rgmanager.rgAssignL;0 u9 w j) Q" j8 ]7 Y# t; U& N
row := assignLObj.getRowNo(GlobalDistObj);% ?7 o1 K0 u1 y
if Row = -1 then -- since 706 u* }2 @# i( n2 p% n
if lan=1 then1 e2 V4 z- v4 I _0 P, B8 M+ x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 {+ m+ a* }+ f* P/ g; C to_str("in der Andockstation: \"",?.~.name,"\""));
# s$ J3 |4 A3 Z: y1 i n else
0 `4 ^( Z' u7 D5 v, E* u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: J* E$ D2 P$ a2 S3 P8 w1 ]/ n
to_str("in docking station: \"",?.~.name,"\"")); # a1 T L, X+ N) S( z% \
end;9 G! }( O0 v6 G6 l: \$ N a( P8 `
else
/ I, V0 q- d9 _5 b) F @.Destination := assignLObj[1,row];
" I0 o1 X& |; S end; 9 ?. Y- Q# x1 E+ V# u! h
newDirection(@);
" z0 V0 E! c# K @.HasOrder := true;; Y, Z# c4 i7 u& x$ y1 {
end;3 N0 ]% ^$ p9 }9 x" O
end;
8 y: G) v3 F3 q' Wend; -- of the method
8 ]. g+ n) J& ?) C9 X0 y/ A, C |