/* called by: entrance ctrl of the object 'track'3 j# w% G& Q, d5 s
*/5 o6 ]# }2 {% C- v8 }
is0 s2 `$ C# r$ J2 w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; O1 _7 W: \, J& B( P; C( ?* O
do; x- K4 _8 l& W' y- c$ J
Lan := rootfolder.Internal.Tools.AOLlanguage;- j% j- A- v* p0 U
if current = @.Destination -- else return
; W+ }1 M4 s* k. V9 R! p [ then
& |; a! X" ?/ d+ S; t @.Destination := void;
6 @" G, J# S8 B, I if @.occupied then
4 K" q6 j3 E i" u+ H; W5 x part := @.cont;
9 w& o6 G9 H2 E0 F. f @.transpOrder := void;2 ]! R) `# {# Q2 \+ G: _& z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- r" F$ o7 B7 ~- z @,root.eventcontroller.simTime);
8 H+ g: j4 d5 ~, ? @.HasOrder := false;
+ F) D6 ^; _; {" w9 m$ e: _ @.DrivingHome := true;
, P% ]9 c, {5 R$ v( K+ N rgManager.tryToStartTransOrder;% P- M+ P* [$ G! m* z
if @.Destination = void
0 l% L$ O3 G9 b: k$ X then -- no transport order for vehicle @
! h8 Q" b+ x y2 c2 v8 O @.Destination :=
+ S& O: m/ C/ {0 D* P/ k N rgManager.nearestFreeStation(@,track.~);
G' N2 d- s0 x; h7 c0 r1 N% O newDirection(@);
/ \% k7 m. x( R7 `2 Z6 B' J# Q1 e, [% K if @.Destination /= void then
$ v7 Q! s5 @ F0 V3 S* q4 U7 b/ w @.Destination.NumReservation :=
6 D2 ? y) p7 Q0 B: L$ A- O/ \3 R @.Destination.NumReservation + 1;- n' `$ k. T3 e' x7 i) ?
end;% ]. ^+ Q- }3 e7 Z: Q
@.CurrIcon := "drivingHome";
% F/ \, k) p7 k# j @.DrivingHome := true;
) l2 f# _ G" e( i end;
! g0 j% l3 F2 [/ R else -- the vehicle @ is empty, both vehicle and part are in the same dock station, R; s/ b5 X9 U7 F$ Q6 {" U( X+ c
part := @.transpOrder;' N; K5 Z; h C5 o! D- f7 \8 x. r
part.move(@);-- load part
/ J) T" E, O; m6 P @.CurrIcon := "load";
, o- X8 m" }3 m y& W+ M& x GlobalDistObj := part.globDestination;$ }. t+ k. s) ~: p
assignLObj := rgmanager.rgAssignL;
. v5 A. [+ `4 f9 e5 M+ F4 D) Z row := assignLObj.getRowNo(GlobalDistObj);" ]. [8 T- Y, ^) N+ c# i
if Row = -1 then -- since 702 f* Z/ I( \9 l( K# Q# }' m
if lan=1 then* J' q% ]8 S9 P- y" H6 r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 g7 r+ P& _+ w5 G2 [$ z& | S( L- U to_str("in der Andockstation: \"",?.~.name,"\""));
. W0 y4 t! v$ m, o else ^8 G7 e- u c1 B5 Q4 u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), {: S( ^/ C- l! Z
to_str("in docking station: \"",?.~.name,"\"")); , ?: ~* a8 F6 x8 C8 M
end;' h% O$ g7 m% X% Q6 v. E
else
6 I# a( Y+ r) b @.Destination := assignLObj[1,row];
/ E. D: ]- y0 F7 {4 v$ Y: u end; - D/ C# {" K6 l
newDirection(@);
+ K+ g4 W8 o; P @.HasOrder := true;
* f# x6 o0 E; l# i& Z( J8 ` end;/ n- ]- I: R% B: E' n: |- d
end;
! k6 \* L8 ~4 s5 X) C2 rend; -- of the method) D! i) I7 u2 k0 o4 I
|