/* called by: entrance ctrl of the object 'track'* C" M! L9 m7 x+ P4 d7 m. J' z" z( L
*/0 P# p2 q# v2 g+ ^8 a+ e- e
is
) N3 q, d0 c2 O5 f0 w part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 h$ H- f+ |* _/ f* G
do
0 s) l1 ] R8 @ d$ {+ Z# ^3 h Lan := rootfolder.Internal.Tools.AOLlanguage;3 X8 H/ B; ~- O
if current = @.Destination -- else return
$ z2 P* J3 Q* o% b then
: Z G9 _% K/ e2 Q" X, p! p+ u @.Destination := void;( v* _7 Q# `% Q. s* s! b
if @.occupied then
3 \7 ~# Y0 u3 m; D9 u part := @.cont;. [( S5 P" k6 g l! O1 n
@.transpOrder := void;
, N/ x0 x( l9 p, x/ l) @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," S) \2 o5 p. i
@,root.eventcontroller.simTime);
. { ~! Q- Y( w& l$ o! n @.HasOrder := false;8 R% x0 _+ E: \1 G2 F8 P" M }
@.DrivingHome := true;
: A0 `: d. a s l rgManager.tryToStartTransOrder;
: ^5 ~' w. p' s" |' L if @.Destination = void
: }) J1 @1 F4 X5 ~, j9 S then -- no transport order for vehicle @
/ e, v% ]' J# u/ Z2 S' k @.Destination :=
T7 R% J6 V; w rgManager.nearestFreeStation(@,track.~);0 t2 f4 \! I4 g! ?
newDirection(@); # [; M# B* p0 f# [7 D$ G1 q8 U
if @.Destination /= void then7 n% P: E: x3 g" H
@.Destination.NumReservation := l; [6 q; M- [! B' k
@.Destination.NumReservation + 1;
4 i0 a7 d) z3 ?; y h* y end;' v& A& F f. G! @: |# N
@.CurrIcon := "drivingHome";0 f/ E$ A7 H/ s; `
@.DrivingHome := true;( P- {6 j ~5 t: O2 K3 X! G
end;- S$ {- t' ^) h8 L: e* ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" {8 m9 z' N% N8 E6 k% P part := @.transpOrder;
! O) K- @1 F) N& R# g' n3 I0 W part.move(@);-- load part
% ]: K. s& X+ }" H @.CurrIcon := "load";
9 A7 y. T m3 Y" a& m% N8 [ GlobalDistObj := part.globDestination;, H. Q c, k, ~8 a
assignLObj := rgmanager.rgAssignL;
' d* n, F+ f, }* Z7 a row := assignLObj.getRowNo(GlobalDistObj);
% o' g4 V- E n+ d- C. u if Row = -1 then -- since 705 Q& `. m' c5 J j
if lan=1 then
) G& q7 [* t/ H0 t% p0 Z ]1 R# G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 G: S0 s: p9 o
to_str("in der Andockstation: \"",?.~.name,"\""));1 W5 s" |! A) Z( h
else
* D: [5 ?: u m2 b3 {6 e6 O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 _% Q) |8 V. V to_str("in docking station: \"",?.~.name,"\""));
/ ]- n @! e# ]; V end;6 t! w2 O4 ?1 Y4 Q# R
else% C% h$ j+ g" C% u7 R h
@.Destination := assignLObj[1,row];! }: T9 H b8 X( w' @6 K
end; 8 t3 A% m% a0 p% P
newDirection(@);5 x3 _% ?% |' L: K- N0 C
@.HasOrder := true;
7 E4 w% X$ G! g+ D# D! r+ K end;, t# n/ d/ X( }0 o) i3 ^7 d! F
end;& n9 e5 v% F) _, D; X& h5 g8 d# x
end; -- of the method8 d% m1 c: j4 @: w
|