/* called by: entrance ctrl of the object 'track'( L# _- w2 ?& S& S6 U: C
*/ T7 x8 h( R) y4 e0 V- Q# f
is
, p5 |0 _7 L& \* } part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* k0 e9 {, N' `% I8 y# l( ~do3 w/ e+ O7 j$ ?
Lan := rootfolder.Internal.Tools.AOLlanguage;
M7 w! U, P' b& _% Y if current = @.Destination -- else return9 J; {6 N4 t/ n
then
$ x: a( N" a# a# j5 I+ ]( ^ @.Destination := void;7 p. h' Y! L0 e9 V; U5 i1 j9 A9 B, N
if @.occupied then
* f5 D) j+ n" U6 @1 U: E, d& S part := @.cont;
1 }% ?# v5 X d6 E* D @.transpOrder := void;6 O! \/ w9 m; B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 Z1 c2 y. v8 H- \% O" u/ @ @,root.eventcontroller.simTime);
/ k- a+ z$ y2 Z8 E. g# ~ @.HasOrder := false;) R- c2 @8 w. u8 t2 r) a
@.DrivingHome := true;
" c8 P6 ?" M/ N& N# ^& g rgManager.tryToStartTransOrder;) t7 k+ R& z1 r9 |) C; n
if @.Destination = void
& J6 G; o$ X) u5 V8 }+ G* S then -- no transport order for vehicle @# K% D$ z' ^- {3 M5 n" v; U
@.Destination :=; N+ Y: V) f- R5 l% j
rgManager.nearestFreeStation(@,track.~);# j) r) Z; v: X+ Q
newDirection(@); 5 g# k/ i$ S; R, h) O- |$ ^
if @.Destination /= void then
/ s7 [! r1 T% W& Y( }! i$ f, M1 h: r @.Destination.NumReservation :=. w. ~4 F1 m ~
@.Destination.NumReservation + 1;9 X1 G! `2 [& _' ?$ \, l
end;
' A" v4 i2 Q7 `4 V0 D* ^9 H" T @.CurrIcon := "drivingHome";2 K" X' \; o; c" B, ]: U# e
@.DrivingHome := true;
: b9 y( V) d' D) N$ d6 O end; f3 g- W7 c p" n6 @) V0 p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) d0 v: _6 n2 @! } part := @.transpOrder;# h+ S* G, P; i. Y- d
part.move(@);-- load part
7 ~' ~+ J- ?4 n) |% z @.CurrIcon := "load";
$ ?* M9 Y: e. d/ F* T) Q GlobalDistObj := part.globDestination;
. n& i6 W0 n! z. |* n) S% ~ U assignLObj := rgmanager.rgAssignL;' r p) F# u. ?1 a& H
row := assignLObj.getRowNo(GlobalDistObj);% p8 r; Y+ w$ K3 U& X+ f: I' M
if Row = -1 then -- since 70
( {) M Q1 n4 C% U, k# T if lan=1 then) K1 Q; I* G1 l. W' U# b0 p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 w, l. c; b' N9 i to_str("in der Andockstation: \"",?.~.name,"\""));
% b; T+ ~ q/ p# [, c# ? else% D4 l C% d3 Z6 k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% d* l1 F6 V, y; V4 `4 M2 }# x
to_str("in docking station: \"",?.~.name,"\""));
& E/ X ?4 P3 i8 e end;
9 t% b+ y9 Z- W; d5 d8 L else
6 F4 u. @4 ]6 N/ M @.Destination := assignLObj[1,row];
2 r4 Y1 V. I- z end; , o, J0 Q& M, J ?3 G3 C* n
newDirection(@);. D% a6 U' u, ^+ \5 [# C& B
@.HasOrder := true;- _& O; L B, \# ?9 |. h
end;, C" y L$ r- c; M# _! m
end;# [- m1 F6 [/ W( A! |- t6 x5 b
end; -- of the method/ Z2 J: x8 R" \" A, |& D% Y
|