/* called by: entrance ctrl of the object 'track'
9 X6 M3 P4 C( F3 m+ U*/) ~* z& a; h; Q2 { a$ F) d9 Y* C
is+ s) n, g. n* n5 `. H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 S/ _6 u% w c9 ?4 q; \do
, N$ m6 H$ j# ^7 }8 i Lan := rootfolder.Internal.Tools.AOLlanguage;
3 J% G3 t- s) ? if current = @.Destination -- else return) y' u" c. T/ d' q/ ~, Z
then) Q- ]0 M; A9 r: ?. z. Q
@.Destination := void;; d; N& ?5 L; ^( O) E2 a$ \
if @.occupied then- Y) L- e0 V& ]6 a1 ?' K
part := @.cont;9 A- `; ]: a' t" f9 J: w0 ^ ?7 t
@.transpOrder := void;
5 ^& `7 u: W- l9 Z) w' m! G( f S' S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 F" A. T0 t$ P& h. { l) Z) J2 r0 A @,root.eventcontroller.simTime);+ q: m4 a6 U) e
@.HasOrder := false;3 H5 u M4 ] t' w! h
@.DrivingHome := true;
. E" M" j) h! h t- z9 j rgManager.tryToStartTransOrder;
( F* F. [& j, a1 H if @.Destination = void1 l" l9 f5 { N" }
then -- no transport order for vehicle @
1 ]# \' ~3 q1 ^0 Q7 x9 D8 ^ @.Destination :=
8 b8 ]5 A; b' A3 @5 V rgManager.nearestFreeStation(@,track.~);
6 ]3 g! k+ V ~! w newDirection(@); , d4 ~! u* D* {; z
if @.Destination /= void then0 q6 H2 ]! |7 S" b; A" J6 V
@.Destination.NumReservation :=
4 k5 ^! p+ U1 e0 `1 ?$ J8 l8 ?9 Q; Z" q @.Destination.NumReservation + 1;) }. g8 \% M3 ^( ?5 X2 M) m
end;$ [. K Z- b9 V( E( z( K
@.CurrIcon := "drivingHome";
# x/ N; {9 i. O0 r( a1 ]# u) W @.DrivingHome := true;
' t# K8 I; `; ^ end;
/ ], f, {/ e( Q9 [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, O/ l5 ?$ d" w0 f8 h) _0 ^( s part := @.transpOrder;
Z9 r h5 O# [0 F: L part.move(@);-- load part: P. q8 k6 j# Z* e
@.CurrIcon := "load";' q0 A* j, L6 K/ v) d$ Y x
GlobalDistObj := part.globDestination;" U0 S. @ x, A8 \
assignLObj := rgmanager.rgAssignL;# @# {# U1 y6 S `7 i. y
row := assignLObj.getRowNo(GlobalDistObj);( f5 O( G/ E# N* j( x1 W
if Row = -1 then -- since 70% T0 @, T1 \8 W: h
if lan=1 then$ a2 H+ g! t- W/ M$ X+ x H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 G0 W; I' [# j4 C9 N i% s) U; A
to_str("in der Andockstation: \"",?.~.name,"\""));( U2 d/ h/ B2 |: n8 v- u& O
else2 Y- g5 { z; R. y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% q7 v; c& E/ H+ s to_str("in docking station: \"",?.~.name,"\""));
y+ X" y4 ^5 Y: k9 Y6 _( C) X1 B end;
6 t7 [$ P! }- {' C8 x" x% ? else
9 |3 B2 _' \& f) m8 M7 @1 W3 b @.Destination := assignLObj[1,row];
* Y# b7 [+ t* ^7 L7 a end; ( p1 `' j8 S) X/ |1 o3 L
newDirection(@);
! B; v$ {, Z& L @.HasOrder := true;( W% U: v% z: d g7 s
end; n6 S" L/ B5 m3 S
end;
% \ y; Y- {+ w' n9 s$ @: n8 tend; -- of the method# Q8 F" }0 w" o* c
|