/* called by: entrance ctrl of the object 'track'* g- R! ?: v8 w4 T
*/4 G: A# p3 D' j+ u+ F) X
is
. N5 E6 G' N8 P# v7 D part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 o9 v% V' I/ x7 O* { P: n
do
& j. E7 S- S9 D$ q5 y Lan := rootfolder.Internal.Tools.AOLlanguage;! ~. V% f- [! M- X; t
if current = @.Destination -- else return( B7 ]4 {: c. P1 {5 Y! k
then+ I* u4 ]. [* S$ ]
@.Destination := void;
: D: u. ~! a5 y if @.occupied then
, u5 s2 {1 q) i. m* h, ^. R part := @.cont;/ e0 {5 \( B6 J: O2 |# W7 i
@.transpOrder := void;
" M+ I/ H3 }- i$ | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' x9 b& W5 }+ u) ^ r- B
@,root.eventcontroller.simTime);7 t6 i5 }7 j4 \3 C! r, t
@.HasOrder := false;
4 b! ?) s# r R- U+ j @.DrivingHome := true;& B( X, C8 R( s: ]/ @4 j' T( H0 x
rgManager.tryToStartTransOrder;9 m! m" P/ b6 ]1 R ?2 z
if @.Destination = void! b) v0 q3 J' w( |* j
then -- no transport order for vehicle @
9 v% E% X( P0 `; w8 } @.Destination :=0 K# u" E) g' R f
rgManager.nearestFreeStation(@,track.~);; X! q% s$ S w3 ~9 `7 O3 i/ z: q) n' d
newDirection(@); . R( g' A$ Y' f& ` q
if @.Destination /= void then' H7 B D/ c$ d8 ?0 H
@.Destination.NumReservation :=
7 `' K( p4 P4 W @.Destination.NumReservation + 1;
# J& E8 s* a) a y! [4 ^ end;: R. i2 [$ S) {# c$ N8 q; Y2 D1 y
@.CurrIcon := "drivingHome";
* G! \ B3 e+ Q @.DrivingHome := true;
9 u, ^7 b" k3 D end;! R: ?( e4 w" u7 ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ l" W) v2 [- _4 {" G part := @.transpOrder;# L: H+ q) G5 l; s* d7 ?
part.move(@);-- load part7 W* j$ k: M2 l1 B/ {
@.CurrIcon := "load";8 m- V* M1 ~ i
GlobalDistObj := part.globDestination;( V3 ?& \0 I$ j* t- Q* N. c
assignLObj := rgmanager.rgAssignL;
. ?$ C( P4 f% p1 s: J5 G: g row := assignLObj.getRowNo(GlobalDistObj);, B) _) A5 |% d, w$ `0 c; G8 i
if Row = -1 then -- since 70: ` h3 ~! q, s/ R' B# `+ X) H
if lan=1 then/ F/ p) l0 u2 u3 I* H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( M% J; m" u8 ~; D3 j to_str("in der Andockstation: \"",?.~.name,"\"")); u! R" g" t# w; A7 F% D+ a- E
else
8 x, B8 d3 S' h& O" n9 C$ i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, Q4 P! R5 I' C" }+ t9 F6 S
to_str("in docking station: \"",?.~.name,"\""));
: d2 Y. o" o% D/ x end; m2 z8 y: Q1 U, j: A( m3 v
else
; K/ c: }) \3 b0 h! ] @.Destination := assignLObj[1,row];9 ?5 v2 G0 s0 C* l1 ?
end;
y) R( k2 x3 C3 e( G# g- N6 D- x* _ newDirection(@);4 B) f7 z: p* H4 I$ o$ \
@.HasOrder := true;
8 j8 U# a- L2 F end;
$ m$ E l1 b% V3 w6 D }3 L end;
5 n/ X& B1 ]; l' D0 kend; -- of the method
6 _, p2 V8 _& I7 K0 v" _ |