/* called by: entrance ctrl of the object 'track'
/ y: h; H: O1 p, l# \8 Q*/) `, l' p2 g& }
is
$ t2 N& a8 h+ O7 s1 H part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 H! e+ f9 I/ ~# q6 a& z$ C6 c# y
do# w7 t5 G; {* P; R7 r4 P5 c9 w
Lan := rootfolder.Internal.Tools.AOLlanguage;! a2 O. S$ g; T4 q3 q
if current = @.Destination -- else return. L' v- V" D0 E# S' D6 B/ \. d D/ [
then1 i# H: e3 [6 I& z
@.Destination := void;
1 \# a2 g& ]5 z& b/ W if @.occupied then
' x4 A* v4 }7 z0 C* [ part := @.cont;5 D5 ], g1 S; o+ N
@.transpOrder := void;0 [8 m) }( q1 w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: \& W: ]3 u9 b" ^# [1 l+ s8 R/ h
@,root.eventcontroller.simTime);
2 {* R- g7 o6 P4 ~. R6 q @.HasOrder := false;4 F/ m$ O- `6 E# E6 P
@.DrivingHome := true;
7 m) A* [& {8 T; R rgManager.tryToStartTransOrder;' p' x! b% [' M2 I4 t
if @.Destination = void
) S, O J- `7 u" Y* \( v- @ then -- no transport order for vehicle @
8 I4 {; V2 h' J6 f/ V @.Destination :=
6 h3 h/ o) O% ?, ~2 P, c; D rgManager.nearestFreeStation(@,track.~);* K% x; n+ V% j- X$ H3 N
newDirection(@); . G4 }* c! v$ l! y
if @.Destination /= void then
( a1 m) d$ G; T% R" c! y' v ^ @.Destination.NumReservation :=* s/ B1 B }1 N
@.Destination.NumReservation + 1;
o% O4 L5 c% k/ ~7 U end;
( }0 O- f4 L" u @.CurrIcon := "drivingHome";
' g1 }2 B% f! V; i5 V1 A- B a: r @.DrivingHome := true;; j8 Z1 e" ?% P8 `
end;
* v, b& ^, ]0 a3 u. q else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 c! }! e" R. Y! `( j+ O9 k" w+ {
part := @.transpOrder;
4 V! {4 G$ h" w0 { part.move(@);-- load part$ y& v) _4 @. K% i, P3 ]
@.CurrIcon := "load";2 q1 ?" B* j6 f n
GlobalDistObj := part.globDestination;
6 e. o4 y7 r: C. w* ~* u/ l- [6 d assignLObj := rgmanager.rgAssignL;
6 H$ S) R4 ?4 m, ]% r row := assignLObj.getRowNo(GlobalDistObj);
% `/ {* B |9 b s2 C& M+ q if Row = -1 then -- since 70
. q0 r+ ?0 x9 z! b" a: V if lan=1 then
& i+ i5 g& B. h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), g; |: [. K, D+ K! H# I9 b" e$ r
to_str("in der Andockstation: \"",?.~.name,"\""));# l: O5 J' q, ?- _
else
: G3 H5 M+ ^3 ^' o2 d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% x) K7 G, Q! {8 |6 q% [/ S3 Q to_str("in docking station: \"",?.~.name,"\""));
3 N$ r1 W$ D! U5 E d6 } end;/ [ d" R) P1 {& _4 x1 r# F4 ]2 ^
else
2 t- g# p- p& Y @.Destination := assignLObj[1,row];
$ ?9 s& Z) ~1 [5 R. b8 s6 E end;
) D: v- c t+ z' x& I newDirection(@);
4 \/ x/ I& |( |$ E2 J( K! R @.HasOrder := true;
# W4 F0 ]$ Z$ o& ~. e end;; @# y# M" ]6 S4 g+ E ?8 k+ a( U
end;0 u- A/ ~4 j6 M' K/ A% l
end; -- of the method
3 t) Q2 _/ `5 m |