/* called by: entrance ctrl of the object 'track'
V( L- ?% b1 t! A0 ^*/4 _- v& I) m k$ _" {" B0 ]* _* b1 c
is& _. H3 J/ v1 e2 H F0 g& _6 s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) `3 \, |+ D* L$ P6 O( q6 \( fdo
. ?3 ^- E2 N" c) u% `! J4 m Lan := rootfolder.Internal.Tools.AOLlanguage;) e( O0 I" C5 x6 @ f% A
if current = @.Destination -- else return8 j1 T. s1 F8 x: I
then5 F# `5 e+ S+ g9 N' p P" x
@.Destination := void;4 D8 Y" P) N3 [' B7 }1 U7 @
if @.occupied then
( v- U7 ~ w) \" {5 m part := @.cont;' {, |5 P! ]1 b* P* G m: P8 z
@.transpOrder := void;) Y5 p! y$ S+ p* ]$ f0 I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: @. }, |% }8 T4 @3 Q: v
@,root.eventcontroller.simTime);
+ {2 T& q. @9 p+ A0 L @.HasOrder := false;
, M& H" H1 f7 z. }4 {1 Y @.DrivingHome := true;
6 d# l* p) d$ t0 H0 `1 X rgManager.tryToStartTransOrder;! A9 V- a' e# i0 S
if @.Destination = void5 C' Z. }8 n0 x$ \ b: |5 o
then -- no transport order for vehicle @
: c1 D4 f! Q& g4 K5 { i @.Destination :=
, g, r5 x3 g3 F" O rgManager.nearestFreeStation(@,track.~);* M7 q. x; ^% d, N
newDirection(@); * W h) n; x1 r2 j" z4 ]+ f: R
if @.Destination /= void then' W+ ^. A# ?) \7 h
@.Destination.NumReservation :=2 A+ K; Q+ H( R' J9 e6 `
@.Destination.NumReservation + 1;' K, T$ C5 s: w" b7 f& G ~8 A
end;
2 T! I7 p: \8 i$ e/ n @.CurrIcon := "drivingHome";
" a: E5 o' r% f* M @.DrivingHome := true;
0 a0 k0 A$ i0 @- |6 X1 g end;; @- L; [2 N# O1 n* f+ k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% V( J `+ q; s/ r* G% A part := @.transpOrder;8 b0 S* F( X& c$ u
part.move(@);-- load part4 e- P2 k) x7 ?
@.CurrIcon := "load";# t" {0 r1 A& ~1 U: H2 M7 L% _* \) M3 z# N
GlobalDistObj := part.globDestination;+ i, t0 l* A2 {3 ~3 d0 I; \
assignLObj := rgmanager.rgAssignL;; m- T8 B1 ?0 Y$ D, c2 n
row := assignLObj.getRowNo(GlobalDistObj);
! X1 C0 G8 h0 R/ J if Row = -1 then -- since 70& S+ Z- {/ T( ?) K2 w6 T
if lan=1 then: E* {1 c8 b8 F# v) {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 H0 }7 y `! d
to_str("in der Andockstation: \"",?.~.name,"\""));. Y% F# @3 P1 k3 l
else
* ~# O, @+ ^. E* X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& `/ d2 L% T) T. z& q# M4 W to_str("in docking station: \"",?.~.name,"\""));
; B6 D; e7 C% Z$ N2 {! Q" X1 `% ` end;' Q' k9 p/ b: [" i K0 G
else
N/ j: r; y) }8 M1 A% v2 f. r @.Destination := assignLObj[1,row];
0 E+ z" X) b8 n5 x end;
X' E$ ?& J! L2 b newDirection(@);
7 { s* m* L; d$ J1 p @.HasOrder := true;* ]# f) ~8 ]/ m+ t! K8 e% a: U2 N
end;4 B$ c6 K) J) m+ i& p% U! h0 L
end;8 Q( o0 W. e. X5 R/ w
end; -- of the method
9 n2 e; _* m0 i3 h! T |