/* called by: entrance ctrl of the object 'track'
* \. d7 p+ d! `6 I6 D; _*/
. c# u1 J- Z- J- N, i: f" ais
/ ?6 K. \; P7 v part, GlobalDistObj, assignLObj:object;row,Lan:integer;; r. G- T9 j8 d* z- g7 D
do% d1 n* }- I. [, V9 p$ S
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ |: J4 M: ^& @6 s% T y6 b6 W if current = @.Destination -- else return
, i& t4 Y5 K0 s( L3 W% G, \ then
$ S( G8 G9 i& x1 g @.Destination := void;" o/ j1 m7 E: {3 g# }
if @.occupied then
K$ w9 _! \' `. o. x4 b. B' N part := @.cont;( H' l. ]. Y2 k
@.transpOrder := void;3 O7 c/ I+ b$ ]& B$ B5 W7 D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ o9 O3 P; s8 w- e, p* i$ p. N @,root.eventcontroller.simTime);1 @& m) R% j: I7 f; k
@.HasOrder := false;
6 m" K: j- ~" v2 _ @.DrivingHome := true;2 {4 H' `2 N6 I$ W; |
rgManager.tryToStartTransOrder;: t7 |' J# o: v) y5 T! ?
if @.Destination = void. a1 d/ L) Y; W3 Q4 s
then -- no transport order for vehicle @: ?% w/ P8 `4 L7 ?$ m* `
@.Destination :=
' F- \0 j* F) a+ Y" k- ? rgManager.nearestFreeStation(@,track.~);
+ L6 @: w) @( ]' W( I newDirection(@);
" F' l! ?, X Y if @.Destination /= void then
7 x! t O* Z' [% g! x0 F+ j! A @.Destination.NumReservation :=, k- E! k4 q6 m" r8 Q: {% k3 c- Z
@.Destination.NumReservation + 1;
p4 o4 G6 n y4 ] end;
! @2 ?1 G! t0 S9 W# ? @.CurrIcon := "drivingHome";5 W+ l9 I+ i* d& V! |0 g
@.DrivingHome := true;& h' L- b) H7 N1 t8 P
end;
/ `# V, |* c8 O- q$ v+ w else -- the vehicle @ is empty, both vehicle and part are in the same dock station- w: o( N" a' v9 ^9 C) B
part := @.transpOrder;, y( c$ T# w2 B1 q: j
part.move(@);-- load part
: P8 r/ r! b/ A# [ m" o0 z @.CurrIcon := "load";( B7 W; v9 }) N3 O& Y8 q
GlobalDistObj := part.globDestination;
, F, D. D/ h; _9 B. ^# |4 \; b9 f assignLObj := rgmanager.rgAssignL;- W( o" M8 P5 w4 S- v0 A$ x
row := assignLObj.getRowNo(GlobalDistObj);- H- |7 i. B) i+ j: S
if Row = -1 then -- since 70
* [" G8 U5 i- y% R if lan=1 then
1 R2 C: L9 }. V: x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 K3 B# E; O% K( ~; ~
to_str("in der Andockstation: \"",?.~.name,"\""));
5 x$ \' v4 ?$ r9 G6 x' {3 o else
$ x3 P0 N; \4 P- P$ a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 i d/ ?3 B9 @$ ~0 Y+ `3 B
to_str("in docking station: \"",?.~.name,"\""));
/ H2 Z# w, m0 P6 x end;
/ a" n r" s% H& J) K3 b else9 v, t+ `3 y/ D& e
@.Destination := assignLObj[1,row];
: ?6 z2 a+ W% r2 [8 z end; ; h' F1 H. n' G" U Z
newDirection(@);
- E0 M0 `; l4 C @.HasOrder := true;
) @* G% Q( I4 B4 R2 q3 Z1 {. P end;- w" _6 N2 Q. e8 L
end;7 e5 c0 O) A L/ i; x2 j6 h' `
end; -- of the method
9 @# O& G! ]9 L, f- s2 C- W |