/* called by: entrance ctrl of the object 'track'" }; A. \) j& J- J9 v0 U- q+ O& l
*/
% p- J9 {6 E, g- v# Tis: R1 G# w F) W k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- D2 M/ ^+ n8 Odo- _8 {9 t: c3 z9 F
Lan := rootfolder.Internal.Tools.AOLlanguage;# w6 G1 e: D( r3 I
if current = @.Destination -- else return' }' O2 z5 F+ F. F7 F4 o0 Y
then! S6 A1 |0 z/ b7 L; M( f' A
@.Destination := void;
2 e4 J( ~3 w( a" L if @.occupied then
9 w) r" k- {& Z6 M! i8 O2 q part := @.cont;6 y& ^) c; e* O/ T: x
@.transpOrder := void;. C5 q6 N' s4 O5 A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 C- T; w6 @& @3 K: D5 Q+ v J
@,root.eventcontroller.simTime);2 F: a7 y4 V% h2 l3 k }. s
@.HasOrder := false;
5 y$ P4 A. j: ?8 p6 g! d6 L2 n/ } @.DrivingHome := true;( m: w0 C2 |& { G
rgManager.tryToStartTransOrder;
& D/ s$ _! J2 I9 t F' }2 Z' s if @.Destination = void x* e- W2 k# h* x
then -- no transport order for vehicle @7 U8 F) k9 Y- A/ M
@.Destination :=
, |4 r% @: d, A( P rgManager.nearestFreeStation(@,track.~);5 \4 m7 E1 P n6 o0 R+ w
newDirection(@);
! p3 R0 h" E! I3 X& w if @.Destination /= void then& h/ g( V, I1 L5 K: J8 A
@.Destination.NumReservation :=
5 r! x* @' b9 n: d @.Destination.NumReservation + 1;" z1 v" ?) L7 r# L* s. g" c7 `$ o
end;) S2 W5 X/ J/ E2 r; _$ ?! i
@.CurrIcon := "drivingHome";
5 U4 X3 C% h- M& K& ~# d7 ^. V @.DrivingHome := true;# r( d; M, X( \1 P$ K
end;3 j7 [1 m8 Q3 e5 {* f8 N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 R4 K2 K( O |; n part := @.transpOrder;
& U. e5 [" p( A7 d9 p( V part.move(@);-- load part
% J$ v7 g" s6 E) B2 h6 |) ^. E @.CurrIcon := "load";
- }- i2 A7 E; p- V% W/ Z GlobalDistObj := part.globDestination;- i9 V1 |) A p3 ]( j* Z1 r6 Z
assignLObj := rgmanager.rgAssignL;
& O, E) q; \! |2 e7 _' y row := assignLObj.getRowNo(GlobalDistObj);/ }7 ]) D/ y6 G5 V
if Row = -1 then -- since 70
$ T, S* s. S) \5 m8 T$ j0 | if lan=1 then
1 |+ ?3 g5 P- T2 ^, Q0 x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ ^' v+ a2 t" k) S5 @6 X to_str("in der Andockstation: \"",?.~.name,"\""));2 x5 K d7 _6 i4 H3 R" B
else
2 ?. K, a) d2 ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 y9 m1 @% b5 g% V to_str("in docking station: \"",?.~.name,"\"")); ) q; D# g Z& P& J) z+ N4 E: g
end;
+ _3 X# o6 c( d" Z3 \ else
I. R0 |) a. |' L/ w1 H @.Destination := assignLObj[1,row];
( S. f1 P) m3 A5 b0 d' u4 _5 ^4 r end;
, {3 \- a+ c: `* h newDirection(@);
' d7 R2 R" T. a @.HasOrder := true;: G7 C7 u1 W0 s3 ]
end;
! K; ^" [) l. r3 V+ x end;6 E; J8 D" O( ]( n- R, z& f+ \
end; -- of the method
5 x2 ~; R* M' L |