/* called by: entrance ctrl of the object 'track'
; {4 {( e4 w9 u/ @! w*/8 x* J' A% K7 g- b$ x# F) K
is1 k( Y, X; T, f! w- t* \ d9 B1 S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( _, F5 g1 t7 C. ?" |7 r& u
do# n: X2 Z. w; ^9 p O
Lan := rootfolder.Internal.Tools.AOLlanguage;- E7 v% Y0 h( r/ ]1 z- y+ a9 Q% _
if current = @.Destination -- else return
, j; U1 l# Z% e! Y then8 V* R$ b0 e0 N# _
@.Destination := void;8 g8 U; v3 u O: f/ ?- w6 c; C
if @.occupied then
; p' w0 p5 S9 c% R! o part := @.cont;$ b) U; p- }7 T' N
@.transpOrder := void;* e" w- l6 D* B. }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' k, r3 f# ]1 T( n- h, p+ w x4 ~
@,root.eventcontroller.simTime);
: }7 q: O* A, Z @.HasOrder := false;
+ J! t1 p) K( z; c: D% g @.DrivingHome := true;
0 e7 m. \& I& C1 c% h V8 J rgManager.tryToStartTransOrder;- ~, U- h& C, f; v$ }
if @.Destination = void( R- `4 O0 D/ B4 ?9 a
then -- no transport order for vehicle @4 e B1 U2 \" s" t9 T% {+ u% `
@.Destination :=
# |7 b; m% Y0 c1 h' X3 J7 d3 o rgManager.nearestFreeStation(@,track.~);
0 W1 }6 Z' R; h newDirection(@); 3 V5 K, M% I6 P4 e( j8 `
if @.Destination /= void then
8 i8 o! D" }6 [! w @.Destination.NumReservation :=2 H" W% \* o) _$ X
@.Destination.NumReservation + 1;
$ E3 {7 }, v0 k7 f) v end;4 I5 S1 I# L6 Y. r$ T. x
@.CurrIcon := "drivingHome";% U) J; Q C: V, u4 c7 g3 j
@.DrivingHome := true;
6 s% H, ]+ K. X, t, O, p, Z% l end;
8 [$ a e. Y* D r3 ]$ ~! I else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 c4 T/ _: r, |& f$ i0 A
part := @.transpOrder;' X4 C7 V3 a, X" h7 x3 W
part.move(@);-- load part
2 i- B' a/ ^5 j: l @.CurrIcon := "load";/ X3 E3 @0 y: ^- U0 z
GlobalDistObj := part.globDestination;+ Q7 g% }" ~3 s# b9 M
assignLObj := rgmanager.rgAssignL;2 e( T4 K, V3 Z
row := assignLObj.getRowNo(GlobalDistObj);9 |* Z1 c1 C% }
if Row = -1 then -- since 70
7 T5 x* P; g' T& L- P0 B if lan=1 then* x4 L8 h9 u* t M5 u p# t" V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 y9 k3 E) U1 u1 L" Y" k
to_str("in der Andockstation: \"",?.~.name,"\""));
/ t, m) b8 I' J1 F" U* v else" }7 f8 w8 w8 p2 g2 _. @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 p. \, x, \& @8 I to_str("in docking station: \"",?.~.name,"\"")); 0 M* H' k, \2 Z$ _2 B" S: i, D( Z
end;
$ Y& `0 i( ]% |+ ~3 A, K. c/ S. d else
" M; n6 }. ~8 t* y8 E- y2 c6 E @.Destination := assignLObj[1,row];! q4 B3 b, P& g6 W! U" r: }0 D
end; * x1 {1 s. u, b5 ]; I% M
newDirection(@);$ E! ]3 k/ I+ K. v! L/ b
@.HasOrder := true;
$ Q n# a; b f( g) h& Y end;
8 p+ H1 `4 J( i: b% p end;% }! s2 ? T+ a% @9 S: q6 Z
end; -- of the method
; E3 {0 O1 i5 b) v- m* t |