/* called by: entrance ctrl of the object 'track'$ U" N9 ?+ N! x6 I$ F
*/! p$ T2 |$ K3 X6 b: c0 r6 r7 g h, b
is, X5 o6 I5 N+ i; V1 z/ t/ s" n
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; O/ t. u' w4 Y8 g, N- e' w
do( ]( H1 Z/ E* {5 ^( z
Lan := rootfolder.Internal.Tools.AOLlanguage;0 I8 Y% G; l$ z t) v% q+ y" @
if current = @.Destination -- else return
4 o/ ]0 U' h& V. U4 \# {8 T then, J$ a& W' X, m4 c/ a
@.Destination := void;
, U. J) k2 K. a if @.occupied then
8 B4 K6 N0 D3 g% {# n! G part := @.cont;
0 N9 @, q; ^# a5 K( T7 G @.transpOrder := void;
( Q+ G2 I; X q/ D9 r9 K+ g: p1 a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 {# }! `6 `8 S3 M0 Z+ j: o @,root.eventcontroller.simTime);
" `. k, \2 y8 {2 N, W2 f* Z; ~ @.HasOrder := false;
0 K X/ n' e. F* ~ @.DrivingHome := true;. g1 N; `$ Q! P- M
rgManager.tryToStartTransOrder;
, z5 m- P" r8 p s& v9 ` if @.Destination = void, M9 `3 F4 W* l$ a( G( K! I2 Z$ M
then -- no transport order for vehicle @
5 W! H5 F* X+ X8 a3 m1 o @.Destination :=
+ S1 z2 x# b7 E( O4 B rgManager.nearestFreeStation(@,track.~);0 P% Y$ _* P2 U
newDirection(@);
* _" h5 ]" J) T! b! S1 s if @.Destination /= void then
- U" K% @+ a0 V- ~) o% j3 c+ g: R @.Destination.NumReservation :=
4 Z1 s* i! l" \3 x% F* H; M @.Destination.NumReservation + 1;
+ H; I. p6 j5 D3 M2 k end;$ `$ n6 G" A) |- A: c
@.CurrIcon := "drivingHome";$ }! ?1 z3 F e( S* j! {- A# `
@.DrivingHome := true;: `4 V; [9 D$ g4 a3 n' H: L) ^7 a* R
end;+ y: @& A: z9 v! ]. d1 [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: d: d H) B' W$ S* L' Z3 L part := @.transpOrder;3 w+ ]* l2 ^3 g( \2 @; }: z' u( j8 T
part.move(@);-- load part' M1 w; c5 ] R3 d/ r. U4 [5 w
@.CurrIcon := "load";
8 D! ~1 e6 [5 C& D( Z GlobalDistObj := part.globDestination;
( d5 q$ C- a$ d: a( W7 j assignLObj := rgmanager.rgAssignL;
; o. I' f8 _8 h1 v2 X row := assignLObj.getRowNo(GlobalDistObj);
5 W- F! _/ x1 e if Row = -1 then -- since 701 c! f G" X9 [# a/ G# y
if lan=1 then) B9 a, n& ]% b$ M9 N4 ^+ v4 W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( t' n e9 s) h
to_str("in der Andockstation: \"",?.~.name,"\""));9 h# u6 B; b5 G3 z
else
6 f7 z. Q! \5 z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ [3 I1 y5 X Y8 S7 t1 [* n
to_str("in docking station: \"",?.~.name,"\""));
) ]6 D/ B/ U; h }9 b end;
; z$ Q$ @+ E; _* l/ q3 @% @6 H else& w8 \' H. ?9 Z, C3 o; O( C( F
@.Destination := assignLObj[1,row];
! k2 n3 L! x5 G8 P end; ) i: ?% \! T7 W' M& l M1 M8 a
newDirection(@);: `' `% p# l! S
@.HasOrder := true;& a$ r3 I/ r- M2 k
end;% I% A- e9 a" A4 Z7 q& M. D
end;" p; \: M" G2 u! `
end; -- of the method
, j6 w6 S4 d( e/ R' N' F& T |