/* called by: entrance ctrl of the object 'track'1 X3 {- x% q- Q3 ~# r
*/* L+ i0 ~ R3 _1 l* y
is
% A# j/ ~: L" Z# m; l! U8 ?6 ~# H part, GlobalDistObj, assignLObj:object;row,Lan:integer;* q" [5 |+ J* u @ O
do! T; ^3 g8 F! s4 k3 _+ A
Lan := rootfolder.Internal.Tools.AOLlanguage;0 d/ |; [, b9 o X. n
if current = @.Destination -- else return/ n5 s( U" S0 ~
then" T6 k4 M. ]4 n! a& b* a
@.Destination := void;
* S* e! Z0 ]0 c2 ]. M) d/ { if @.occupied then
( V& i; k3 e7 {# ]4 n" V4 P part := @.cont;
" A0 i- f& F! u @.transpOrder := void;3 w$ i3 E3 S$ b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ D/ U x Q3 v/ A6 j& E h @,root.eventcontroller.simTime);
/ E8 W! `. D5 i" ?9 f5 c- k5 ] @.HasOrder := false;. A/ }+ ^% L$ }: g( x
@.DrivingHome := true;
# i q( a- Z) m7 ~* z) M2 a rgManager.tryToStartTransOrder;
* I5 p w/ s+ Q& s1 r0 i0 d if @.Destination = void
' F; ` [1 b5 s then -- no transport order for vehicle @- V# S; S! Z) |; z; {4 e% f
@.Destination :=+ r% d9 K0 f& d5 m
rgManager.nearestFreeStation(@,track.~);
( W# C! y7 I/ W6 l8 D; D# e newDirection(@);
, ~7 s6 G+ }/ T! \6 _) X8 p: Y7 Q if @.Destination /= void then5 `1 h/ k( S l3 c3 A- g
@.Destination.NumReservation :=' l- X! l6 X3 I0 W, J" u r# ?
@.Destination.NumReservation + 1;* b% X2 H N c% z
end;
2 f4 ]# D; ^5 V& |4 U& R% i" N @.CurrIcon := "drivingHome";6 @& W9 Z3 x9 g; a
@.DrivingHome := true;
5 x$ k& r: k6 S+ r8 P4 G! J end;
' S, N# g2 [0 C# v else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 \& T9 l! i* S9 I0 Q' K! ] part := @.transpOrder;" w( w+ I5 N$ H! n
part.move(@);-- load part
p4 Q! j7 ?2 K @.CurrIcon := "load";& c2 r7 [) ~9 b0 \' F& Y+ {
GlobalDistObj := part.globDestination;
# |5 x. B4 ^) W, r( t: ^ assignLObj := rgmanager.rgAssignL;# n' v: V3 b, K9 F4 O
row := assignLObj.getRowNo(GlobalDistObj);
k+ B5 A6 x7 X2 L' T; ]1 z3 N0 k if Row = -1 then -- since 70
, I1 r6 S, M \, u$ J/ ^1 D0 w' F2 R if lan=1 then5 x' M9 W: N. ?" b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ h- i& p* C9 { Q P
to_str("in der Andockstation: \"",?.~.name,"\"")); a* H2 E5 J0 Q/ h
else
7 A( @6 v7 D* ?1 x8 W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 l+ ]3 R' x1 `$ a, j+ k
to_str("in docking station: \"",?.~.name,"\""));
/ f7 C: E: j' L9 r8 w end;4 D3 s* J9 U- O1 Y+ H8 f2 J7 v
else
/ t) l2 d9 A& Z1 U5 s' T @.Destination := assignLObj[1,row];, i) a3 j# [) k# ]) C
end; 7 X$ o7 u) u2 _ _
newDirection(@);. K# R# S |, \1 `6 o6 }- S
@.HasOrder := true;: M3 T; s7 {: B2 T1 p1 X
end;
$ c& w& n; v3 l& M& T0 ~$ J6 b end;
3 A% l" r" B i+ x1 l$ c- tend; -- of the method
& a( l2 a* y3 d/ d3 o |