/* called by: entrance ctrl of the object 'track'$ A3 y2 |# O. A; k/ O; Q
*/1 Q7 n- N% U( Q" N5 B, f
is
. f* z* v ?3 t4 S8 c* `6 M part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 L- E+ j8 _% b: z; N3 I- T' tdo
! w0 @( C8 L. G Lan := rootfolder.Internal.Tools.AOLlanguage;3 o" A0 f- b6 Q3 y$ q2 S4 W N
if current = @.Destination -- else return2 m4 N) j. f4 A
then
# _3 [+ G0 t7 {! f, I% @* L @.Destination := void;2 H' Q- q5 f4 e- s [
if @.occupied then
9 m( S( B: f1 J( e$ L/ K part := @.cont;5 M- m( k8 V/ O; ?& D
@.transpOrder := void;
2 f4 v! j4 k" J3 A7 l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 F$ @5 M W' i. L: o' H/ r
@,root.eventcontroller.simTime);+ W- k0 s" V& o$ k
@.HasOrder := false;
7 n' | n3 M; n' @6 } @.DrivingHome := true;
. i5 i8 {. d/ U! P' q. W rgManager.tryToStartTransOrder;
) E7 T* O' }7 Y. d' n- [# c if @.Destination = void1 _* ~8 @4 z& O1 e5 `8 N% B6 P7 D
then -- no transport order for vehicle @
( V1 ^- W0 u. C6 i' N4 |0 U @.Destination :=# [* }2 g4 U8 P5 W& l. A6 q8 W
rgManager.nearestFreeStation(@,track.~);0 v& F7 s. c& U& B+ j
newDirection(@); 1 t8 K' L8 v6 C6 U$ E
if @.Destination /= void then7 K: k6 @( P; a% a" }$ u
@.Destination.NumReservation :=1 r$ k4 ?, G# q0 K0 a( `
@.Destination.NumReservation + 1;; W9 _; ]" d% O7 d* N
end;
; G: t! J. [* I- I* r9 S @.CurrIcon := "drivingHome";, S. f( \- b# l1 B" G K5 O' \
@.DrivingHome := true;: b+ x; q6 {2 Z% t% c
end;7 ?6 x2 d# G, S# W n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# y4 y7 Y: [$ j6 n& p" }; V8 H q part := @.transpOrder;) }7 Z" |" X- j' @* F: T7 k5 E
part.move(@);-- load part7 F' p9 i, D% K" K5 u" R& z
@.CurrIcon := "load"; Y4 t/ d* [1 q
GlobalDistObj := part.globDestination;- v( _; W) a. }3 A/ w$ G2 ^! `3 g
assignLObj := rgmanager.rgAssignL;
: A2 g# z2 K, f* p! _ row := assignLObj.getRowNo(GlobalDistObj);9 t% H" w. _5 s$ J1 H; P2 @
if Row = -1 then -- since 70
4 W, J3 M8 v( d% z: Z! W1 y if lan=1 then
, ], o. |$ x0 O1 E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), p. Z" ` s1 l5 P
to_str("in der Andockstation: \"",?.~.name,"\""));
( K5 b& _' `2 C: v+ W0 A7 R else; Q& Y) @- t7 w1 h" A/ \$ k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ e! y- } G7 W: m1 ~: z( ?# U7 P to_str("in docking station: \"",?.~.name,"\"")); / o z0 _' K9 C' T$ w7 I O
end;, h# h- ?# a0 B( C2 l
else
# b* d; X/ P5 {4 F1 a @.Destination := assignLObj[1,row];& C1 t! v, P, Y
end; 2 b1 v2 h8 N. i
newDirection(@);$ n, M$ k0 R) H5 i: U1 r
@.HasOrder := true;
- H1 i; G! z& F( Q2 E end;
6 I) L1 _( }+ x# \/ C: D end;
2 N- E5 z- I* Send; -- of the method/ D3 W. J/ t U) b: t& u7 u2 ]! f
|