/* called by: entrance ctrl of the object 'track'
4 Y# `6 O9 j/ K*/
- Y3 N* r; h0 n2 ~( Sis) w) e4 U. i) ^2 g% J2 B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 B* C. q- R5 w, Y% @& q5 M3 ldo
) \1 I5 n6 [9 I# f* m H Lan := rootfolder.Internal.Tools.AOLlanguage;$ ?) d# a6 Q& i' R* g( N
if current = @.Destination -- else return, D. n! _- a# N N
then
4 F1 m) n2 A1 ^# m# H, a) n @.Destination := void;: C* L8 C+ ~5 U- L
if @.occupied then
/ C3 d& E% [* o1 ~/ U8 | part := @.cont;
( a% E4 y* ^* ?( r @.transpOrder := void;: s$ g- R+ V9 `) i: }5 W$ @, ?' z+ Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# S2 O; u$ N9 {1 D: M1 a( e# ^2 r
@,root.eventcontroller.simTime);
7 x, I: s2 X) R4 v* o @.HasOrder := false;. t: J% d7 H- ?" d" @( b1 h& f9 |
@.DrivingHome := true;3 `: P2 E8 C# V( h8 S
rgManager.tryToStartTransOrder;1 x' I4 A6 j6 b
if @.Destination = void$ K9 l: o8 { H# P
then -- no transport order for vehicle @4 M7 |# }1 m' a3 W( M6 u
@.Destination :=9 u/ g7 `) ~- c7 r3 L0 k q
rgManager.nearestFreeStation(@,track.~);: [+ L* b) g+ O4 V- u0 q; q: G2 q
newDirection(@);
m9 y: t( B& A) T. P- K5 r if @.Destination /= void then
" ~3 x' T; \( ]; L @.Destination.NumReservation :=
w+ b0 Z! L d7 X6 `: K @.Destination.NumReservation + 1;5 b2 m" C0 X* |5 p2 ?4 X3 v& z+ r7 _0 o
end;0 }, ^* a0 O, p! R
@.CurrIcon := "drivingHome";
3 p5 t7 V6 E" ~$ J- k @.DrivingHome := true;3 u" K9 q$ S! h5 E
end;! G, u% g$ Y+ X5 A. x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. `( I" y" G' g1 i8 Z! C part := @.transpOrder;* y' d( o7 ~# r* `! s: L- k; a! [
part.move(@);-- load part- j3 ^$ w& _- ^# Q- {) F
@.CurrIcon := "load";
5 U. v. c( I2 c GlobalDistObj := part.globDestination;
3 q7 F0 ^5 l* }8 A% t [: S assignLObj := rgmanager.rgAssignL;; Z/ D: J; a3 x$ @& h: K5 t
row := assignLObj.getRowNo(GlobalDistObj);9 M9 a" R( W7 U
if Row = -1 then -- since 701 a1 k* g1 i2 I! ^
if lan=1 then2 I \' Y, D1 i8 Z% ?% U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% x% Q1 d! {- l! M( {+ {! J- v
to_str("in der Andockstation: \"",?.~.name,"\""));
5 L3 _/ j5 U& l0 r! O9 _( k else
2 z( m6 G' t7 o+ I M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, l. Z2 ?2 {' p; @% `, [
to_str("in docking station: \"",?.~.name,"\""));
9 ?. w% Q/ {- ^$ j. d end;
: z7 a. u+ M9 s2 x4 J; T8 O3 E else
8 O: y, h9 Y H# g/ v. d7 { @.Destination := assignLObj[1,row];
3 ?0 V& ^: u0 M9 \# z9 _" {* | end; ! s* J* g1 Q Q
newDirection(@);5 E4 W* J: U/ o6 N- d
@.HasOrder := true;
" R- T9 {* B0 }4 H2 P! M3 B end;
% n; ~# P, T! \3 c/ \4 k end;& U* ~0 P, \# t3 V, _+ ?
end; -- of the method' B6 A+ I, z. S2 j9 T; `4 B
|