/* called by: entrance ctrl of the object 'track', M8 s& T. @; K) @6 w
*/
( @2 [4 b r; R, b! u+ @* Eis
/ u% O3 i& E q7 ] ?6 w part, GlobalDistObj, assignLObj:object;row,Lan:integer;& s9 u1 P6 P( f6 q& u# [8 {
do
8 q* i: G! Y/ p9 \ Lan := rootfolder.Internal.Tools.AOLlanguage;3 O; K2 o9 s3 s7 X; \ d7 r; z
if current = @.Destination -- else return6 v0 B, C- |) m5 }6 k
then
2 K+ T$ k' _6 C @.Destination := void;1 \( Z$ E5 D* d: |; u
if @.occupied then7 w5 D9 \- \# {% t5 |1 l
part := @.cont;
" R# j4 Z1 K) C& z5 E4 n* [; t @.transpOrder := void;7 P6 u: |6 p! M" @8 |7 V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 @; [- C& [; _9 B @,root.eventcontroller.simTime);& }4 M% `1 n) v3 I/ q
@.HasOrder := false;
9 Z- b; j p, n. H @.DrivingHome := true;' h3 j: @2 L4 Q: A2 N
rgManager.tryToStartTransOrder;4 s* ]& R6 P- [5 g Z1 S3 t7 e$ c
if @.Destination = void/ y! X# c; Y9 M9 O0 O. [' t7 L" _, `% B
then -- no transport order for vehicle @2 W1 A7 y" D- d* |: X M
@.Destination :=
5 H' r( ] n: G( q- H rgManager.nearestFreeStation(@,track.~);, w0 V( V5 Y1 G5 ~
newDirection(@); 8 g4 f) I9 r$ v! b
if @.Destination /= void then5 h. D' l) l: a& P0 |! U& u" k
@.Destination.NumReservation :=
. u" z6 x9 t/ c @.Destination.NumReservation + 1;
% r8 W5 o7 D; t) W. d: M end; q) {5 h* R! ^- q, d; Y5 ]4 J
@.CurrIcon := "drivingHome";& `' j0 r2 v' d* I" ~, {- S: o, P$ _
@.DrivingHome := true;& W3 W# C- A. Q% w5 K( ~
end;
. u+ W1 o/ x* V& Q8 `$ ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 d" Q! T: O; B. v part := @.transpOrder;% ~+ {7 `* S( u7 Q. M+ K0 t5 b
part.move(@);-- load part+ T2 k0 S: u3 H' u y# n
@.CurrIcon := "load";+ ^' H! T7 X/ [( a, Y
GlobalDistObj := part.globDestination;
: s4 [4 \1 q% r$ X assignLObj := rgmanager.rgAssignL;7 C( K. [, T1 C4 |9 F
row := assignLObj.getRowNo(GlobalDistObj);4 |8 S# B- P2 b- g& l- }; t
if Row = -1 then -- since 70" e- B; ?1 {4 ~, k. x$ ]2 z
if lan=1 then; `% w6 ]; s2 s. Z$ g* L+ k7 r1 E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 \) M7 E, a# p, B# }* S to_str("in der Andockstation: \"",?.~.name,"\""));
# r2 M' v2 B1 h+ A( D) J else
/ e3 j% s. `7 e# O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 b* K \$ j! _" u3 n to_str("in docking station: \"",?.~.name,"\""));
* b1 q5 x E" J/ } end;; ?% K! t0 c3 ]' T; Q" r! m: k M/ g
else
6 Z# d2 d |: Z4 g @.Destination := assignLObj[1,row];* Z( d9 t+ q6 k9 m" T( f
end; 6 J) l; a0 t. O1 v
newDirection(@);
d" G1 k# b2 S1 l5 M9 W @.HasOrder := true;
+ a: o2 a* J+ O+ U end;
. y* W1 K: I# u end;( G0 i/ g) v% Q' H9 y5 `
end; -- of the method
4 w3 S+ `8 N3 Y" h* V. A" @' b |