/* called by: entrance ctrl of the object 'track'
* q. ]4 P# R9 p b. u& \8 A*/
* B' Q1 ?6 Y4 `: D P0 N7 }/ Ris
) o# E' V" H" @7 J+ T- g% u part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( F. M/ I8 z4 q% X2 z' i* Qdo2 D& b; ^6 l E$ g q/ ^; b- L8 I
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ C x3 O% K; {" H! n9 X if current = @.Destination -- else return
: T0 q5 L8 C( q- R+ v8 [ then
4 W" s% I/ T X- k. h7 g0 m& } @.Destination := void;
! L# w" a' B9 p: c if @.occupied then
P1 W1 |+ Q5 I4 q# C part := @.cont;
: Z( B" N$ q2 y# R( } @.transpOrder := void;
& o- ?6 ~* V5 x2 Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," j, f$ S- a, V5 l5 F0 y2 I5 n
@,root.eventcontroller.simTime);
2 c# O9 F4 C2 E( p2 r. C/ [7 t @.HasOrder := false;* l6 Q' i: \+ y6 t+ N! b
@.DrivingHome := true;1 [# t W7 X' a4 f9 j, P ]0 w
rgManager.tryToStartTransOrder;
2 o, d% `, @' c, N9 u if @.Destination = void- `# a' U! S# O! f3 f+ {
then -- no transport order for vehicle @
% }! o8 d- P7 |* u @.Destination :=3 N1 {/ @$ t% t4 t1 |. u! S
rgManager.nearestFreeStation(@,track.~);0 ], X% o6 G1 s; L( G
newDirection(@); ! D! z6 T5 R! v* C' S7 p
if @.Destination /= void then
4 j5 Z1 [: [6 E* V6 ^3 O' L @.Destination.NumReservation :=
0 a* V3 }3 f4 P! F1 Q: |: ?- M @.Destination.NumReservation + 1;0 a9 K4 {2 ~! g9 |6 {1 i9 i
end;; S' @$ @/ S4 X( G P
@.CurrIcon := "drivingHome";
, o9 m. a5 o2 r' N" k& ^( V @.DrivingHome := true;* c! e% i& S; m/ {4 D
end;, k& I4 e0 V& e0 C& m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station w8 G, E0 b9 m/ Q2 b% c: e$ Y2 n
part := @.transpOrder;
1 L+ \+ G3 U5 z$ ]; V( l: S part.move(@);-- load part8 N9 |- l( q2 @& c% x! E
@.CurrIcon := "load";& c- n7 B: N: g7 @! p8 s
GlobalDistObj := part.globDestination;
8 P; _# s7 t; a7 m assignLObj := rgmanager.rgAssignL;
2 r7 `6 Y8 o0 P row := assignLObj.getRowNo(GlobalDistObj);
/ D. o: c" W6 K if Row = -1 then -- since 70
9 t7 R8 x5 M6 K1 i if lan=1 then- T r1 u( `' s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" h# t) z6 A, e. R# f2 f) N to_str("in der Andockstation: \"",?.~.name,"\""));
8 o7 i B" F: {- R4 D else; d+ b4 a) n" \$ ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 I. m8 \2 l9 g5 t( T
to_str("in docking station: \"",?.~.name,"\""));
% K" Z" a$ c' t) F# m( O end;" A6 ^% X( e7 u
else
9 R1 m' V7 }0 y8 e, J! B& A- _ @.Destination := assignLObj[1,row];
% d. j; U5 h4 u& O* P) I+ [7 J0 y end; 8 e6 m# }- n( ^% w: _
newDirection(@);
: p! Z' P" m& d& O @.HasOrder := true;
) u8 T; x; v4 `6 D end;6 N& G* s2 j4 k- R
end;: o+ s. B/ y; Q! m+ X- k7 J/ g
end; -- of the method
- n- W. @0 u( U/ P |