/* called by: entrance ctrl of the object 'track'2 j1 q( ]5 R" I, w8 Z3 Y% g
*/( q$ w/ R: H& X
is
9 j) i5 O, Q/ k8 h part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ y; Y* d7 j9 k3 d! |$ m
do4 b: h6 }. s4 ^( ]/ @5 I
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 F& Q& e. R1 Y9 a/ ^! R- b2 V% _ if current = @.Destination -- else return' c4 L8 g0 L" k# \
then
9 ?; I& q& o7 w @.Destination := void;
* l4 U- T1 v. k7 e' K% L if @.occupied then! v/ c% C1 |7 B: d G
part := @.cont;# }8 z, G& a; ]# X6 @ v* c
@.transpOrder := void;3 y3 s- Y$ Y! S2 J7 Q# H# Q) j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# O7 a9 A( g8 d( D3 k @,root.eventcontroller.simTime);
4 k0 C, x' \$ j8 H6 I6 e) L% [ @.HasOrder := false;: N3 G# `& Z1 Q& }& M o
@.DrivingHome := true;
3 x9 Y! b/ X% n: E' \5 j rgManager.tryToStartTransOrder;; G5 n4 Z- p+ m; I( \6 b
if @.Destination = void% w q3 v9 P5 ]& j$ I7 M
then -- no transport order for vehicle @3 Q* z9 ]. F0 X1 e; G
@.Destination :=! c, k& q( _; y0 R1 C: O+ V" X( H. Z
rgManager.nearestFreeStation(@,track.~);
- j8 p2 I$ W; E0 n7 q+ r. M% Q5 W newDirection(@); 3 S6 }: `% _+ Z+ K/ w$ q
if @.Destination /= void then
; l+ }' J. c, I# C @.Destination.NumReservation :=6 v# j$ ?4 \. `
@.Destination.NumReservation + 1;
0 s7 v( p0 E! V- m: S: E end;
/ s! D7 S# D( m3 y @.CurrIcon := "drivingHome";
/ V* G$ l+ L3 \% Z! {$ e/ Q6 r @.DrivingHome := true;! y2 P" w+ V: U0 d! x" [
end;
- {& r; @* Q. y: T) X6 H, N else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: a" q0 I6 A& t2 t. X% W w part := @.transpOrder;
( O" ~- B* t7 B# h5 H4 a O part.move(@);-- load part: Q% k1 ]1 ]; E
@.CurrIcon := "load";
; k- [1 B1 F4 I: B6 t/ a+ P GlobalDistObj := part.globDestination;4 g4 r1 I) W+ l& A
assignLObj := rgmanager.rgAssignL;
, w* E/ a1 O6 e3 J3 o row := assignLObj.getRowNo(GlobalDistObj);7 p) n2 y- h# Q* |% l0 A
if Row = -1 then -- since 70/ b: _' {% N- W
if lan=1 then
- T" Q, z! B% F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 ^: S) O9 B: o0 Z0 @! W to_str("in der Andockstation: \"",?.~.name,"\""));* C2 O9 ]; G$ X5 [! b0 R
else$ f" G$ b \0 g% z. ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 q% T' D, y0 H% E8 n( w( b$ k4 k to_str("in docking station: \"",?.~.name,"\""));
' p/ B @# f w5 A+ A end;
) F% q6 K# S& K# I4 p# X else
, }. X0 d- K' b3 V8 y @.Destination := assignLObj[1,row];% b* y3 a! b/ g$ p# O- g' N
end; 6 T+ V( g8 S: G% \) h/ I& ]% P8 W
newDirection(@);
! a% N! n. @+ f @.HasOrder := true;
' H ?4 k/ |2 U, Y* ^6 T end;
3 y7 ^" S, M( h end;0 N. Q% S+ Q+ L0 g/ B
end; -- of the method( z( ?3 w2 d+ W5 O* O5 d6 E3 ^
|