/* called by: entrance ctrl of the object 'track': M1 v$ O3 Z/ ]8 v
*/
9 {7 M7 L9 r6 ]& yis' }, c% e6 q/ N& T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 _7 H( a; L, p
do9 k# G2 o" s0 ]8 _
Lan := rootfolder.Internal.Tools.AOLlanguage;+ O4 C- t4 x! T* ~. [$ B7 @/ r
if current = @.Destination -- else return( |$ p9 {; |' r1 B; t1 o: g$ S" {
then0 `3 _0 P9 G5 }; h
@.Destination := void;
8 ^$ P( ]5 ^$ F, V" S# {- S8 ? if @.occupied then
2 c' x" q/ O2 |1 W9 }+ h4 G; ^/ T part := @.cont;# a9 g8 }; N3 z
@.transpOrder := void;
5 h9 u. Z4 W% u8 o9 x8 Y- u# |9 o$ T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# y4 {" j4 ?4 r e5 g( b/ q& h
@,root.eventcontroller.simTime);( y4 O5 g' `% @* q
@.HasOrder := false;
, r2 a: g v5 U) ]$ ` @.DrivingHome := true;
" ]" U5 K: ~9 G: f; Q rgManager.tryToStartTransOrder;! ]$ [" w. ~& r+ ^* W
if @.Destination = void
Z# h: Z4 L9 e9 s. \3 s then -- no transport order for vehicle @
1 G* Q2 z8 G6 U @1 `/ I' x @.Destination :=% G) B+ l3 K: e9 t- r
rgManager.nearestFreeStation(@,track.~);
- {# q- l8 n- _! H2 `7 z newDirection(@);
5 B4 x3 X* S Z3 i if @.Destination /= void then
7 a/ f. L" g1 [. x! ?. v4 |6 l; g @.Destination.NumReservation :=
) r" c, n9 e9 ~4 `; \3 U/ R @.Destination.NumReservation + 1;
" Q* T$ j7 B5 Y, _. m end;- ~. g# Q# N# q3 ?
@.CurrIcon := "drivingHome";
4 z3 d7 ]$ [* N& b8 v' z @.DrivingHome := true;+ z/ e+ M4 h! g `% y+ I9 _
end; {, [+ r3 w, d G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% G C7 P( ]! V- A4 t! f* o
part := @.transpOrder;* e: w: Y5 W' S, A3 R$ y+ E, c
part.move(@);-- load part
' _" S5 k8 D! v5 M @.CurrIcon := "load";
! k$ U1 O: d. d" O: W GlobalDistObj := part.globDestination;
3 R+ ^7 W- r: R: Y4 p' x+ a assignLObj := rgmanager.rgAssignL;0 a5 |. ?7 Y& q p' L' T
row := assignLObj.getRowNo(GlobalDistObj);& [2 A* l9 b0 U) y8 Q2 d$ }* y
if Row = -1 then -- since 70) d1 R: E& O1 R- h" R7 L
if lan=1 then
$ V0 }/ \' j0 B( M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 l- I1 {- F, m, L5 l to_str("in der Andockstation: \"",?.~.name,"\""));
: O; [, d7 u8 r* ?7 H else6 ~, l% F6 }* n* M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% ^3 q4 i7 {: h- p to_str("in docking station: \"",?.~.name,"\""));
" B# s7 B" e% r# O6 D b4 ^: d end;, F! N' \+ o/ v: h: s* T( Z
else; `5 B3 W7 P! S
@.Destination := assignLObj[1,row];
_. |4 S/ S$ y) n end;
8 M- A& Z' G: d/ f9 X9 ?7 O4 m, f newDirection(@);
. _! }7 p5 v$ e3 U @.HasOrder := true;; ~6 T; o/ K; q: y# n
end;! I- b/ H" d" b$ p( Z# h# o; ~$ _; u
end;$ I0 o. Q& Z) c, U% J# `% }
end; -- of the method
/ m. s! P' m4 g" ?: C- U/ H |