/* called by: entrance ctrl of the object 'track'
3 l$ H# [0 G. {*/! ^$ J: q( T- @/ v. H; Z
is
% j+ ~/ c/ b# r. g part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' N! k9 Z0 j" n/ X$ }) `. [: I N$ o' ~do; d3 m+ v: h! {5 l" F+ g) I
Lan := rootfolder.Internal.Tools.AOLlanguage;: W2 }' X$ Q$ G$ M# N
if current = @.Destination -- else return+ t* r+ C) L/ u
then
/ u7 c" ]% R- d2 v @.Destination := void;
( ^5 o5 j8 e& L/ S if @.occupied then8 R1 s a3 l" P- J: k1 w
part := @.cont;
% Y8 h# H# y( [+ M; s @.transpOrder := void;/ p* h! }! t3 v* E. J* g1 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! H( I. m$ y6 r4 h @,root.eventcontroller.simTime);
W' Q" p8 h! A ~% V0 B2 h @.HasOrder := false;
( C, B2 c8 t: P1 H/ ?, U @.DrivingHome := true;6 h5 u6 a8 \' {. ?
rgManager.tryToStartTransOrder;
1 J6 P9 j1 R8 H2 p1 w# y, `( f if @.Destination = void
+ F: G% T/ B$ g+ L) k* v then -- no transport order for vehicle @& G! C2 h q" @& A- {& W5 u
@.Destination :=" o3 n2 l* s$ z2 k5 i* a$ P$ q8 y
rgManager.nearestFreeStation(@,track.~);) Q' j0 k0 p+ n9 c2 f4 G
newDirection(@);
8 y5 v. A- |# a6 v1 f if @.Destination /= void then
( y9 v: K) f' {) b- b @.Destination.NumReservation :=
$ N) N$ n* T# _8 o3 E @.Destination.NumReservation + 1;
0 c8 V; m, X$ W end;& y- A7 L" t" e/ V1 v0 G
@.CurrIcon := "drivingHome";
$ g! Q3 F4 c2 V* D' K5 O @.DrivingHome := true;" Q7 s# ^$ {# f3 a
end;( x* a" m- K/ \, G, U6 ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. m% f% R9 g% h$ K
part := @.transpOrder;
1 @; t/ M' i4 f* X6 L( `3 Z5 s7 ? part.move(@);-- load part2 _* }& x+ x; o3 V$ S- _
@.CurrIcon := "load";
4 G% ~: _6 j% q) v0 J: d Q! A6 A0 ? GlobalDistObj := part.globDestination;
9 d6 Y* P* i7 B4 U, N9 B" J- N assignLObj := rgmanager.rgAssignL;- H) l' E, u, f6 w" |) ]4 y! }8 Z: I
row := assignLObj.getRowNo(GlobalDistObj);- g' S# q6 K; [! o, f4 @/ f
if Row = -1 then -- since 70& K0 `- x+ C7 B3 @& R1 S( l' i6 H
if lan=1 then2 T( A3 B" S% W6 @; e/ u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ \8 [& i8 ~& C. W! l3 ? to_str("in der Andockstation: \"",?.~.name,"\""));
. _3 \. z; C4 r2 ?4 g; c else
2 ^9 X+ D' E+ l4 N# u: f( @0 z1 ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, T. e. r) b$ P; P9 ~! U to_str("in docking station: \"",?.~.name,"\""));
s$ f3 O S5 b end;# b. }4 _% @* `& f8 n8 V
else9 d- W7 }0 e3 F% P5 ~6 }
@.Destination := assignLObj[1,row];
' \7 p c6 |9 j- c9 U end;
1 I0 X8 `2 Q0 J/ V newDirection(@);: o% r) {- @+ p5 l- I9 y3 y/ c! {
@.HasOrder := true;
9 e0 W( K( c p: n end;
$ v* B8 G" i, a3 a+ X, t end;
/ {; j& t1 R% _4 H8 ]5 I3 s) X) k0 b2 T7 send; -- of the method
?4 q7 t3 J Q @9 R |