/* called by: entrance ctrl of the object 'track'/ o, _, u4 n1 n% y6 q
*/
7 H% ^. {3 ?- X2 A$ @ S% Pis
p; k7 Y+ S0 `- f/ K7 \! ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 J7 y$ V7 `+ O; gdo
2 x9 g- X% N7 ]( K Lan := rootfolder.Internal.Tools.AOLlanguage; |8 ?0 ?. K6 |) c1 ?2 _, E$ v) w
if current = @.Destination -- else return
& X+ Y; |4 d* Q# d5 Z, m then
3 O/ f% b* j' ? @.Destination := void;
' R1 z: u7 I: g" f* L! K if @.occupied then2 P5 e9 y! a( q* S6 _2 F0 Z3 I
part := @.cont;
5 t9 e. I. \6 Y5 f/ T9 p3 {9 O& ~ @.transpOrder := void;" b* c5 h' s" r! M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ O/ \3 [0 h9 \7 L: o
@,root.eventcontroller.simTime);
+ P, Y, k+ Q5 `* @$ B s @.HasOrder := false;" l. j( K! g5 a/ S! b5 u
@.DrivingHome := true;
1 n. B& J: h0 |4 v& X6 x rgManager.tryToStartTransOrder;/ Y% t# F6 b0 U0 Z( f+ y" [
if @.Destination = void! }' N+ l9 ]7 X) P/ ]& T6 {
then -- no transport order for vehicle @: |% i. x2 d5 i- W2 p1 R( o
@.Destination :=2 Y) N* D: a9 ?8 k7 I
rgManager.nearestFreeStation(@,track.~);' u3 l# v: }$ v9 C3 K/ C
newDirection(@);
! X4 @. j$ Q2 F. j/ N if @.Destination /= void then' k; Z, W: L: x8 I( `# G
@.Destination.NumReservation :=
/ H1 t7 O6 j& w @.Destination.NumReservation + 1;
' @; r" I4 @0 o* U end;8 C' Z. I2 \& _: L2 R
@.CurrIcon := "drivingHome";
$ W* R! {1 O) u& | @.DrivingHome := true;
6 A1 F/ i L5 K0 b end;
@# D Z* ^- ?1 A, C else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 b4 u t/ {: t u3 S part := @.transpOrder;
& d8 ]; l' E0 D9 l) x part.move(@);-- load part% S0 e+ c- j6 a# B' v
@.CurrIcon := "load";
9 A# J# m8 v. ?& o3 D) Y GlobalDistObj := part.globDestination;7 S; i6 R H. m# g) W
assignLObj := rgmanager.rgAssignL;
" h6 I! i& P/ `4 K/ y$ } row := assignLObj.getRowNo(GlobalDistObj);3 ?' B1 u1 t6 Y& l5 p5 c
if Row = -1 then -- since 70: w- N* ]- u# P. Y
if lan=1 then' g) k$ \" B# a5 ], h: j/ M# @ Q4 b# h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ C& \: X7 u( u0 l7 d$ I to_str("in der Andockstation: \"",?.~.name,"\""));" w v, ?* Y3 H6 t- C1 B8 ~
else
8 ^) h& L3 c) P! F$ |# f& L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) g, j: w8 [% K6 a$ J to_str("in docking station: \"",?.~.name,"\"")); : s& u- O/ q/ N4 b) k) A/ |
end;. I/ _4 m8 V8 _
else- j9 `- K5 s, R/ T: H. C: V
@.Destination := assignLObj[1,row];
( i; l% v8 Z2 X$ X' p$ { end; @- A3 s6 x$ d @% A; n# J& {
newDirection(@); ~# T4 H: `3 O3 ?
@.HasOrder := true;
' i8 j! ^, \2 q: x4 Q5 `, v7 `' D end;
, d4 w, X; D. ^/ K* I4 Z/ E2 f end;
0 {2 V" r* B' R& D4 lend; -- of the method
( P/ h1 r$ w$ f& Q% \" t- y! i |