/* called by: entrance ctrl of the object 'track'
5 A, T+ m9 W' I. L7 G# m1 y: d*/
3 s1 Y: K8 p! k0 |6 V* w$ ~: mis
, B& w! x) x- k. E2 E part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( U- X+ [- g3 L* [* o3 }do9 k' `3 L8 u/ Y! L6 F9 r. f, b2 o0 p
Lan := rootfolder.Internal.Tools.AOLlanguage;' }2 ]+ o6 Z# }: y# A! x. k: R
if current = @.Destination -- else return' _* n' v9 z- L2 o. N4 _; ?
then( f" P2 f' \" i3 _
@.Destination := void;
- [5 `& ]: d/ s* r8 O9 @) S if @.occupied then
3 S7 C/ C# r2 W! b& z/ w B part := @.cont;9 D ?' c" S6 z) U0 J: {% o
@.transpOrder := void;
9 W0 b& n3 b0 R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! w% ^- o( t0 s @,root.eventcontroller.simTime);' A2 B5 a- o) U4 o" X9 N
@.HasOrder := false;5 M; G6 G: g& t& j1 K
@.DrivingHome := true;
& B- ]/ ]# u7 V: U9 [ rgManager.tryToStartTransOrder;- A$ R; L; q$ K1 s/ X
if @.Destination = void n) p" |( S& ?3 V C+ _4 A$ { N
then -- no transport order for vehicle @
3 c% u' |% r, W6 ^9 J% i* j" ? @.Destination :=' C, l" l. F! Z4 f) \8 g, f
rgManager.nearestFreeStation(@,track.~);
+ p& E7 A+ ?$ H; G newDirection(@);
" G ` n( E% {- [1 f$ w; i R if @.Destination /= void then
, T- j8 C$ J ~, P4 K* _" Y @.Destination.NumReservation :=
5 d) w$ ]. W+ K: W @.Destination.NumReservation + 1;; ?) j6 y! J z) R( s
end;
; \2 {5 X% x3 H5 [, [# S/ J @.CurrIcon := "drivingHome";+ c; g$ L& J- W% m- W) l
@.DrivingHome := true;
2 c2 }( A5 M2 c! i- x* o6 \ end;1 {% e: b% D s9 r1 S5 S$ i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ K1 d! N' }" [! L0 n" c# M. ~
part := @.transpOrder;
! |% |3 k" U, p& f( p* j part.move(@);-- load part
1 c6 T7 l( g" m- M! V4 f( f @.CurrIcon := "load"; i$ }9 |4 [" l0 _4 o
GlobalDistObj := part.globDestination;
& C5 g/ K$ ~+ y4 g- T assignLObj := rgmanager.rgAssignL;: R: n- g- C( b) P4 O- {
row := assignLObj.getRowNo(GlobalDistObj);
7 h B* B6 ]/ p2 J if Row = -1 then -- since 70' K1 H& D/ d: {0 E m; ]9 I
if lan=1 then2 ]; {- a& d$ h4 m* \7 W% A9 S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 x8 H# c& d3 ?9 E. |: E6 a
to_str("in der Andockstation: \"",?.~.name,"\""));
( t8 N$ I* w1 B- U1 Y else% t9 s& g+ H1 A$ g+ e7 k+ ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# Q: u1 ~! M& D3 o
to_str("in docking station: \"",?.~.name,"\""));
0 b5 l# `9 E' r+ C# X end;/ M6 r: u8 Q0 T% M, D2 f& }! G! k
else* @/ }1 Z' ^3 F8 b8 D
@.Destination := assignLObj[1,row];0 N! c. O/ P, O1 c* Z
end; , _; B5 h8 `5 Q
newDirection(@);2 ?. y& n, Y9 i! N' f0 W6 y
@.HasOrder := true;
: O' T/ l& m+ {; P. W end;
; M; ^7 w2 n9 j$ f- E end;
7 Z8 o+ S0 K9 U* M& C+ N* `! hend; -- of the method5 z9 n# D1 d( C7 B4 b
|