/* called by: entrance ctrl of the object 'track'4 J6 o+ F+ n6 j3 n/ S
*/! h. d; @2 ~" x4 C! Q& d
is
, z; T9 u- m6 f! I5 j3 D# u part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# f& N7 j G4 |9 v3 Odo
5 M) D- X2 n- e- W) j Lan := rootfolder.Internal.Tools.AOLlanguage;2 L7 a2 {8 f" U& h# d# s8 Q, u
if current = @.Destination -- else return) Q+ k1 o( ^& u
then( O4 O z8 V0 h$ H, N
@.Destination := void;6 _' W, _3 a# J& t, `9 u5 h
if @.occupied then' s$ u3 Q: A, D4 w
part := @.cont;
) D7 p! Y7 ^+ A, b @.transpOrder := void;
1 N3 k x+ f9 e J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 _& r' Y! n0 B) f @,root.eventcontroller.simTime);
* }7 X/ r- C% _" u1 I& N @.HasOrder := false;
4 d: j9 {7 d* Z: k8 @ @.DrivingHome := true;2 L1 ?/ @3 |+ Q% L; j( O* n
rgManager.tryToStartTransOrder;9 a E" u- u) E" V9 E! y
if @.Destination = void1 @( P; M: c2 T" _3 v
then -- no transport order for vehicle @2 @ z/ \4 [( O- P
@.Destination :=- n' n: L- e! n3 M0 Y
rgManager.nearestFreeStation(@,track.~);0 N3 s' r; \$ l
newDirection(@); 1 [+ T. T2 P: j" J/ @, R
if @.Destination /= void then
9 O- u( B/ D d$ ~ @.Destination.NumReservation :=
9 u" k1 ~/ `- E! m( Y @.Destination.NumReservation + 1;
' ]4 K# J e' k! t; t end;! f" y ]2 w0 w; m2 q- \: |* o
@.CurrIcon := "drivingHome";' Y8 R- k3 o8 d0 `
@.DrivingHome := true;- ]% @; ^4 g d/ x0 h0 L
end;- w% L1 T! N( T3 N! ?' _) j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) N4 B# j+ @: ]" Z9 F part := @.transpOrder;
^$ ?8 A3 |8 `1 [ part.move(@);-- load part
; o% U* k& o, f c/ C# B @.CurrIcon := "load";* ^8 h% Y0 o* T7 E, A
GlobalDistObj := part.globDestination;
j2 \, X( f' B' ~" h7 z6 b$ }; ^! R assignLObj := rgmanager.rgAssignL;. |$ W4 |% \& Z4 q( ^" c: q1 w; {
row := assignLObj.getRowNo(GlobalDistObj);* O% s( \5 K6 ?$ x8 q
if Row = -1 then -- since 70& t, U; E0 q I- J& x5 ]+ f
if lan=1 then2 j' j0 R9 H4 e" T. I1 ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 ?2 _3 K4 A1 `+ _) T$ K! _( o to_str("in der Andockstation: \"",?.~.name,"\""));
5 l9 n% B' P; G$ X$ C' x" v else# w" F7 P& S+ L8 e% \4 w$ c' s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' J5 N$ y+ n* j! f+ b
to_str("in docking station: \"",?.~.name,"\""));
# O" [: D& N' @2 T3 O0 ^8 V1 H0 G end;/ y# [* I X7 p0 r! u% S8 t* |
else! R, c. M, f, Y- V- J7 i
@.Destination := assignLObj[1,row];. I j0 N& S$ l5 ^0 F* h
end;
8 H' l' K% h$ F. j newDirection(@);* _# C! B) J0 i" z& l
@.HasOrder := true;$ ^" T' {1 k1 g3 O" N7 j: d$ F2 ^
end;0 R$ p7 a( t! F) q' Z+ i+ c; v
end;
! F$ ?. d8 K {+ Nend; -- of the method
8 p+ ^' J% |5 C# d |