/* called by: entrance ctrl of the object 'track': r% m& ^1 |1 s6 [
*/
5 c) \! z7 y- |is
9 [7 |6 q' ]. w$ u part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! Z1 \% ~/ A( Udo& n8 C) M2 k: v! g* y, a4 M4 G
Lan := rootfolder.Internal.Tools.AOLlanguage;
! L: C9 F) j3 R3 }0 H( g# | if current = @.Destination -- else return1 k6 m% @8 W0 J% Q1 o: d
then# C8 G3 u; \* h/ x+ U
@.Destination := void;( d. C' G" D7 B4 Z. |" R
if @.occupied then
- V3 V( M" D4 K$ `. D/ i* \) @" l( Z J part := @.cont;
+ R' T* A7 m7 j9 ~+ O/ F @.transpOrder := void;
/ E; N. r( l6 H3 a) @8 i; { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 j% a' \( L/ p2 W% H3 k& _# ^
@,root.eventcontroller.simTime);
# y( C- Q" o0 `& C+ S @.HasOrder := false;6 `- B7 H U8 M- V' o& y) U1 g, o
@.DrivingHome := true;; L/ J m2 K/ O' o; Z2 o* ]: Q
rgManager.tryToStartTransOrder;; e! u; U! s. i) @
if @.Destination = void! ^& J( t' }, j4 }( e" F
then -- no transport order for vehicle @: C! [3 X- G/ P3 W$ S
@.Destination :=, M3 C S7 U. Q* _8 P! y
rgManager.nearestFreeStation(@,track.~);% h3 h- v+ j1 l$ H1 D; c, I3 I1 P; Y
newDirection(@);
" d7 r- i2 `+ T, t! Q- i3 P9 E# T( S if @.Destination /= void then
A: }- k& s- K* O @.Destination.NumReservation :=
4 P9 { F c5 O% W+ i" D( S5 S @.Destination.NumReservation + 1;1 S& N1 h0 b6 Q5 i5 J/ y
end;
J$ O: e& p1 e% n @.CurrIcon := "drivingHome";
" v/ M3 |7 B! X7 G9 k8 F2 M7 o @.DrivingHome := true;
2 a ^$ Y+ \+ E9 A" Q. |& `5 H end;
1 A; t4 T9 E9 a else -- the vehicle @ is empty, both vehicle and part are in the same dock station& P' L0 U# j7 [0 K" s* k
part := @.transpOrder;7 X. l# g6 i( b5 Q2 U' ]! J; T. Y
part.move(@);-- load part
0 V. O' V0 \5 D1 W7 | ^ @.CurrIcon := "load";! s; _ r: |; @% w* ]4 G2 B
GlobalDistObj := part.globDestination;
! n) Z0 { Z" S6 h, l8 q" ]5 i assignLObj := rgmanager.rgAssignL;# a% ?. x2 o2 u* S! b7 l+ B3 ^
row := assignLObj.getRowNo(GlobalDistObj);7 g' _1 Y7 E+ k5 |
if Row = -1 then -- since 70- R9 ^1 O" h3 q) f6 S5 w
if lan=1 then
' h1 [4 y/ t+ m4 Q( c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ M( J# M; N4 \/ S5 \# B" W to_str("in der Andockstation: \"",?.~.name,"\""));
! c2 T+ N! J- p& W2 T, L else
. \3 F \+ \( E8 d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( q$ w' u' l4 x2 X
to_str("in docking station: \"",?.~.name,"\"")); % f: n& w2 S1 U7 [7 }9 g
end;
% f' j0 Q+ T9 m; t else
) u/ l2 i, [6 R, z. N: p* z @.Destination := assignLObj[1,row];& m5 c6 J/ ]" c- m
end;
; V" K9 i& Z. `7 J! L newDirection(@);+ u: S8 K$ |- p7 {+ c
@.HasOrder := true;8 c& {+ x# o% v$ ?' z: D
end;
7 g% u# O: W# E end;, `0 w( m% _$ K
end; -- of the method! W- [+ Y x: F6 F b" L
|