/* called by: entrance ctrl of the object 'track'
! G0 F* M# @7 K/ P/ ?$ Y*/% O: X' R9 k7 T1 N9 y% {+ ~+ Z
is
, Q' |9 j8 L) [/ L! T* g4 r! c part, GlobalDistObj, assignLObj:object;row,Lan:integer; y$ C7 Q! g7 Z/ e
do
5 Z2 w6 O+ u9 G- _+ S Lan := rootfolder.Internal.Tools.AOLlanguage;
+ Q5 n$ z- @0 m( T2 S if current = @.Destination -- else return
* j# Q V# h& L. R then0 { ?5 p& V9 D* J& p7 X, {
@.Destination := void;# M! N8 j- c4 j) i
if @.occupied then5 S" P1 P/ j L# Z0 O$ ]
part := @.cont;( m& H5 V) M% f1 P
@.transpOrder := void;
" W. ]% k5 b. P, ^2 h/ x7 K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 x, C; Y& H. X9 h8 e* X7 n8 l @,root.eventcontroller.simTime);" L# N* {/ X4 s7 `4 M. j; i2 I
@.HasOrder := false;) w" I4 B# s- [' A x
@.DrivingHome := true;: p' O0 c5 [, C8 y
rgManager.tryToStartTransOrder; i4 B! N% i6 e M2 }0 k( B
if @.Destination = void
5 `5 a7 y C( w( g8 X' M0 c then -- no transport order for vehicle @
* D, A* H" U& g' y; a H @.Destination :=- ]5 N( a' `% B9 B
rgManager.nearestFreeStation(@,track.~);) Y7 t! {! X& J# R1 ]
newDirection(@);
( R) x6 w, N. q5 G if @.Destination /= void then" ~/ B( }4 ?; A0 Z
@.Destination.NumReservation :=$ P h( x& u1 I( U3 ?0 ?) x3 c$ s
@.Destination.NumReservation + 1;
+ i8 O* O2 O' I4 F$ {# q end;
4 y3 t7 D1 g c9 q @.CurrIcon := "drivingHome";& k$ j- K% q" |
@.DrivingHome := true;% `. ~; R: v# X% I, ]. {
end;
( C+ ]9 D' \) M9 q7 M/ B" d2 n8 \$ D else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 g e$ F& z* g/ a, X# }8 `
part := @.transpOrder;
5 w& T1 n" ?, j/ a; d7 Q3 o part.move(@);-- load part& ` t: k6 H; I3 N8 n* A8 ~
@.CurrIcon := "load";$ u6 Y% Z) m; a0 w
GlobalDistObj := part.globDestination;
+ J5 J; q U" K) C; E assignLObj := rgmanager.rgAssignL;( q0 m" {1 X- B
row := assignLObj.getRowNo(GlobalDistObj);$ ~2 y; W3 ?* ]% I5 c) {
if Row = -1 then -- since 70+ T5 k+ [: v Y, m3 ~. l p2 l
if lan=1 then
% c; w z% H# g3 E! h9 j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 k) Q, m, g( f2 S/ Z
to_str("in der Andockstation: \"",?.~.name,"\""));9 p" S, n6 N. T* t: s
else( J& {; j9 f7 _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 L9 Q0 o2 E1 ?2 k h/ A to_str("in docking station: \"",?.~.name,"\""));
# p& z6 _. w4 _5 w end;
m# X( D {. C" L4 d( q6 i else) Z8 N% G. ^2 p& \" j5 F, z0 a
@.Destination := assignLObj[1,row];9 ]/ b/ b0 H9 T5 E% b+ V
end; . T7 u+ f1 U; v2 U* E+ J
newDirection(@);3 _3 K# ?: U/ U, G8 O$ S
@.HasOrder := true;
6 p: T$ o# l: V, {+ f end;$ X0 `3 T5 w4 q& ~& U
end;) j5 U+ j6 J$ r- O" i# z0 B5 q
end; -- of the method
* p* H1 `9 S* A |