/* called by: entrance ctrl of the object 'track'! N3 Z: b, n& V% @' ~( K) s! Z2 U
*/5 Q$ J7 m- ^3 e( y
is
5 c1 @7 [5 i( a% g- @7 W$ P part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" y& `; z1 D2 \6 n! v8 Wdo
% g q( N1 b" M& F) y N Lan := rootfolder.Internal.Tools.AOLlanguage;1 X( p1 y1 V B: t/ P
if current = @.Destination -- else return
7 J) v! V4 @+ p9 {+ N then4 p* U- v6 k: C8 z; D7 I
@.Destination := void;, w* B. \- |) C: R9 R7 a0 T
if @.occupied then! P' `5 h% `, g/ a t3 ^; y
part := @.cont;) [ p* C" \" o. s' h v
@.transpOrder := void;5 z+ q* q+ q2 K3 h6 i( o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: @8 u& G9 _3 K# _; B) [/ j
@,root.eventcontroller.simTime);% D0 v$ m. y# L4 {$ {
@.HasOrder := false;
' _5 V( U: V. M% w @.DrivingHome := true;
& b# u4 e# k8 U2 U7 B rgManager.tryToStartTransOrder;4 E8 R, w7 P" `- p
if @.Destination = void
: c+ l& ^% m; q9 `" ]; ` then -- no transport order for vehicle @* W% Q: S5 ?. X$ d# O
@.Destination :=2 D7 N W9 J+ }7 @
rgManager.nearestFreeStation(@,track.~);
/ v5 S( S* d9 y3 T8 q0 I9 s newDirection(@); ' `: E+ J% f; k3 E9 @% H3 N
if @.Destination /= void then
1 M' N) o" D# Z: F3 H @.Destination.NumReservation :=/ l! f" R( ]( D# Y, D4 a. z
@.Destination.NumReservation + 1;
8 l# }1 }4 @- g end;
, C# `/ [5 I# I' b! i, h% w) e! g% r @.CurrIcon := "drivingHome";5 B6 R, b: c% F
@.DrivingHome := true;+ y3 P; p) t1 a+ ~' E2 q
end;
7 p$ e- H" B; N/ y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
C4 ] o6 \" z% p7 e: Z; Y part := @.transpOrder;
: g& ~+ h6 L R6 r part.move(@);-- load part
8 U- S4 v; j' |+ Z# d* h @.CurrIcon := "load";5 F# N# l1 E, h5 c, Y- R
GlobalDistObj := part.globDestination;. G W1 H0 s) \) J0 j+ l
assignLObj := rgmanager.rgAssignL;
# X' e: {1 ?8 ~9 p. I! f row := assignLObj.getRowNo(GlobalDistObj);
, C1 i8 o0 a9 J8 g' ]- i if Row = -1 then -- since 700 I' \- z7 h1 N: s5 r! B
if lan=1 then* Y8 y* R% m7 ]" A8 U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ I5 I, ^" ?: Z
to_str("in der Andockstation: \"",?.~.name,"\""));/ Q2 _; n6 |3 ^$ }# q* \
else/ P) X3 C ~6 e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," S% |. J( w3 j* @* r$ ~
to_str("in docking station: \"",?.~.name,"\""));
* W4 q7 T: ]" s3 W" P end;( g& r6 V, s1 h
else
8 S2 o) L7 o8 x2 Q2 ] @.Destination := assignLObj[1,row];( S3 @0 z# m) H& C/ s% E& A, g
end; : I$ X3 F& R/ X5 I* \, e* u/ `" E
newDirection(@);* U1 E1 v0 u- z" c
@.HasOrder := true;
7 ]7 @2 W+ ^+ s end;
) r, \1 u, r7 y+ U6 t- @& A end;
$ R: h4 a- d+ Q4 f" [% I" f. ~$ W% `end; -- of the method, r v' d: ?% V0 @! J
|