/* called by: entrance ctrl of the object 'track'/ B' `5 y, f( s( i4 b. O: h) _
*/4 R d/ F2 U- a& N
is
( R0 w$ Y$ @+ v part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 e+ z3 i( ~' j: R, l
do
7 Y9 N$ ^7 e0 G# u+ U Z- o Lan := rootfolder.Internal.Tools.AOLlanguage;: N5 f5 @7 b# l% o
if current = @.Destination -- else return b7 ^# |$ R5 n; N- d- s4 t4 O
then
5 D- h: m$ y. W @.Destination := void;
4 a7 K. ~; y+ |; C* [ if @.occupied then
' U" e( @5 k0 _8 h& w% i4 \0 [; i& @ part := @.cont;
7 A$ y3 S/ ?. e$ N- f0 x @.transpOrder := void;8 u Y- A6 ?% |) S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! e& u1 `. H; h# {9 ~ @,root.eventcontroller.simTime);
+ G$ J( Z6 D& g; C+ o9 x @.HasOrder := false;) b1 ]" c- }2 Q+ Z! B
@.DrivingHome := true;1 y8 F6 L5 J) B3 _! m
rgManager.tryToStartTransOrder;$ r" B- F' Y& |% }" |& @1 c
if @.Destination = void; d$ Z0 N9 b4 j8 _/ F
then -- no transport order for vehicle @
; u; B: N/ c. v9 \: R @.Destination :=9 L; W8 M( U$ c
rgManager.nearestFreeStation(@,track.~);7 T- m+ g5 `, N a3 ?. z- {
newDirection(@);
* a" D; [' v }7 B& W+ b if @.Destination /= void then
6 u+ }2 ]' N: _ @.Destination.NumReservation :=
5 H Y* k! {; l$ P7 Y @.Destination.NumReservation + 1;8 }( x$ b, |7 F
end;3 D3 v% a" K9 h8 C: s
@.CurrIcon := "drivingHome";
; O5 Z* N7 @! I( n7 {+ ~ @.DrivingHome := true;9 X) L) l- D7 v! B7 M" I; ^% C
end;
, F3 Y6 k8 Q/ i& h+ @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: Z: K1 l" h- } part := @.transpOrder;
! B- f+ k; u3 B& D& K part.move(@);-- load part$ L. k" N; S& u/ O* F7 |
@.CurrIcon := "load";
/ E+ d' K5 P' D/ `, B GlobalDistObj := part.globDestination;
( Q9 @) R* s6 x2 w9 @3 a/ V assignLObj := rgmanager.rgAssignL;
: F9 a& J7 ]8 L- c: b" t row := assignLObj.getRowNo(GlobalDistObj);5 h1 Y# h* l# _* \
if Row = -1 then -- since 70% T- L8 a3 c1 e7 s: ~
if lan=1 then
# Q% o- K# {1 g" }, R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 p* \0 w4 i; w2 K$ ]" m to_str("in der Andockstation: \"",?.~.name,"\""));% d2 c2 c- D9 X( M* ?
else
4 P/ S* d. r, n9 v& h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 X0 n/ Z% N7 g) b& k; `; ~/ G. Y9 ~' K
to_str("in docking station: \"",?.~.name,"\""));
6 v0 C: q% a1 d4 O' O0 m end;
0 U0 q- k' a, }' u( T4 i else" L7 X7 E2 e* m+ H* I2 g) L4 Y1 E- j
@.Destination := assignLObj[1,row];( @8 V( l1 D# R3 j( T9 p
end; 9 D6 n3 k. E n1 o, G
newDirection(@);
a- h( S8 g- z* @ @.HasOrder := true;! \5 I, J+ s& I
end;
3 }3 G* r9 u' n( k7 s, X end;
^' F! c- H, ~! E% h. |end; -- of the method
0 V1 t5 ]( A3 u+ W0 m) W k |