/* called by: entrance ctrl of the object 'track'
8 g d$ a) I6 P7 Z* M*/
/ w2 ]' q2 V. |6 ^- wis
. d8 N6 p U1 E, ~+ R+ r+ f1 W! r$ D part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 q7 }( E9 i- Y% y) C; A
do
, y0 V% _3 W, y Lan := rootfolder.Internal.Tools.AOLlanguage;
) z; s0 k4 h' u- H z$ N6 D if current = @.Destination -- else return
* Q; U' Y. Q+ I1 j then1 \$ I" y6 C4 d. n
@.Destination := void;9 l# ^) W) Q0 t. S1 f% w
if @.occupied then1 R+ L, Q; C/ e/ h$ j: X
part := @.cont;3 u% f! [% f& i( x
@.transpOrder := void;
; S6 \6 Y& b7 `6 S& E) _1 p2 [4 y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
_% s/ U. ]7 M @,root.eventcontroller.simTime);! x# A7 Q+ Z9 W* Y7 j* l' `
@.HasOrder := false;
* ^( P0 {9 X( ~% J. l% w @.DrivingHome := true;9 s! ]2 a, A9 ~, y+ b
rgManager.tryToStartTransOrder;
: r; g' I6 _/ ?% K8 N+ ] if @.Destination = void
- j- y1 ^: J) V# J3 k9 P: a then -- no transport order for vehicle @9 j ?" P* Z) A2 g& F% W
@.Destination :=
7 X0 s8 m# @: F9 o b4 i$ q rgManager.nearestFreeStation(@,track.~);
6 h# B1 v* ~$ ]1 ]3 E5 U* T. ^; ~ newDirection(@); % I5 @9 U( v2 ?$ z
if @.Destination /= void then
6 I) m" C; O b* a! X& U0 L @.Destination.NumReservation :=
+ U. Q+ \' G; N$ U; R( @0 E9 }* s) c @.Destination.NumReservation + 1;
8 D, p4 s7 F5 D0 _' G end;1 U! @4 v# b: X) t; {7 |
@.CurrIcon := "drivingHome";3 M3 F3 H. B. M, {5 ^6 T
@.DrivingHome := true; r1 ]% k# d2 J' R. e5 s+ m7 r
end;* S4 E1 r- g' b; _$ K3 @9 S, f1 y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 ?2 e( g* O1 R/ N8 b9 n5 W
part := @.transpOrder;$ K+ U8 u* v5 a
part.move(@);-- load part
: q: H' m8 M z! u @.CurrIcon := "load";! Z9 K% z7 _4 Z9 k9 d
GlobalDistObj := part.globDestination;8 s9 E" J( F: U3 {
assignLObj := rgmanager.rgAssignL;! t% ]6 w! c: [3 \" p, b: O
row := assignLObj.getRowNo(GlobalDistObj);9 {0 D/ M- {% ], I* z8 ` }6 f5 x# G
if Row = -1 then -- since 70: y) K& D. a3 P2 ?+ @9 ^
if lan=1 then& `5 ^! P) W- c6 O9 u) K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- r9 l5 A8 n! @1 A! ^
to_str("in der Andockstation: \"",?.~.name,"\""));9 _' K4 `. v: z5 j
else
! m: K! [/ \, }7 Z3 T) f7 I! O& }/ z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 p7 U% o5 `* d7 A3 l to_str("in docking station: \"",?.~.name,"\""));
9 ?! F* Y- b# H end;4 b8 y, Q( F# `3 {0 v1 i
else, p# Z, ~3 D3 w2 H( H B
@.Destination := assignLObj[1,row];' D! F* t, u( X+ E! F
end;
: ?, T# N+ N/ G6 g& J% ], B$ r newDirection(@);. z$ @) _" w3 c6 f. D
@.HasOrder := true;
" b: z* |6 E* E9 ^. i3 D end;
2 C9 H. e g4 S end;
. }+ I; ^2 b# b: w! y. e* Cend; -- of the method% P! i. m. Y& q1 j
|