/* called by: entrance ctrl of the object 'track'( t/ x y1 j* g3 q& F' [+ S# U
*/
' \- a0 Z1 Z; d y) Tis) Q+ h5 F" g7 H5 m9 `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, u Y4 H' G, }# i5 K+ M( Gdo
* e4 S6 P5 P4 |# n6 w Lan := rootfolder.Internal.Tools.AOLlanguage;2 }* Z9 i, A9 A7 L: S
if current = @.Destination -- else return3 Z( E9 a7 r9 o
then
; {; F( A5 f5 q$ \# O @.Destination := void;
/ J7 F) G% |6 d0 N [. d% M$ u3 w if @.occupied then
0 M$ Y; ^3 b; {* v) i; {& {& q part := @.cont;
) G7 K' {: q3 G& r3 F @.transpOrder := void;9 P4 p# a. |7 ?2 k% p. } n3 l- g5 ^+ C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 j* u4 c# Q' X) d. p @,root.eventcontroller.simTime);
! b/ P2 o, ~# o3 V3 e. _ @.HasOrder := false;
5 u, j( Q. x& ]. C @.DrivingHome := true;
2 r8 b% B Y" U# x6 @+ J rgManager.tryToStartTransOrder;3 u" V! {0 m* L6 V1 p' {
if @.Destination = void
5 q" Z+ k' u6 |1 C) q! ^ then -- no transport order for vehicle @
9 q4 i; E" z: w& w% ]3 |8 A: ~ @.Destination :=, x l: @8 z) T
rgManager.nearestFreeStation(@,track.~);
0 ]5 Z9 A4 y1 a( _6 R$ M/ j6 V newDirection(@); / M2 L5 U, p3 M
if @.Destination /= void then
1 r* P; c0 \$ k( e; W$ j7 l/ A @.Destination.NumReservation :=
" e$ L; t& g) G# H @.Destination.NumReservation + 1;
* H w7 |: J, N* S; c0 t" { end;
+ ]; U, P; Y& I$ a( j @.CurrIcon := "drivingHome";
5 D" m2 ^% i1 [+ I+ q5 i: r @.DrivingHome := true;: v9 P/ Y5 R; L5 o& q7 e5 f
end;
$ a0 j$ r; x5 D8 Z3 N0 }0 ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" R* a4 M- X* i( d- l part := @.transpOrder;
- N" a* l' U# M5 Z part.move(@);-- load part' L8 y. F K8 J7 ]5 Q6 t$ @* O2 C
@.CurrIcon := "load";- p# f1 U7 |. n; w0 |6 }
GlobalDistObj := part.globDestination;% D4 ^& B# b' w3 e9 J
assignLObj := rgmanager.rgAssignL;& }9 n0 Y" `* U' ?) O6 f, y; r
row := assignLObj.getRowNo(GlobalDistObj);
" y, @" s; _7 M/ P4 o if Row = -1 then -- since 70
. v. j1 j* E* H8 N$ p if lan=1 then: F- Y. Q! d V8 r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ S7 s" b& G3 ^
to_str("in der Andockstation: \"",?.~.name,"\""));
' v" ^* k# C; ^7 _8 f& X% b7 } else( ^/ k0 L% k' j+ y" q5 r8 b
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* r7 B. A: e5 z5 w# ^
to_str("in docking station: \"",?.~.name,"\""));
5 \2 a+ F1 V t end;) x/ ^9 F2 R, Y, \% V+ }5 P
else; Q1 q4 v2 L |# Z
@.Destination := assignLObj[1,row];
% x- k( L/ i9 g' p9 I* C% u& t end; $ V, I7 Y' k! p: L
newDirection(@);) \9 f" m% r& q3 J
@.HasOrder := true;/ R5 G+ i# r# E, v/ ]
end;
& }% }) O3 o! f, e end;
& F9 \; X5 u. y! }end; -- of the method
( |# ~) _7 l. t |