/* called by: entrance ctrl of the object 'track'9 d$ f6 I% \- o2 H9 P$ T: u
*/
/ B# J" o- W7 S+ @ D' Kis
+ {% P( n+ w# E) i9 A' ^( c5 n# }3 G part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 O3 N& |1 \# n8 z7 V0 ido0 q6 ~6 Q) d( p* ?# C# k/ ]
Lan := rootfolder.Internal.Tools.AOLlanguage;& T/ T B1 N. A, {$ _0 x( `
if current = @.Destination -- else return
+ b, A9 ^, F) J8 v3 U+ ? then0 l1 L3 L' w9 c0 {/ Z" W' X
@.Destination := void;( m- T1 }* G8 j
if @.occupied then
3 N2 d) a# L- Y! U# [ part := @.cont;
/ ?6 P$ e8 e: R3 u1 M @.transpOrder := void;
3 B0 J' i% Y2 A" ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, V( o; ]8 ]7 x, M @,root.eventcontroller.simTime);7 u; k5 j# |: ~+ X- T0 y& O/ I
@.HasOrder := false;
" T R6 m G9 j$ a" ?, @1 [5 |" j @.DrivingHome := true;
' l- @0 _, D# j- H rgManager.tryToStartTransOrder;
/ x7 r1 M1 B# c6 P. u if @.Destination = void U# t9 C; O& r$ M
then -- no transport order for vehicle @
5 c5 v& K' [8 L @" A- j @.Destination :=
" R" {' O& Z+ V rgManager.nearestFreeStation(@,track.~);
* J0 ?) s+ c3 _$ h newDirection(@);
$ v* H$ h0 K, D( M( B if @.Destination /= void then( Z" h9 W$ g2 e) j
@.Destination.NumReservation :=1 G8 G5 m, q0 [! b) u2 I2 V) a
@.Destination.NumReservation + 1;
% [ b4 i v# h$ J end;
/ c/ J( _- n" z7 X8 x7 k @.CurrIcon := "drivingHome";4 U# \) Y2 Y- L5 t. a* l" S& j$ J' S
@.DrivingHome := true;$ V5 T/ Z8 p4 V) r; e4 [1 l
end;
/ L$ _6 k d* `4 z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 K& l0 h, b5 u" M: b/ p part := @.transpOrder;
2 L( V. c1 s: i9 r part.move(@);-- load part+ B4 X+ @6 O/ j4 I' }
@.CurrIcon := "load";
# R6 z3 S( F7 s GlobalDistObj := part.globDestination;
! i& t& f: O8 Y9 y7 O1 K) w assignLObj := rgmanager.rgAssignL;
; H! C" H9 i) G8 o* z' g) j row := assignLObj.getRowNo(GlobalDistObj);
4 B! O* {6 f8 s if Row = -1 then -- since 70/ c3 X4 J- [$ M; n6 p5 X5 A3 h
if lan=1 then
0 z, i# f% k$ W6 F. S; p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 J4 _' t2 F8 `; n to_str("in der Andockstation: \"",?.~.name,"\""));
# F( t# g: L* W& N3 w5 j6 O3 ~ else
& w. b: }# _; E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 y) O( Y4 C; ]( ~/ q5 t
to_str("in docking station: \"",?.~.name,"\"")); 3 i4 ]# Q+ X* m1 X+ v% O
end;
& r( u7 x5 q, k% @$ s _5 m% n else
$ E( R2 T9 B8 c) [# `6 O @.Destination := assignLObj[1,row];
, }1 m! A1 C) M; r end;
, U, y; l0 K. J+ [" V$ [( w newDirection(@);
" O9 ]0 G; f& A1 c$ b) } @.HasOrder := true;+ p+ `8 P8 e8 F: _' k1 t
end;* L, Z% `7 p: |6 i. P- p) G" I
end;
/ q# r/ i3 F& d' n, J4 {5 Bend; -- of the method
! g7 n) }- G, p$ a! x0 A |