/* called by: entrance ctrl of the object 'track'; L+ S0 \% a- A0 }/ F
*/$ L. j1 J! ~$ n- _9 j+ W
is# J6 {3 v2 d( C4 m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ D( }" w& y% L8 e+ d2 q R
do
. w/ `* x! T) b5 Y$ \3 k Lan := rootfolder.Internal.Tools.AOLlanguage;
% h) q( h5 ]9 p* D1 F if current = @.Destination -- else return- U3 x) ?& R) w) o' S0 G. J
then9 ?6 K1 u6 ]5 p" W3 u9 B$ s% X6 }8 e
@.Destination := void;$ G- a+ z2 H, _; m, _" P
if @.occupied then
' o' {% Z% K9 y/ k7 B5 ]/ E part := @.cont;
7 b" o4 g3 a1 ]6 Q# s' A @.transpOrder := void;
( _' j, Y& Q' m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 w+ K4 H( T$ F+ M7 i6 Q# a1 ?
@,root.eventcontroller.simTime);' L7 H2 z3 ]6 v" }
@.HasOrder := false;" s A9 r+ X4 }% {2 |" A5 j
@.DrivingHome := true;
2 C6 {9 ^2 ?% ^9 M% r0 \8 \% _ rgManager.tryToStartTransOrder;
* P# _: `) s1 c0 x! }; x4 S+ I1 l if @.Destination = void4 A8 a4 _" s8 P2 T, _. O( d
then -- no transport order for vehicle @' l( w# b8 M" s q1 V) m G
@.Destination :=
8 [! P# j z5 i; M) D* g rgManager.nearestFreeStation(@,track.~);6 g, N- _! H7 G, d" E4 e
newDirection(@); 8 ~5 z; c! M9 P( P
if @.Destination /= void then6 z, @( n& X/ Q5 G. T
@.Destination.NumReservation :=
0 J& `; J- G$ A; v6 J+ k @.Destination.NumReservation + 1;
, o( \1 O) R3 W end;
1 [0 z) A/ L3 W* B+ @( L @.CurrIcon := "drivingHome";
7 X& E; D9 c/ p. _ @.DrivingHome := true;
+ ]0 A8 i, C' h; v/ B end;
' R7 _$ h$ t v9 L else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% ?# P+ B9 g7 P& T; E part := @.transpOrder;& n1 b( g* s. Q0 W' f
part.move(@);-- load part7 x' ]8 Q d5 A- j6 J$ K8 M
@.CurrIcon := "load";7 u% u5 b/ S) U6 O+ v
GlobalDistObj := part.globDestination;+ \/ F! X+ y8 v2 C7 i; R1 S8 A
assignLObj := rgmanager.rgAssignL;
( L* @0 ?% M0 ] row := assignLObj.getRowNo(GlobalDistObj);' E2 V' }& J( u1 z" s) G7 v% F
if Row = -1 then -- since 70
: v6 N2 e! Q, w8 Q& h; d0 s if lan=1 then% j6 D5 X8 z' q. W' @* o7 F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% ^- t$ i, u# E to_str("in der Andockstation: \"",?.~.name,"\""));6 a% o) x. _6 B+ Q8 ^1 f4 d* F
else- k( D7 V0 |0 l F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& M4 S7 L. ?8 J' e/ u: D# i4 T to_str("in docking station: \"",?.~.name,"\"")); # g# C8 B& |( \4 m, c# k1 a
end;
: h9 a) P; ^2 b9 A else: }6 X0 R- x4 [6 ^8 \6 U
@.Destination := assignLObj[1,row];( o; A7 ]( f+ u6 h/ e! Q1 l* v
end;
7 x7 Z+ Z+ G7 a2 Y newDirection(@);
. w/ O; O% l5 Q7 }" e! [+ a @.HasOrder := true;
/ S( r" h( f# p0 s: n' u end;4 l2 _) A( E) N. |, U4 |: M* N& u. v
end;
" ^+ A; D# u* @end; -- of the method! D) ?+ |9 [& P# T1 \
|