/* called by: entrance ctrl of the object 'track'
( x/ i2 X; W+ i0 i' b. f. S*/
# O/ F. C" _0 I, c" ?- O) Vis% \# h" n+ c7 W' R0 _4 v, Q' ~- i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 D( x" o5 j Q# q& m ^# ~
do: |' Q/ r6 n+ H9 M. L4 F
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 V2 m! j) M: e; B/ t0 `- |% } if current = @.Destination -- else return- R0 b% I. B9 L1 R- f# _
then" {; w( P( C7 V' [0 h
@.Destination := void;
8 G8 a3 R# }: v7 \9 Y5 I% J if @.occupied then
7 g. c' w; A6 N7 O' G: p. h part := @.cont;) ^* d8 X0 M& ^8 _* x# o& p
@.transpOrder := void;
1 {6 a7 q( Y- E; M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, f; J( D! z# Z! b0 [0 G" P& F9 [
@,root.eventcontroller.simTime);
: l( } l' s7 ? @.HasOrder := false; L0 X/ M% Y7 A5 x
@.DrivingHome := true;
4 M7 V% b1 A+ m/ I# c. v* W rgManager.tryToStartTransOrder;" n: d& A. `8 H8 d" Z
if @.Destination = void% h, |9 m0 C9 T, R
then -- no transport order for vehicle @8 W5 M0 e! y _3 m, |9 l
@.Destination :=+ @7 b, V: `: X3 @& P1 k8 M$ l
rgManager.nearestFreeStation(@,track.~);% W2 q6 I+ H; k! p4 m1 J
newDirection(@);
7 l# O) T- j3 h) f if @.Destination /= void then
4 r9 |) F0 q$ K0 ~2 [+ D" c @.Destination.NumReservation :=
) T' {; |* y8 P! `" | @.Destination.NumReservation + 1;/ a" e$ [9 _$ i/ \5 q3 ?
end;
0 u0 X7 ^* Z+ u- V' u5 L6 b @.CurrIcon := "drivingHome";6 A3 p# K' x. M4 y
@.DrivingHome := true;: o! @1 u- P7 ]! T
end;3 Y8 N. s7 @' n d" U/ A6 Q. g$ A$ C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" c% Z7 d: r( }2 d$ P; z- I- x part := @.transpOrder;
% J4 n [, p" X# Q part.move(@);-- load part
7 V, ]+ e; g; x; e7 n0 ]; M @.CurrIcon := "load";
6 C5 @: j* e: U0 ` GlobalDistObj := part.globDestination;" n6 j6 O h, n \2 h W
assignLObj := rgmanager.rgAssignL;
q: |( W' n/ L8 o* c S row := assignLObj.getRowNo(GlobalDistObj);. n; w- R5 z3 k" F0 w1 Q d) g* D
if Row = -1 then -- since 70# N- C- G1 W: a8 z& K
if lan=1 then
8 A# Q1 v" z- c9 u( I; \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 R! t- V2 x, w3 N' P" @
to_str("in der Andockstation: \"",?.~.name,"\""));
2 x! b" j8 p$ I- D9 [ else: \' z# z* H5 \5 |6 v! p' Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 U0 L, o7 b. I" c$ j to_str("in docking station: \"",?.~.name,"\"")); 4 ]) Q2 q4 e9 o0 W
end;7 r4 m2 M" D8 |% d" H$ X
else! F9 h0 Y' U" l! T
@.Destination := assignLObj[1,row];3 Q0 B9 v5 L6 v2 Y/ y, ~3 h
end; 2 i; K6 N7 C3 q
newDirection(@);0 a/ g8 q W \8 ?& ~
@.HasOrder := true;
' `# p8 E/ q, l" T9 p end;9 W6 w, b5 {! |2 l% X0 I- C; p! H' g
end;
8 b; t' t/ P* U7 \end; -- of the method( Q P- b: S! t1 i; m' I# X. p
|