/* called by: entrance ctrl of the object 'track'
# L3 G* s% m8 v' T*/; {& }. G% q/ |, k2 T/ l
is
" }+ {9 w0 U0 |" f' D: k, o part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 o- T; G2 I: B# D3 Z F
do$ G, D% \- w! y3 p
Lan := rootfolder.Internal.Tools.AOLlanguage;' Z0 [) J) \( n; r c- A
if current = @.Destination -- else return8 \( P7 C# h1 O9 h+ J. f
then
2 k. E' {4 q" g" }( d( r! D @.Destination := void;
8 e. N# I3 J7 H# I6 h& F if @.occupied then
5 g/ T# I& x3 V: [/ m" r part := @.cont;
* T- b) n# i9 l8 e @.transpOrder := void;
$ x0 ]* G9 v7 ~8 S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 B- M" ^. e0 ^. K' }% k
@,root.eventcontroller.simTime);
7 P+ Y" m0 Y- _$ @ @.HasOrder := false;
% I; M }" w. ]: [6 d @.DrivingHome := true;
5 U0 L/ V' h) D rgManager.tryToStartTransOrder;
) r( z' {. F# _# O if @.Destination = void
- o O: U/ G! z# d then -- no transport order for vehicle @
* ]* \- H+ O- @& n7 k3 {! @ @.Destination :=
/ t6 W% x1 n4 g2 X7 \+ M5 N rgManager.nearestFreeStation(@,track.~);$ K+ x b: g% Q ] V
newDirection(@); 9 I* K) N$ W- u' D$ Y2 T) p4 m5 R
if @.Destination /= void then
7 w2 Y' S2 o" J( Q# p' t @.Destination.NumReservation :=
1 @) S @! Q9 Y8 n" ^) d/ f @.Destination.NumReservation + 1;
4 K4 r1 U/ n% W% Z4 l end;
4 @ V8 O, y( c" p0 q. A @.CurrIcon := "drivingHome";4 ~' H, m o" d: ~ T0 d' s
@.DrivingHome := true;3 j4 ^4 j0 g/ a; y& T$ f; e7 K
end;) h# t6 k. Y/ g, U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ Q' ]( t- T6 i# }- c$ S part := @.transpOrder;5 f0 b7 }: x' Q" @- a
part.move(@);-- load part# e ^) m' g' D2 o! `5 P, k5 w5 I
@.CurrIcon := "load";* [5 x3 W3 K A; e1 D* m% c
GlobalDistObj := part.globDestination;* T1 m6 \0 `. f4 l5 |- Z
assignLObj := rgmanager.rgAssignL;
6 M: v3 `3 U6 I% G9 u( ^+ v) d row := assignLObj.getRowNo(GlobalDistObj);- q7 I. M$ e% V2 p$ D9 d3 \& M, `
if Row = -1 then -- since 70! w J: @. c+ V2 |* @
if lan=1 then1 l& h4 L1 H& ^3 c8 X; B$ i( x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 y* c7 r- h- b4 H$ R to_str("in der Andockstation: \"",?.~.name,"\""));
. ?; i: [% u! s6 w$ j/ y else% G4 i: b/ Z/ d* `# n+ b$ j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& K8 T$ U- L n
to_str("in docking station: \"",?.~.name,"\""));
7 I5 Z' Z& N$ @. J end;
; @- x' f7 y2 s8 a else
" k8 { @: B9 J3 d3 g- K @.Destination := assignLObj[1,row];
* i8 u: ~3 |: f4 _3 p end; 2 k" H# @5 G! o9 w
newDirection(@);! L$ n% a8 W+ h" N
@.HasOrder := true;
' p- ^2 _- r. _6 \$ N2 j8 L end;/ h: ?& r* L% G8 K" b. e7 W5 Y5 P2 J
end;
3 E: n# H7 L& T$ v, }/ R# ?& eend; -- of the method
3 f) S: F0 N0 H! R$ `% Z0 T |