/* called by: entrance ctrl of the object 'track'& c9 _& Z. O9 B( j( `0 h! M* O
*/6 y/ v$ a# D$ p# K8 ]' H
is
6 \# v" X$ Y. \1 x( p part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 U( p S% u( r+ S j1 [0 B" k* }% mdo7 q2 M5 K; H- A5 D& V
Lan := rootfolder.Internal.Tools.AOLlanguage;3 [' P+ }% K( j8 o6 n
if current = @.Destination -- else return
7 D" N# s' b1 H7 g$ e then
0 R5 D/ L: C0 i* a9 \4 m @.Destination := void;( N% g( R+ ]" V0 g% O
if @.occupied then2 ?: u% ]. E0 L/ s7 U
part := @.cont;
" Y7 {5 ]: n/ D8 |/ }" ]+ { @.transpOrder := void;
, C" P4 o: F- f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ l0 W d3 ?9 l) A" E$ T
@,root.eventcontroller.simTime);
) M! n, ^1 B; \# d# q9 }/ [ @.HasOrder := false;
6 j q+ t0 t2 r2 m. q" |' e' U @.DrivingHome := true;, m, X ?: {! ~
rgManager.tryToStartTransOrder;
) `$ G9 u- U! U; Z. v$ c+ F9 i if @.Destination = void
' @/ M- `) w1 a1 y4 E; ^9 v! V- u5 X then -- no transport order for vehicle @
0 f: g' o( t. v% d- o$ R6 ~' b @.Destination :=- v3 Z) h1 S6 z D" T, l
rgManager.nearestFreeStation(@,track.~);6 V# } o9 e/ e/ X6 q; [5 x4 g4 [
newDirection(@); ( z& w/ S# k" L& }' \
if @.Destination /= void then
; o) |; L' `1 M6 x. c. J @.Destination.NumReservation :=
6 t% {; C6 p2 A0 m, R! t: A0 x: m @.Destination.NumReservation + 1;. O" M2 w; c8 p! ~
end;
) r; b' L" X$ D7 G& R1 D @.CurrIcon := "drivingHome";7 O/ k& \7 g0 \& c: u' O6 u
@.DrivingHome := true;
' `& m3 Z5 |* Y. X3 l( \6 \1 ^% K3 Q end;2 A# h* E" l- z, f* T: @7 T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! N5 L: d) d: f1 n: V4 `$ V4 L part := @.transpOrder;5 y: i+ k* g4 S: P' x% ~
part.move(@);-- load part
1 q5 {* l. o5 v& J% R0 ~* l4 q @.CurrIcon := "load";
4 @0 H2 c( E8 I& T* Y GlobalDistObj := part.globDestination;
7 b( ^$ t; b/ A4 u; C assignLObj := rgmanager.rgAssignL;
6 G/ A# n7 X' t9 ]4 z5 c row := assignLObj.getRowNo(GlobalDistObj);% T/ ~/ v" I& K
if Row = -1 then -- since 70
( h, _- z0 g% r( I! T if lan=1 then/ M+ N* X" b& c7 t5 R- F1 _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 u2 O) z6 a1 F5 H, I' {3 P$ {
to_str("in der Andockstation: \"",?.~.name,"\""));
. t# H) ^1 m6 c0 P else
; W& ?/ B T5 q# `5 H0 C7 E, i8 Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 q% u/ U8 ]! C; A* t# x
to_str("in docking station: \"",?.~.name,"\""));
& `9 L+ B5 D* F6 `8 ^& m- D9 o end;
3 K. ^6 M; ~3 u6 K else1 x1 Z9 A# n; H0 a1 J
@.Destination := assignLObj[1,row];
* F6 Y1 W, p# ^5 `; e8 v m1 C" O" | end;
/ L7 c4 }9 ]( U newDirection(@);1 [3 {1 H+ X8 J+ ~- q7 K- @
@.HasOrder := true;/ ?! t( P- p5 ~) e/ {& P' |
end;
1 o" J4 E8 w* k W% X, D end;
, a( j7 `' b3 [& \( F/ Aend; -- of the method
6 i1 G4 P1 g/ v6 r" ^4 B |