/* called by: entrance ctrl of the object 'track'% R# E% y. {6 h! Y
*/6 m- Q& p W0 d
is
4 e( O1 O* q3 d' P part, GlobalDistObj, assignLObj:object;row,Lan:integer;. C7 i$ Z7 T3 j% }! _- f
do
/ v2 c2 @& L3 s& K/ A& R4 M Lan := rootfolder.Internal.Tools.AOLlanguage;/ V/ x3 ]+ P8 i0 ]$ u5 W* s# {
if current = @.Destination -- else return
. E2 o/ ]3 F* T( ?2 t8 H# v then
}. Q4 f$ o6 { @.Destination := void;' U- e) q6 |( e, G8 W
if @.occupied then
% X2 G1 @, O: }2 d* k' Z! S1 ?+ j part := @.cont;# B- u8 d( A5 k, F
@.transpOrder := void;
6 s/ }3 c1 N( \* s c( y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 W8 p" Q9 N, c1 N. y, x @,root.eventcontroller.simTime);" @8 K' Y, X; l) Q+ T! x
@.HasOrder := false;6 E, A) x( S d9 r, y1 r; H8 p
@.DrivingHome := true;
( o' t" I& O, Q! C h. F4 C, e rgManager.tryToStartTransOrder;
! U& O8 p2 ?6 X# Z; i/ U if @.Destination = void
: A$ g9 {' s1 _ then -- no transport order for vehicle @8 J5 G$ D# ~1 O* \
@.Destination :=# {1 m7 \+ L9 C v8 F' E x
rgManager.nearestFreeStation(@,track.~);0 {0 p9 m+ \0 ^( v& d
newDirection(@); + t, T }4 o; k4 s* \ v: }
if @.Destination /= void then( }" `: ]* W4 G9 }# [' H
@.Destination.NumReservation :=# i- f4 g3 S' G) }; {
@.Destination.NumReservation + 1;
: w/ a$ |( C, O# O2 m& ?* b end;. m V: W! v+ {! e
@.CurrIcon := "drivingHome";1 P4 t! T/ d: W M* m5 |, d3 J
@.DrivingHome := true;
, \ c9 T4 j1 ?, R3 w9 a end;
6 `( T6 ]$ K3 e4 C& x$ A else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 Z5 N2 T" d% \( d: ~) k
part := @.transpOrder;
$ V5 ]3 a; b' ~ part.move(@);-- load part
7 s, l+ M0 e T @.CurrIcon := "load";5 a9 O# A0 q, u9 s" Q' r
GlobalDistObj := part.globDestination;) S6 a: k" W H, F
assignLObj := rgmanager.rgAssignL;
" `$ O9 t' i1 d& Z/ W row := assignLObj.getRowNo(GlobalDistObj);6 d- J' S% T9 Y% y
if Row = -1 then -- since 70
6 ~ C* D/ }3 U9 Q! ^9 F, T if lan=1 then+ n4 j; F8 C3 y$ ~5 G" W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 y+ \0 U* g! j { to_str("in der Andockstation: \"",?.~.name,"\"")); i h$ w2 F7 F. N# Y$ V7 x2 J( Y
else
" F; `! [: J# B: w8 l* {+ q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* H' T1 V4 B. [0 \: y( a
to_str("in docking station: \"",?.~.name,"\"")); 8 F% J, a8 @3 @, d
end;* o$ }+ J8 a* n* R* u/ t s
else
- N( M% y- M. [. q1 b* ~ @.Destination := assignLObj[1,row];& ^1 L9 `7 z' o- A; t
end;
; X' p) l; Q3 i% W; F newDirection(@);; D3 W; ]+ R- N& J; {
@.HasOrder := true;
3 |: Z; S2 Q& L- d8 n# ~4 I5 D3 H, l end;$ h$ l/ j% K ` u3 ^
end;
. G1 G& B, d: b4 \end; -- of the method
g4 H: ]9 g8 u9 {. u) K$ A6 |" M |