/* called by: entrance ctrl of the object 'track'3 g7 q3 k$ _4 {$ i: G- ?7 O
*/
5 ^- c8 g9 c% {% h0 q) qis# H8 s: A. w( C" K6 t; R& Y. x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# s8 b9 M& b! x$ C: ~8 n
do
/ o8 N6 Y, j {1 D0 e E Lan := rootfolder.Internal.Tools.AOLlanguage;
/ T; O! L3 H7 x+ W( p- G if current = @.Destination -- else return
0 e) k" S. n. a: }# t" g then
7 J/ b7 e& a- f: G% f% n: n, V% v @.Destination := void;. O, g; V. W8 C b3 U$ ?4 Y
if @.occupied then
5 _. n% e$ g1 v! N( n; M part := @.cont;
# y2 |. l) ^2 o9 Y" h# l4 j @.transpOrder := void;
# O( K; f/ \5 e: B2 U: c4 c p% S( { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 e8 L# H0 F, T, Z: J @,root.eventcontroller.simTime);8 p/ _3 p: V: _ |
@.HasOrder := false;4 I. k/ B( [! Z, ?$ [6 X) Q
@.DrivingHome := true;5 q7 K& E; ^0 k1 T, k9 U
rgManager.tryToStartTransOrder;
0 L- s7 @; O/ a. p a2 i' j* n if @.Destination = void
1 d6 F+ [. Q7 C" V" n! D then -- no transport order for vehicle @
, f' X- _7 y% A2 Y5 @5 S0 b0 G; A/ b8 v @.Destination :=
1 v3 r3 d- b4 |# U( K, e% s rgManager.nearestFreeStation(@,track.~);8 R( m' K4 n* y" h h. i
newDirection(@); , U& R5 ~3 t1 U2 a
if @.Destination /= void then G9 D0 t: }% X- ]' y2 A1 \ |
@.Destination.NumReservation :=6 ~* X: S1 S; N, y5 w/ Z$ r* j2 a& X
@.Destination.NumReservation + 1;+ m% a) A) k0 y5 E2 l
end;7 c+ @* M. @! @* }. J1 b
@.CurrIcon := "drivingHome";; Q8 r8 A6 g! Y, r1 I
@.DrivingHome := true;( k, C7 ?. v; K2 a0 k
end;
2 M4 k% W( a% f& L4 M! o! x& x- X else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# v! [; D0 P9 \6 v part := @.transpOrder;. l, n$ L- j1 n& T) h" t
part.move(@);-- load part; `5 i. X( ?0 {9 y* w7 B* n$ v# [
@.CurrIcon := "load";. d. I! T4 I4 P: V
GlobalDistObj := part.globDestination;
8 P- i! D; G3 t assignLObj := rgmanager.rgAssignL;
2 c# _/ q# e$ n( @( N0 u5 f row := assignLObj.getRowNo(GlobalDistObj);
) G4 _, Q6 O8 N' ^) F0 A# h8 l3 l if Row = -1 then -- since 70
/ A3 x# L' ~7 w9 k7 U! A, U if lan=1 then7 Q/ K) g! g% |8 S+ a; y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 q2 E5 ]1 E; n to_str("in der Andockstation: \"",?.~.name,"\""));/ E5 u& W0 B0 k: F$ y$ L) ]
else+ K/ {" w$ k2 r% Q. X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 z9 }$ n0 L8 b9 }7 k* l5 g- B
to_str("in docking station: \"",?.~.name,"\""));
+ [7 w5 L9 r3 n# z8 p4 Z end;, \" Q, x3 h. B; s0 g5 w" a; ]
else8 `9 n1 m* o5 _+ M0 J: J* S/ H
@.Destination := assignLObj[1,row];6 K: {3 \, y! Y9 g8 f+ Z$ i" O
end; - n& p; D M! f- Y& \# h
newDirection(@);
! x% l2 w7 o k8 Q3 f @.HasOrder := true;$ A) y& `; y8 P' X8 _* [" g
end;. V8 L6 H# H- j' Q" ]1 d
end;
6 Q7 T( P. N) `- T/ i1 T1 Q% kend; -- of the method, b$ S- B! W+ r
|