/* called by: entrance ctrl of the object 'track'
R8 K2 }% v; O4 |6 O*/
! Z# p; j, n) m* h$ G- Sis! m4 S3 T" p \# ]9 }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& T, J% d0 F, m5 q. m4 p. o" A( N
do! ~6 U2 {) R( N9 S7 [- E8 f
Lan := rootfolder.Internal.Tools.AOLlanguage;; T j o$ O' n
if current = @.Destination -- else return! i8 e% H. A! D! t) v+ _. v' f
then
2 N+ Y/ l2 |* ~( a @.Destination := void;3 }2 l) Y' M, @+ J' J8 O- U& j8 T3 n
if @.occupied then
2 Q+ w+ w: S1 A( ]* {8 `. p2 O part := @.cont;
0 w0 T ]- ~; H( |" k @.transpOrder := void;
% }1 Q1 F( n+ q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& [# g7 M& t0 A @,root.eventcontroller.simTime);3 \) l1 d: A8 z& \3 H) m! {" h
@.HasOrder := false;: ?$ j% U# p. B
@.DrivingHome := true;( j7 y/ _+ q& C2 [
rgManager.tryToStartTransOrder;- {1 z7 _1 \# ]. P+ R
if @.Destination = void
! r4 u9 o$ f% a, B7 T then -- no transport order for vehicle @3 X) G5 k. r1 I8 y. n3 g- B
@.Destination :=
2 L$ q" w% b( ]7 Y7 I- ] rgManager.nearestFreeStation(@,track.~);
8 x+ G8 Y3 c' e newDirection(@); ! I' M k& j4 |7 E6 I
if @.Destination /= void then
. T9 ~2 i5 ^8 Z; Z9 N @.Destination.NumReservation :=2 H# Z$ O# ?# t" n) L2 s* Y
@.Destination.NumReservation + 1;* }% y/ |$ I( z( j5 H$ P0 [3 A$ X! b3 ~
end; T; T3 X* r# F/ J
@.CurrIcon := "drivingHome";, E( a$ I' V- L+ m' c( r
@.DrivingHome := true;2 F1 G1 N4 h6 J" t
end;
) F, Z7 R# S3 h, D5 `- E8 ~# a else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 ]4 n$ ?4 a; V5 S0 e* t$ H, I3 }
part := @.transpOrder; ?, ^7 P0 a9 Y1 R
part.move(@);-- load part3 e0 C9 X* j: K' s) E3 j) f3 _
@.CurrIcon := "load";
9 g' [8 e+ w: s1 {% i# ? GlobalDistObj := part.globDestination;$ e# z/ ?: g' h$ k0 u5 k. P
assignLObj := rgmanager.rgAssignL;
" V0 J0 L P- ?' u: S, a* {, } row := assignLObj.getRowNo(GlobalDistObj);
0 }6 X) }' [% v4 z; [* r. r: e W; U if Row = -1 then -- since 70
8 k9 z8 @0 S& D/ K if lan=1 then
' D5 o! r5 }" R6 C8 _6 e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ k/ K3 e4 y# l4 w to_str("in der Andockstation: \"",?.~.name,"\""));
( l5 {0 }+ C! R9 G4 J else
2 C' g0 T' M: \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 A* b9 q' C: j# X2 P w( L to_str("in docking station: \"",?.~.name,"\"")); 2 P4 ^# J( d; E5 K( z9 S$ T" u
end;
& E2 K7 `* U+ b! g else4 n; I+ a% A) G- T
@.Destination := assignLObj[1,row];
, m( r# ?/ ^2 d- E1 A end;
8 A+ ~$ h: k! O2 i0 t newDirection(@);; f# c$ \% h. k/ J' `* Z
@.HasOrder := true;3 K- [0 k2 N" I0 E$ p/ k' U
end;- j) X0 y" B4 Y7 [1 v3 t
end;
8 P; g2 V; f- n$ m; C3 eend; -- of the method
2 `) q2 W0 v3 X% ?& F# W3 }- b |