/* called by: entrance ctrl of the object 'track'
% j; H5 j; O" m- e t4 `*/; e! e0 ?( X* q4 L6 T0 F1 N L
is* ?# s; H$ k/ Q) Y4 s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 L* m5 k; s: {( Sdo
; R; ]- o/ q, L; u& ~9 `9 `( i Lan := rootfolder.Internal.Tools.AOLlanguage;
1 f6 T8 A) B* m$ w if current = @.Destination -- else return
- N$ m' L2 d/ X/ L/ c then: ~& n+ W! P- ^/ s6 l: }4 F3 P
@.Destination := void;9 k% O) d1 e( Y2 F0 S; L( W
if @.occupied then
+ O4 H% a: s% G part := @.cont;7 G2 m4 L R, q' q! q3 M3 k
@.transpOrder := void;9 z' v2 [) \7 O- d. e; [1 U2 X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& n9 [- z. l3 E- {( N E @,root.eventcontroller.simTime);
3 r8 ]- T8 ]8 k Z( c2 z1 T @.HasOrder := false;
% A1 ~; f" H& U0 ]1 g$ m @.DrivingHome := true;
: u, q. c' X/ W rgManager.tryToStartTransOrder;
. J9 }% n) H/ c" J if @.Destination = void4 u9 n, H2 s& h: z6 a
then -- no transport order for vehicle @7 G o( p% a! ^
@.Destination :=" K/ Z2 N: W: s! _6 X
rgManager.nearestFreeStation(@,track.~);( p% _% |2 @/ U9 M
newDirection(@);
! d9 g1 t8 m0 H7 {& s if @.Destination /= void then& A: B1 H4 O& g ]+ O
@.Destination.NumReservation :=# I- h1 Z( k/ ]0 B
@.Destination.NumReservation + 1;! _2 }, q$ d5 V5 i
end;. s, K) \6 W3 _& C0 R8 A2 f, J: _; C
@.CurrIcon := "drivingHome";
! e5 W, Y( n4 n$ Q @.DrivingHome := true;0 k+ \3 x& O: \# Q5 A" ]
end;
- W/ Z% z* A9 j6 W& x9 U else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: u8 t- Y" D6 x part := @.transpOrder;0 y2 j9 I! u! i
part.move(@);-- load part
! _' [# {; E9 m3 n" Q* u( e @.CurrIcon := "load";0 o0 w' J8 [ }5 e* B. c- N
GlobalDistObj := part.globDestination;& n, D+ s* r2 ]% ~
assignLObj := rgmanager.rgAssignL;
3 K' T9 Q4 x9 |1 W; j& k- N y row := assignLObj.getRowNo(GlobalDistObj);! m; P5 J, U5 X, \
if Row = -1 then -- since 70- p& K* W! Z: G: w
if lan=1 then
! D3 D9 A: ~' p* i* V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ C; C+ g) E' M0 E7 K4 L `1 Z to_str("in der Andockstation: \"",?.~.name,"\""));, s- o5 K' g' ?/ w8 t& _* Z. M( i3 x
else- z1 V S r( J7 c0 E9 s( U- R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% t3 M# v- p. v. q, w% ~' ~) r. W
to_str("in docking station: \"",?.~.name,"\"")); & A3 C5 U, d1 a7 a
end;
" r1 N2 X0 V5 V" y6 `. T; e7 D else
6 a; g( [% C1 n1 T @.Destination := assignLObj[1,row];' j1 c. l* k) ^% ^9 K/ K
end; % y1 `8 c& ` Q, u4 D
newDirection(@);% J5 J. h4 P' f* K+ r
@.HasOrder := true;
& j, `( n* |5 `) E7 g" a end;. ?9 ]: A0 ]6 h& N: e' t
end;- e' J3 g" u) k
end; -- of the method
/ k4 s7 ]9 D) F5 Q |