/* called by: entrance ctrl of the object 'track'
4 ^8 J8 f6 p5 O* Y*/# a7 C% v5 g' D& P k5 y3 n
is
8 q! W4 O. l6 w3 [- z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! G; K9 l+ D( t9 F% @0 zdo( u% Y1 {0 [1 X/ t: g! g
Lan := rootfolder.Internal.Tools.AOLlanguage;
% ~0 m U. k( v1 P" H0 w if current = @.Destination -- else return b5 C, j/ I( V9 D3 D
then5 r) A! b" u3 w$ G* K3 w( c* y4 T+ ]& t
@.Destination := void;5 ?) n+ r8 F3 @- J l
if @.occupied then' R8 o$ R9 i0 X
part := @.cont;3 s9 [ j W1 ~: l4 F" _+ m& Y" @
@.transpOrder := void;
* N- F9 w4 F- N3 p9 C6 ~) V0 z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 Y% w# X4 V6 |1 o ^; Q" A- p @,root.eventcontroller.simTime);- Q6 H0 M B; D+ z$ U7 @9 D; t
@.HasOrder := false;* j6 z* v; }* m6 u2 z
@.DrivingHome := true;
1 S8 ?$ \& l/ q1 `, }' A8 _ rgManager.tryToStartTransOrder;
; y6 M! g/ d+ p3 T- U$ P if @.Destination = void3 B- s! s* H7 K( k
then -- no transport order for vehicle @
2 d' J9 E5 [, U$ y- A- ~: } @.Destination :=
0 I2 ]5 {8 e4 @( v rgManager.nearestFreeStation(@,track.~);6 E7 Z' v9 ?9 _/ P" B0 j' f$ x2 @
newDirection(@);
2 m, p' L' X" H3 b- I; R if @.Destination /= void then
8 H) t7 q+ _1 U% C @.Destination.NumReservation :=
2 m( }* M# `8 ?" d8 t s- W1 d' w- [ @.Destination.NumReservation + 1;
( ^) [6 Z! Q* V& c+ [4 o, e end;
3 U, v/ b1 n6 m% t @.CurrIcon := "drivingHome";
0 |. r8 l: _4 p" a7 a7 N0 \# l @.DrivingHome := true;
) D2 o% h. r6 X- S1 n# C, z0 O4 D end;( a, z; W* L7 a S' M% M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 V6 C# F6 i. b) G9 ], ?0 t# `- ] part := @.transpOrder;
; G! \3 B9 v. l part.move(@);-- load part; C4 D0 u2 X! K
@.CurrIcon := "load";: {- Q1 V& r5 p `- i. Q
GlobalDistObj := part.globDestination;) y% u/ ^" K! M/ T# X
assignLObj := rgmanager.rgAssignL;2 x q/ P; _5 G$ ~
row := assignLObj.getRowNo(GlobalDistObj);
?& @; {+ h3 M' P2 ~ if Row = -1 then -- since 708 ?/ R# N e% W7 o5 {: J
if lan=1 then- w& @9 I! s. H; M4 l- E: Q' j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, n6 T2 b0 ?; o
to_str("in der Andockstation: \"",?.~.name,"\""));
3 `0 t w) N% n5 w# t else, {, H) n$ K1 h6 p% u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 @$ N) I' b f$ S: h, }4 z T3 c0 G8 T4 o to_str("in docking station: \"",?.~.name,"\""));
9 N+ s9 ]2 r. m% o0 D0 E end;' e- y$ s2 G( f$ d. C& w
else9 ?6 \' y0 G- y2 X/ E% ]$ z% l: k
@.Destination := assignLObj[1,row];
( P) C4 c9 [" g4 v/ } end;
# A5 H6 L, B! O8 i newDirection(@);
7 W, i' |6 F4 u. k' k @.HasOrder := true;: Y0 \: K# Z8 [4 x. k+ `
end;
1 L$ g! _& E8 e' t& F end;9 I0 W- r) _" A) V4 {6 {4 _
end; -- of the method! H8 V1 v7 X% l
|