/* called by: entrance ctrl of the object 'track'% _, n4 `; ~/ j( b- W# O& J4 D2 E" m
*/1 B( E4 ^5 [% M. g. R5 b
is
- _' P6 j( V- x part, GlobalDistObj, assignLObj:object;row,Lan:integer;& @8 c/ ?2 h* R- w0 |3 w2 K
do! d+ M! Q+ s2 C+ H% I
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 j( i P V7 a5 Y if current = @.Destination -- else return1 K' G0 F- q+ i g! _
then
' X( a1 E, f( h$ ^" E! l& { @.Destination := void;
' l& {* t) h8 |7 x2 D if @.occupied then
0 Z. U4 c7 a" g$ R4 I2 a part := @.cont;
% m6 X0 h8 S8 a @.transpOrder := void;
; e( U7 R( p! [7 h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 p1 N9 ]. d [- l0 H5 F, ]
@,root.eventcontroller.simTime);" P9 L, Y( t2 k: S
@.HasOrder := false;
! T3 H6 {3 ]/ f1 l& y9 l \2 o: O @.DrivingHome := true;
6 |3 L% q# ?1 R: e' X rgManager.tryToStartTransOrder;
+ @% K' n, c1 | if @.Destination = void( y2 v( _ y& ?( w* Z( p
then -- no transport order for vehicle @: l( x8 C! a: a, J- g- z) {) D
@.Destination :=
$ V2 _6 }6 @) i" V* M. \ rgManager.nearestFreeStation(@,track.~);
4 w* c; P* P. J# t& H9 x. C0 f9 t newDirection(@); / E1 R: a; L) F8 a
if @.Destination /= void then9 a/ Q; y2 l0 j) |7 \) f' [1 B
@.Destination.NumReservation :=) j2 j8 Y3 N- x8 u1 V G9 ?
@.Destination.NumReservation + 1;
5 W2 _2 D# [& E$ { end;
, i3 b" n. K( ~) J! N. h- r; o @.CurrIcon := "drivingHome";
6 b- b# b% ]3 F8 W5 Q @.DrivingHome := true;
8 }0 b* M" Z5 r1 S, N end;* O# U7 Y0 H5 X Z: a, u/ }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 X9 X& H4 |! T$ F. Y/ D5 k- g$ y part := @.transpOrder;
& y" I7 Q5 T2 l; `8 F part.move(@);-- load part5 s3 j& a* m4 U
@.CurrIcon := "load";2 X# b6 } g& u1 S
GlobalDistObj := part.globDestination;3 m) W9 Z/ m3 V, o% t5 O
assignLObj := rgmanager.rgAssignL;
, x a. }) \" [$ |: Y- Y row := assignLObj.getRowNo(GlobalDistObj);
! c1 e2 A. D$ i4 Q; I: i+ q if Row = -1 then -- since 708 k$ U; S# P1 U4 r i+ e. ^$ T
if lan=1 then
0 H' y B9 Y' T4 A9 t) m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( u9 T, J7 P9 R& c* O; { to_str("in der Andockstation: \"",?.~.name,"\""));1 \; |* c! V! ~0 i5 f. N ?
else$ Q& o X" i7 N' x% M! @: k' W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( G5 K& \& X! d2 ^& [ to_str("in docking station: \"",?.~.name,"\""));
; A# v9 X9 e5 j end;
* W. v. T( x# B; _# n else
! o6 |' `2 }4 q @.Destination := assignLObj[1,row];
& U. `0 `# G& x+ L5 ~/ V end; & h- c H, Z& e) `' I B& b; r- M) v
newDirection(@);
" ?1 l: f W) i( A$ s @.HasOrder := true;
" J# U# p! _$ x* M( C7 C5 p end;8 }0 c: [5 ~9 F
end;
]1 V5 l/ @8 z3 Z7 l6 _1 k# U$ vend; -- of the method
; w4 O, _# j& e) I7 t# C |