/* called by: entrance ctrl of the object 'track') O! D% P" t& s
*/
% c& e$ l& r8 B) H* Y3 @is4 U( `6 E7 q* B' ^4 r$ u8 E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" r2 r$ \5 h* S& fdo$ n" H2 B, j8 I' v( _2 Q4 s C: O
Lan := rootfolder.Internal.Tools.AOLlanguage;; M9 K. n) }" M5 P$ _
if current = @.Destination -- else return7 o% d8 i+ X3 H h3 y; n0 W
then
# [, c+ ^% T" X @.Destination := void;
* h; l" {) ^; @3 R" s+ o if @.occupied then
9 N3 a* C" j8 t9 r$ _: b" G7 { part := @.cont;8 P! G9 e5 O' c( t( S: m
@.transpOrder := void;
) C$ e+ p' H. M# E4 p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, \% I/ V- t) i1 r/ |1 N, _' m
@,root.eventcontroller.simTime);
9 i- L6 {$ ^+ |' W4 S' a8 `4 v @.HasOrder := false;: Y, z( G2 O5 V. m; K3 N, A! }
@.DrivingHome := true;
1 i( U! N& r0 _ rgManager.tryToStartTransOrder;
2 E/ l z8 O2 K, }% b( m if @.Destination = void2 N4 c/ m5 u7 Y, U1 F7 p) j, I
then -- no transport order for vehicle @
/ p3 @3 r, R2 B0 P @.Destination :=" ~# D/ I* I3 G1 a7 I) E9 }
rgManager.nearestFreeStation(@,track.~);9 A' w( F& V9 G: b c- Z
newDirection(@); 1 d- \5 V+ W3 E5 G
if @.Destination /= void then
& K6 B2 ^( O9 s @.Destination.NumReservation :=
; H4 {1 w( V( l8 `* I9 ^- M- d" ~ @.Destination.NumReservation + 1;+ ~8 ]9 `1 u, z3 i8 Q1 t# p
end;8 W! s0 j. w2 u% n b7 z3 H
@.CurrIcon := "drivingHome";
* L( B/ M4 a" g9 n- H" D! a. ] @.DrivingHome := true;
! D% u; G1 ?+ l end;
" ^5 m& n. U/ Q2 v: b else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ s/ g. H* k8 V, w) w part := @.transpOrder;
& [1 I" [6 g% V. \ part.move(@);-- load part% a+ E; L7 z. p3 t
@.CurrIcon := "load";2 c2 }: R/ W; F' k& N
GlobalDistObj := part.globDestination;$ H+ A! W _4 z
assignLObj := rgmanager.rgAssignL;3 y& x6 T1 i/ ?; Q: h# |$ e
row := assignLObj.getRowNo(GlobalDistObj);
0 P$ J X9 c( z n- y! @; T if Row = -1 then -- since 70- q6 [ {1 C( W9 d- d( W& W3 W
if lan=1 then
) L' q( q1 ~* I5 Y" E$ o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 j0 B( C# P% l6 g$ {/ x
to_str("in der Andockstation: \"",?.~.name,"\""));% \. T6 M5 [: \3 j9 p5 O1 e6 L" D
else( w/ b3 u8 U5 ?0 u4 p1 r, W) ~. l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% w- t& K2 E0 J! Q* @; j) r! d# Z to_str("in docking station: \"",?.~.name,"\""));
4 }9 u S5 [* n( ?/ ]* ` end;) e9 x+ I# u+ ~, {2 B! L
else
4 ^0 n( y, y# y8 r: q4 o @.Destination := assignLObj[1,row];& e( z! G. P, }, j, \
end; ; N5 ?/ O3 n$ o& K4 Q) {
newDirection(@);
5 V8 W5 Q- S9 Y8 s$ |) ]% K7 W @.HasOrder := true;
! L- Z. t0 ~! x; h end;
; k' {- x7 y$ m+ c end;8 A9 s* C0 ~% m/ Q" l K$ Z
end; -- of the method: l4 c, D: V6 _# X
|