/* called by: entrance ctrl of the object 'track'
: }. U+ v9 d0 B6 ?( r( I6 Q7 }$ N- O' t*/
3 t' z* {0 o# _: f/ S& M" U$ }7 ais
1 }6 l6 S+ W5 h* d' Z& e part, GlobalDistObj, assignLObj:object;row,Lan:integer;- O( J( H4 {( D# p
do
K# T. ?) b$ D, Z5 R Lan := rootfolder.Internal.Tools.AOLlanguage;
( i' A! A* h, X r# H: J/ A3 \# \) l if current = @.Destination -- else return
+ v& x2 z8 Q0 \1 x then0 q# N, _2 z* P
@.Destination := void;
! ?: ~4 Y- u* s+ `- {2 Y4 x( e if @.occupied then
7 W( e( n' x% F4 f part := @.cont;" m! s4 g. x; q( F8 F
@.transpOrder := void;2 s. D' _6 n* d' r1 Z! Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 y6 H0 o6 ?5 m
@,root.eventcontroller.simTime);! i+ P/ x7 i: j* C1 ?, m
@.HasOrder := false;& L. z0 s- G7 u
@.DrivingHome := true;0 k/ k2 K& ?6 `( \3 r& b3 \
rgManager.tryToStartTransOrder;% o& ~0 A& U$ N t; E
if @.Destination = void+ _& A9 G5 P3 t! p( E6 b. j( k
then -- no transport order for vehicle @# o2 f1 @- @% l1 X7 z$ m7 g# ^
@.Destination :=
, X& O2 l9 l) H) O4 E; ?% U5 | rgManager.nearestFreeStation(@,track.~);! y' N& _. j8 \( q- z6 C j
newDirection(@); 6 P" V; A* i# ?7 k
if @.Destination /= void then
; _3 V$ R, @, i9 \ @.Destination.NumReservation :=
* ~' Y; l1 I, B+ B @.Destination.NumReservation + 1;+ m z6 y4 `0 Z9 Z& p$ `1 q: `
end;
' d% N1 L4 _' a8 Y2 N( `! q/ T @.CurrIcon := "drivingHome";9 z: B8 z$ ]- n" L6 t6 V
@.DrivingHome := true;7 {5 m6 I% i9 j* l, z
end;
) S" ~* K- E6 c9 h2 w* E) [: p; T else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 N, Y' H: F6 k, F part := @.transpOrder;
5 |+ E4 \9 K% D" @) o part.move(@);-- load part
7 N7 P, y2 O8 Z6 o" g2 F! `! L5 Q @.CurrIcon := "load";
4 _( s6 Z8 j, h( ^6 N GlobalDistObj := part.globDestination;
0 K. f1 G0 R% _- y; W assignLObj := rgmanager.rgAssignL;
* o! W4 i0 b; O- C: `1 } row := assignLObj.getRowNo(GlobalDistObj);$ z2 J4 T* t. e" ^4 C
if Row = -1 then -- since 70
: r. O! E9 w3 g) u if lan=1 then# y: ?/ B8 w% l
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 ^3 v( f7 A9 e7 A9 [
to_str("in der Andockstation: \"",?.~.name,"\""));7 p% i% s9 a5 U
else* [7 f8 _1 t5 H) _. |" ^* n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% B# ^' u* \) T0 d+ D; I to_str("in docking station: \"",?.~.name,"\""));
# v4 L" p' X6 n n8 J end;8 n( K- K# s) ?: u: E
else7 r- u. W |* a2 C
@.Destination := assignLObj[1,row];
0 y% o+ ?- W; h, |& o end; 2 h* c. ]1 q, h
newDirection(@);7 b! z" I& A, m2 q
@.HasOrder := true;
- B4 M. K2 U4 F, f8 F end;! O( Y4 q+ A. {* O- _- r
end;
9 U+ o- a4 ]% C& l' A% e0 Fend; -- of the method
" j3 ~+ s9 F; K" Q, Q& P4 b |