/* called by: entrance ctrl of the object 'track'
% G% n! C/ t. T9 v*/8 l: ?& ^6 Y1 t' ?! U2 _" g6 x9 y
is
2 h9 q2 k) W% A: ?+ V( [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 o, B1 C" F; g7 K6 e6 ?$ c
do
5 ^& C* Y0 r+ S Lan := rootfolder.Internal.Tools.AOLlanguage;! k; N" t+ F3 l7 L& F, S7 Y* v+ L
if current = @.Destination -- else return
3 o7 q- e7 ?9 t6 |4 t5 k then! O* w! G u8 G8 i
@.Destination := void;2 i4 ^2 [; I: L# ?5 b( k
if @.occupied then
0 }6 O0 g; \$ x9 x m- s$ H- A" ^7 Q) O part := @.cont; P7 l, A3 b/ Z1 {' p( p
@.transpOrder := void;% }+ P/ }9 e2 @) P2 V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: v, r2 T9 Z: Y5 l7 f! d5 D, D
@,root.eventcontroller.simTime);9 L- R/ i ]3 P! k
@.HasOrder := false;4 b' U/ L, F/ D7 T0 X1 w# K9 S
@.DrivingHome := true;0 i M" L7 x* P/ l
rgManager.tryToStartTransOrder;
8 E+ T- v. @0 Z8 [3 H if @.Destination = void
! B d) m3 f, ? D9 f. [! ~ then -- no transport order for vehicle @6 Q3 O; n" W% I' X% Q
@.Destination :=
: F) g8 m! Z5 t rgManager.nearestFreeStation(@,track.~);
8 l9 A1 {8 E( L% u) |: _7 g newDirection(@); . u( k- ?4 H& P$ ~3 u8 L$ c3 t1 Y
if @.Destination /= void then" R2 `* s+ M0 B x5 f" p+ N
@.Destination.NumReservation :=
/ u2 p- d2 M/ U5 J) E* u9 K @.Destination.NumReservation + 1;% ~8 o" }$ }% f( ]* p; \, F# o3 L5 o
end;: t4 t! O, [- f- N) }2 j
@.CurrIcon := "drivingHome";
+ q1 U( I S) @# Q& X @.DrivingHome := true;
4 d4 ~2 |' `; a) d C- Y end;5 e/ ]& u, Z ?) g8 y. k6 ^! x2 Z' S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 \$ T0 ]& [/ M; o# a) ?% u; T part := @.transpOrder;
V3 u Y9 y4 @( q5 p$ Z$ |" B part.move(@);-- load part
3 i8 f( ]1 B7 o, q* Z" y! V" x @.CurrIcon := "load";
" E. m% [4 X: [7 X) {3 a9 l GlobalDistObj := part.globDestination;
% C0 k. u$ U$ d' p% v! B assignLObj := rgmanager.rgAssignL;
( l9 z. k( N4 B$ u! }! v' { row := assignLObj.getRowNo(GlobalDistObj);- g. R" t, U9 T+ X+ e! F8 [! G- S
if Row = -1 then -- since 70, G& N+ ]' W6 F% K/ i) o9 C
if lan=1 then
]2 w% Y0 ^2 `! @, o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ c6 X$ ~, U; X. G8 z4 k6 Z
to_str("in der Andockstation: \"",?.~.name,"\""));
+ w+ T8 S; U# Z/ m3 B else
$ D5 x4 ?8 Y) {8 K7 M- k0 x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& H: M9 v9 l+ a' f to_str("in docking station: \"",?.~.name,"\"")); $ I. T2 y4 O# y! B! d3 T, o9 ?
end;, y2 p9 x# L; g. p
else2 Q4 M: q" q' x' _
@.Destination := assignLObj[1,row];2 u0 o) v) k) @6 T7 H i
end; ' d4 |7 C# S* P7 i/ `, O
newDirection(@);
" V+ @# G; [& f' `4 E x0 {6 O @.HasOrder := true;
+ z8 x' i1 p8 Z7 d- R" P8 Q# k end;
& M# V* O' ~ l* N. j7 Z end;2 ]& w9 w- r! T& E4 z# W0 v
end; -- of the method# G* s6 Q6 J4 K4 \- C
|