/* called by: entrance ctrl of the object 'track'' U3 P6 g4 [4 Y7 _0 B
*/) S5 c$ L8 H0 R% t9 |4 e, s3 A
is0 {+ B5 q1 D! p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 i: M: d. I4 G* h% m! pdo8 p% ^' b1 G! i- H$ T) }
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 ]' i- m+ k& h. ^5 Q if current = @.Destination -- else return& `( F, Q. v/ _
then
2 E9 M% j; i. M: O7 Q, i' l. S @.Destination := void;
& r$ z# L2 D! E$ t if @.occupied then: q/ R6 O) P2 E( l& g' K! o
part := @.cont;; ^1 q& g8 N, \- ?9 @
@.transpOrder := void;
( q F& k7 h' t( E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! m2 {9 D- S: l4 e* z' U! y1 @: i
@,root.eventcontroller.simTime);
# Z$ K$ J5 m8 A: { @.HasOrder := false;0 ?3 p9 F* U; R0 [* y9 u
@.DrivingHome := true;
- T. Y+ @8 C9 s; M rgManager.tryToStartTransOrder;
+ x# F: R0 b) e8 e7 c7 l1 p if @.Destination = void2 Q, F& J& H" ^( }: D2 j! m
then -- no transport order for vehicle @
( [4 R) n# T$ D' {$ H4 E% F @.Destination :=1 s* P: ]. K; s1 k
rgManager.nearestFreeStation(@,track.~);
8 I- _3 K8 s" J' i/ r3 E newDirection(@); * |5 a5 _( ^7 i* u# k/ s! Z
if @.Destination /= void then% s) `- L: A9 q9 `( W* }
@.Destination.NumReservation := L* K+ L' I- ^( q2 O B
@.Destination.NumReservation + 1;% T& F2 N& a# V* W; y3 n1 }
end;
# K2 b3 U' |4 P. m) p; H0 g7 T @.CurrIcon := "drivingHome";* _* Y& y$ O, ?: L% p/ ^9 O& }/ M" R6 s
@.DrivingHome := true;- M) a8 Y- d& D. R8 a. [( u
end;. ^4 D0 h7 J# O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" p. c: K' L8 p% ]5 ~ part := @.transpOrder; [$ O* y* K3 p$ |/ u
part.move(@);-- load part9 e* s" V. Q4 y" [: G6 V. B9 Z3 N
@.CurrIcon := "load";- x4 ?# W7 v; I" Z" o
GlobalDistObj := part.globDestination;3 O+ H: ^2 Z+ @
assignLObj := rgmanager.rgAssignL;
) c! G H) S) {5 p# @/ \3 g row := assignLObj.getRowNo(GlobalDistObj);8 r9 J3 q6 @ Z0 [
if Row = -1 then -- since 70: i3 m3 O2 z; I' f4 R, S2 Z
if lan=1 then; P9 ]% y5 G8 e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! Y0 L$ X1 a+ R1 T7 x: [' Q2 E to_str("in der Andockstation: \"",?.~.name,"\""));
" H9 a6 [2 G# b else1 {- u! ]% |' |5 Y# p/ M0 t: }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 w* b0 l x# Q
to_str("in docking station: \"",?.~.name,"\"")); - T9 M! c! @9 |/ `7 x1 }/ X" X" X
end;* _/ C; w/ y' X5 p
else
4 J4 p4 d: x- `1 Q5 J3 p @.Destination := assignLObj[1,row];# A) }* v" z* `9 i, C: k6 H
end; 9 _! [+ i& u& E& M4 R% x7 D
newDirection(@);
% T3 H1 X- m" o1 z @.HasOrder := true;( u! s; V9 ]4 k# R+ U: W
end;+ o+ [5 s! v' R4 B: J
end;+ ]4 j' P K! e: e8 k
end; -- of the method& n3 m) p6 u* T+ z0 c
|