/* called by: entrance ctrl of the object 'track'
. @9 h9 w7 g" H*/
& r: J# n. k }& z' F% ]is: ]! @ R" d+ W- e4 @# R) Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 A8 P% i! h+ N0 wdo
9 f) W; q- w0 E% z; \, l Lan := rootfolder.Internal.Tools.AOLlanguage;
4 r1 h! J3 F/ \& n if current = @.Destination -- else return! V/ [ W" n; J' M0 h# _
then+ T8 y$ X$ _' `" o" E. O; v' y8 ?
@.Destination := void;
. o/ \7 k% G5 V if @.occupied then# Z8 a5 z* k6 }1 I; ?
part := @.cont;
9 E5 |0 G7 W3 L @.transpOrder := void;
1 e# B' k4 u" S v+ P1 W9 F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, @& A2 d3 I8 C8 ]( y' G4 @/ }1 f3 W @,root.eventcontroller.simTime);
: B5 ?# `& w l) S: L5 C6 j2 U @.HasOrder := false;
1 V4 ?" q0 B* U; H# ]9 U @.DrivingHome := true;
+ o3 {' r0 p1 G$ J% D rgManager.tryToStartTransOrder;
9 u3 z8 |- N8 A4 }1 N3 a if @.Destination = void0 L; k7 F1 A$ }" B* E, |9 v3 M' I
then -- no transport order for vehicle @, Z `9 }3 G# h" e5 u$ y5 }
@.Destination :=0 z. }, a* ^) B. a
rgManager.nearestFreeStation(@,track.~);1 [" N/ g5 E$ |: W. R4 E* C# g
newDirection(@);
) q5 g0 ~) A: T5 y A% _ if @.Destination /= void then
9 O0 I0 ]# R1 ] @.Destination.NumReservation :=( f% I% Q3 j7 ~" q3 N9 s
@.Destination.NumReservation + 1;
) [' `, U5 k2 G% W4 @! B! { end;
( @! v9 E& b4 u4 q, I# R+ D3 [ @.CurrIcon := "drivingHome";4 m: x [4 x; c0 }! d
@.DrivingHome := true;/ x: A4 X) w, J8 H+ H% p2 y& s Y
end;2 T8 R& e! ` h; U7 N& L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; {, \: ^. U5 ?* w$ p9 [; `
part := @.transpOrder;
_! ~8 I: i3 m$ d* W& Z part.move(@);-- load part" f1 |; ?* o0 A, p7 s% W* G
@.CurrIcon := "load";4 U3 p) z( n$ x, R/ q2 k7 K# R
GlobalDistObj := part.globDestination;
Q9 Z/ O6 E' L- d! W. U8 e assignLObj := rgmanager.rgAssignL;
; \3 [* W) V/ i g row := assignLObj.getRowNo(GlobalDistObj);
. e. g( `; n) Y if Row = -1 then -- since 70& d# w+ L- ?, ~+ K+ _
if lan=1 then
( L1 {% h5 u1 f I; u, y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, j* A7 y' x( g' g( _8 N( M3 K
to_str("in der Andockstation: \"",?.~.name,"\"")); N6 p7 }* u+ ]( @
else' v& U& f& W( o% R7 \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 }- s# X& n* ] to_str("in docking station: \"",?.~.name,"\"")); $ e0 V+ j% J' ]: \
end;
+ Q5 s/ {+ R$ k4 _$ q( S! n5 ~ else" X7 H& {) _1 A. b4 c
@.Destination := assignLObj[1,row];
/ l5 t. z; y# @+ \* L end;
6 ^" g: @' t* V r newDirection(@);
7 u) G7 |: @2 f/ j3 O @.HasOrder := true;
$ U/ i3 g" J) o4 \' C end;
; E0 b* [9 J1 Z0 ]+ B7 Y X end;
, r7 t' V: \+ W& J' X% n Y' @6 oend; -- of the method3 l: [# N. z3 [% K& _
|