/* called by: entrance ctrl of the object 'track'$ I1 D! R/ i6 w# u. N7 C6 R& m
*/* f0 t' ~, K% e# r2 q+ U
is
, N, w) ~8 |2 V8 f; x" J4 B' L part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ H( O' N( B4 l n7 Wdo
8 P; B, x' T+ C) E! u/ G) j+ y Lan := rootfolder.Internal.Tools.AOLlanguage;3 D' ?9 S4 i. f
if current = @.Destination -- else return" h# M3 S( ^! E0 a
then* e+ L% S4 u; |8 m& a6 S0 R
@.Destination := void;
) Z! t/ j' @ }0 g5 @" d2 A if @.occupied then
( N# C! [7 F4 D2 U& }" ` part := @.cont;
. ]# s9 u" B/ d1 f5 I+ Y1 `, u @.transpOrder := void;
% P9 ~4 a$ k6 s6 G8 L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ w; v# s/ j$ P* {
@,root.eventcontroller.simTime);/ C3 t* p2 B! _. Z3 n
@.HasOrder := false;
1 ~5 O7 g9 o9 a" f @.DrivingHome := true;7 ^, v$ U% }0 @2 \3 K# c- h
rgManager.tryToStartTransOrder;
4 d! S6 q$ t/ i3 o9 ~; Y* L5 o3 v if @.Destination = void$ _8 U1 R! M, K* b' _ K8 H
then -- no transport order for vehicle @
; P7 T( I# L% V/ Y# w- }# ]. e @.Destination :=
& M, }4 N8 m* D2 W) v0 ~ rgManager.nearestFreeStation(@,track.~);
) N/ m. y6 I6 N" w3 @0 a newDirection(@); * J( L6 o3 d6 x6 Y9 S& S; z4 D) U
if @.Destination /= void then% G2 @9 g1 G8 o( A" K. n
@.Destination.NumReservation :=
7 q% K/ i3 S7 X/ [' E4 [3 H @.Destination.NumReservation + 1;& \4 S8 t+ g" M, Z5 m K/ `
end;: \7 i' E; C: t8 m$ E3 Y' q
@.CurrIcon := "drivingHome";
' _3 E/ S5 ~$ w0 c. } d @.DrivingHome := true;
1 K1 I, m `& r" d; ]( `, ? end;
5 r7 r' H: K+ ?2 u! l else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' O3 k t7 @2 H* j- }1 a7 [ part := @.transpOrder;" y8 P4 |5 C) S3 L: g0 R
part.move(@);-- load part
; ?- {9 K$ T- H/ |$ y4 Z, J" d @.CurrIcon := "load";
8 U$ Q, j" T! [1 e GlobalDistObj := part.globDestination;$ H/ N3 r& p) M! f5 q, k
assignLObj := rgmanager.rgAssignL;
- h- D) |. l8 P5 g u. z8 r row := assignLObj.getRowNo(GlobalDistObj);& V0 j( { H7 L9 g l5 W' i
if Row = -1 then -- since 70
: f0 s! ]. b( P- h: R, M if lan=1 then" x! t; u: B* C4 w0 p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 G) ~/ C9 y" q: s
to_str("in der Andockstation: \"",?.~.name,"\""));
2 B: F, [6 I3 I9 ] else: f3 ~$ F; g$ i# L9 z3 @7 ^& n9 x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. o9 l9 a& l( t5 ~) s to_str("in docking station: \"",?.~.name,"\""));
/ y2 F, Y3 F) P# I! u end;5 W3 M* u/ _. g) r/ Q8 w6 f9 W
else9 C1 E+ R( l* R9 U- G4 |' i
@.Destination := assignLObj[1,row];' o) v$ Y% T2 `- M0 j
end; 1 G5 }0 U: T4 N3 J: r/ W& [* r8 b
newDirection(@);
7 i* W3 H' i2 R. M$ T @.HasOrder := true;5 p& Z1 _, }) K1 p* p1 L2 e
end;* H( _3 T/ c5 I. j2 E7 ?/ w
end;5 ^! L0 a* L* d$ a8 K' \
end; -- of the method
' h2 |* ^' u$ ~% V |