/* called by: entrance ctrl of the object 'track'
8 `+ f+ `& Q. i4 H# @7 `/ Z*/& K w4 L1 G: z' ?6 Z# l& \
is3 ~6 {5 {* K6 h5 g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; E9 l) o% `7 \# d1 `& a
do7 a ^7 A% {$ L$ i9 i/ x: L% _
Lan := rootfolder.Internal.Tools.AOLlanguage;7 i; U* S! p' B( U
if current = @.Destination -- else return# x" c% ]6 X3 X( j) V' e
then
% `& U1 g n' E k& e1 k @.Destination := void;
) v! P2 e. S; B) e% d1 q' R4 l2 e if @.occupied then
1 Z5 D( u# |2 E6 P) J# R; i9 L part := @.cont;
9 T1 N0 l0 K& h* ^9 X( H @.transpOrder := void;
, ]$ p- q6 S; V3 H1 _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; Y6 z7 Q* I2 g8 {' t
@,root.eventcontroller.simTime);* n" G9 _2 _ F; ~5 u, s
@.HasOrder := false;+ M1 H m% b6 ^6 Z, p/ U
@.DrivingHome := true;2 u; R, ]; ~, G8 ~' P2 n
rgManager.tryToStartTransOrder;
5 F6 T( R: k3 n4 f if @.Destination = void1 Q. f% l; ~# H: m
then -- no transport order for vehicle @- U) s* b6 V4 W6 p+ }. d
@.Destination :=
6 g, w1 H" C& c' L2 } rgManager.nearestFreeStation(@,track.~);
5 ?3 N. g3 m* t* K* P8 J" R newDirection(@); 2 [* G1 T U( L
if @.Destination /= void then! V" _5 J: P+ W8 w% _% S& s
@.Destination.NumReservation :=0 |0 Y' c9 J8 G8 Z
@.Destination.NumReservation + 1;
0 k1 C& n& @" `' y) u2 _ end;/ E4 o; Z9 f" q% K2 C% C
@.CurrIcon := "drivingHome";& R: c& _4 J% T5 T, _- k$ W4 ~$ i
@.DrivingHome := true;
0 d3 a( K' S, a; Z. N end;7 [% W* i4 W$ a7 @* Z+ n6 b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 y+ p! R& O' E/ a2 q: B/ b part := @.transpOrder;
" a% i }+ ^, J, \" K1 j" o part.move(@);-- load part; r2 Q7 I5 P/ F ], ~
@.CurrIcon := "load";; n* E+ p- O6 B9 U0 ?8 Y# v" f; h+ E
GlobalDistObj := part.globDestination;
+ Y& l7 l6 u9 W7 c/ P3 x) B8 f" d assignLObj := rgmanager.rgAssignL;9 P1 @" O, w% ~0 \ M* K* p
row := assignLObj.getRowNo(GlobalDistObj);
% w$ i S% m, { if Row = -1 then -- since 703 x9 ^+ D, Q; U- p) z! q
if lan=1 then
& j5 t4 |9 q+ \, s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( \% T& N) K! A6 w) v, ~) ]
to_str("in der Andockstation: \"",?.~.name,"\""));$ { ~1 d" Q/ |$ z% _7 w
else: I5 @0 i; h' A& |; X9 l. m# ^/ ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' E9 N! p' t* C& [3 [3 I to_str("in docking station: \"",?.~.name,"\"")); 3 H7 t$ W5 L+ n9 X5 E" G; j
end;2 E$ w& F5 G" v! g# d+ [5 c
else
; b: B1 ^+ q, v. Y% a- R2 g @.Destination := assignLObj[1,row];
- p: o9 K) ]: q7 G% I. k4 @ end; 0 V- @5 C: E. V8 M! I. p
newDirection(@);' Y- o% P% I" y8 E" ?/ l
@.HasOrder := true;
, S$ S O0 A$ N( B0 f end;
5 S1 e+ D% k q t5 \0 v0 I end;4 z& }! \# l1 N! ~
end; -- of the method- g8 `% r4 W9 N
|