/* called by: entrance ctrl of the object 'track'" H* z# i6 \& a Z% n% W. K
*/% g+ c9 Y7 Q2 T- y9 v# Y
is
2 o* z. G% K, b. n, j3 v+ \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 n2 }5 `8 F6 @; [* e2 g; G
do9 t' B( }0 D* w' j: i, C' d8 R
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ r* \2 A; [& z! ]; k* _) M$ ? if current = @.Destination -- else return/ u7 i+ V) }3 U" K7 n" R
then( w0 }- b% {; `
@.Destination := void;
/ |: e9 p- @) Y# r: T if @.occupied then
* f+ G! e) \ r part := @.cont;
8 u; J+ V A9 M d. T* O @.transpOrder := void;, |' k7 A; S! L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& Y- N7 o: c* y5 y: H
@,root.eventcontroller.simTime);
1 o$ f% i3 h; I @.HasOrder := false; W! Q1 }: u2 Q$ i+ T- [
@.DrivingHome := true;2 K' T' U3 c' R4 H" E d; n
rgManager.tryToStartTransOrder;
4 x% ~7 E2 d/ s$ g if @.Destination = void' w H0 l3 ^/ O4 Q( ]
then -- no transport order for vehicle @6 W6 m# y+ @% G7 C* n* A7 X
@.Destination :=9 ~ J. T: [" W% K# }3 N* w
rgManager.nearestFreeStation(@,track.~);
% @* R: n5 C$ R newDirection(@); 6 R ~( A _$ P% V! L
if @.Destination /= void then: T6 l6 y0 l9 H( N
@.Destination.NumReservation :=0 E, \8 P; m$ b! J% k
@.Destination.NumReservation + 1;( ~# i. c& e- F- m
end;
" y- d& x3 [+ L( m3 Z @.CurrIcon := "drivingHome";
: @" B H9 T9 n# w! X @.DrivingHome := true;
) z( L1 y1 ?: y! g6 Q; F end;. @7 l1 |7 G" y( k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 q: E7 I$ d/ j0 y2 | part := @.transpOrder;
0 g! q N: A3 k) P. z& ]: w% P part.move(@);-- load part6 E9 } S0 A! c$ R
@.CurrIcon := "load";
! b; L1 t. ~0 Y9 U: n GlobalDistObj := part.globDestination;
* @2 D1 T0 ?; y' K2 } assignLObj := rgmanager.rgAssignL;
) u; z) q, d3 G0 l# B row := assignLObj.getRowNo(GlobalDistObj);' o6 c" [ N3 Z( A# J
if Row = -1 then -- since 70
* i$ T! T& P5 @+ i0 r/ { if lan=1 then
w% r6 ?+ G- c/ S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 e" Z T5 F% L. B' t9 ]' Q
to_str("in der Andockstation: \"",?.~.name,"\""));" V$ m; k* c" H+ u. M
else
8 E0 B. c5 ~) D; [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 \6 {+ c1 D! ~( I1 [3 m
to_str("in docking station: \"",?.~.name,"\""));
. Z- J1 ]/ d, l' m2 h end;
: U# G, ?7 Y0 i% Z; x1 t$ d; s else
, P. s6 f3 K5 @% k2 } @.Destination := assignLObj[1,row];
* l- y4 k% B# ]0 K/ E8 _- t end;
5 z# j* J+ F. [" g" u newDirection(@);8 A$ }& _3 B; C, r6 P6 h9 {- n1 u
@.HasOrder := true;5 B; ]* F" U! K! @2 P- T0 h
end;
5 G: u( _- I% ~) C+ w( m- s end;/ Y% I' G# f: U, \2 f, d7 S' [$ D
end; -- of the method2 @9 U+ t7 \* [$ V) M u/ ~
|