/* called by: entrance ctrl of the object 'track'
! R, Y% v, W4 s% K, i( H8 R0 M*/. a1 g5 d* S7 h& x+ ` D/ S) a+ m- v
is! l% L& i% N9 W& U5 o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ g7 b8 ? x4 t( Jdo9 Z7 F$ l0 d9 @3 I# Y& {
Lan := rootfolder.Internal.Tools.AOLlanguage;+ Y9 E# t; P, V' }3 M+ M* Y
if current = @.Destination -- else return
. p+ [. x% e- T& z& G then+ y* O/ x8 L! i$ S
@.Destination := void;1 N7 M" y7 _6 S, Y( d
if @.occupied then
u, `" e+ G& s6 m$ T/ \+ A* P part := @.cont;3 s+ \$ y2 y7 ~! ~* w; @( X
@.transpOrder := void;
, k1 G0 K9 a. ?- K8 Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% f9 I8 Y. i) I, D
@,root.eventcontroller.simTime);- _# W# X7 J* x* X0 n
@.HasOrder := false;2 m' a6 u; a7 [) b4 S
@.DrivingHome := true;5 a" [! J- h& t
rgManager.tryToStartTransOrder;
1 \, m0 y" U1 V* ]; f8 i [/ V if @.Destination = void
6 J |7 B; l2 W7 Q then -- no transport order for vehicle @( u1 ?' j6 B3 ] B/ A, H9 m
@.Destination :=: V/ r- n1 o3 a2 W2 F
rgManager.nearestFreeStation(@,track.~);8 v: }! V( r: ~4 n" J
newDirection(@); 8 {9 L4 w) E. X" @0 t" S1 w9 _ `
if @.Destination /= void then
; x: @+ n6 z+ V0 A# G! Y @.Destination.NumReservation :=
1 [& [1 L$ Q$ N: _' |3 u @.Destination.NumReservation + 1;/ t2 v. N+ \. x; R) j- i6 G8 U
end;4 b0 v$ D$ |' X1 A
@.CurrIcon := "drivingHome";
9 o5 c! Q( T8 @9 P6 O% H0 J @.DrivingHome := true;
4 W8 r, j, Z1 R' g, K! b8 N# S end;
O$ O5 g& @" N! p9 e# k else -- the vehicle @ is empty, both vehicle and part are in the same dock station' V: O& _1 Y/ P. c" R
part := @.transpOrder;$ U4 q* M4 N: y
part.move(@);-- load part
3 O8 b. Z5 {( T) u! r, @, I @.CurrIcon := "load";
. |+ p# L: c3 l& u GlobalDistObj := part.globDestination;4 c. y' J8 V+ s/ I3 v1 L% W0 X
assignLObj := rgmanager.rgAssignL;( G$ w4 s1 N/ K4 P
row := assignLObj.getRowNo(GlobalDistObj);5 O' C! i) s" K! k' Z
if Row = -1 then -- since 70
0 \ U8 V5 Z* }6 e if lan=1 then) C$ q% I8 E) x7 ~- m* ^) E. u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, `6 m9 S' Q, [) u* F4 ]
to_str("in der Andockstation: \"",?.~.name,"\""));
7 t0 q2 E/ @% f/ ]& a else
% _5 p) e& N/ q2 }- p! C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: [: j2 b; X n: ]7 W
to_str("in docking station: \"",?.~.name,"\"")); 2 F. Q$ ~$ e4 U
end;
1 W8 f+ T; L5 q5 u2 {8 j1 n! b' { else
# W& Z0 N a8 e, {2 ? @.Destination := assignLObj[1,row];! C! X5 w1 s4 M
end;
. S# S5 j( Y4 ]" \ newDirection(@);$ @9 J4 ~# P' T& u& ?4 c& q
@.HasOrder := true;6 D. M. F# d% c( F5 B* |& G
end;
( B9 m0 ]( A `; X* C* L, y end;
6 H# x( B9 M; Fend; -- of the method/ b- { X3 B# r* X/ D+ F; y* u
|