/* called by: entrance ctrl of the object 'track'
: B/ e: K% ~7 e f9 d3 e*// n. _/ t$ S3 g* C9 F) I/ J6 r
is
3 \+ v# A- J9 W, x: W% b part, GlobalDistObj, assignLObj:object;row,Lan:integer;! z& l2 s- I- t' j$ @9 P" t
do; {) l) G7 Z% B5 {. f
Lan := rootfolder.Internal.Tools.AOLlanguage;2 b9 \+ Q8 U/ d7 {2 W6 U: t
if current = @.Destination -- else return; L# T2 G" w7 b2 S, x: G+ d
then6 n1 ? j& I7 w6 `) a
@.Destination := void; B/ e/ n% a- E( k# g7 t& f& p
if @.occupied then, F1 U- T/ l- W* ?4 r. w
part := @.cont; `% V {0 h' @9 F# D: u1 v9 b
@.transpOrder := void;5 Y/ p1 S C1 ]1 d3 c& g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 c# q6 H. j2 B* ] @,root.eventcontroller.simTime);
( L, |+ d) x( J, m0 E @.HasOrder := false;
5 ?4 ]" p u. Z _* f @.DrivingHome := true;3 w; l! W) d1 g! _) t. L% ~
rgManager.tryToStartTransOrder;
8 S8 Z; A7 y( v# T7 d9 R. M# @ if @.Destination = void
% @% K. {) E5 G& r8 E0 p4 V' d then -- no transport order for vehicle @' R2 b$ I) V: Z% l
@.Destination :=) U. I% o! V8 D5 q6 q
rgManager.nearestFreeStation(@,track.~);/ z: ?0 l3 P* U$ A
newDirection(@); 4 F/ y' K: [0 {' z
if @.Destination /= void then
0 V2 G2 I: \& }0 [6 d$ y" F# P @.Destination.NumReservation :=% l3 B+ P; g, r* V# v
@.Destination.NumReservation + 1;7 \+ {: h1 ?( ?
end;% R% H5 v; _* N. |" B. Z4 k
@.CurrIcon := "drivingHome";
6 ^4 b* }. E$ s @.DrivingHome := true;0 k; b" M2 ^: [* i5 y7 ^
end;
! O. P6 K7 i8 X; _ J else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 }8 p5 y, S+ A# K$ |( h part := @.transpOrder; r Y, D/ R" H! o |0 p" C3 Q
part.move(@);-- load part$ N& J; Q* `6 u; ~' C7 C( w
@.CurrIcon := "load";
8 c8 N3 |$ G" ^- V GlobalDistObj := part.globDestination;8 O( J9 W$ s# V- b' L
assignLObj := rgmanager.rgAssignL;
; ?4 ^# a! j- H+ c k. } row := assignLObj.getRowNo(GlobalDistObj);
( M5 \% ]! i S4 q( V5 p* [ if Row = -1 then -- since 70% `- f: t7 t7 R+ Q2 n6 f* ?% V
if lan=1 then) e9 C* c6 g# p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; L% Q4 s/ v% C
to_str("in der Andockstation: \"",?.~.name,"\""));
8 G5 w, Y+ i5 _1 O4 O" V2 d else% _5 P: k* S2 U# g4 t5 _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 P" m5 Q V/ N6 T9 m9 S
to_str("in docking station: \"",?.~.name,"\""));
1 y$ G* \+ ^; f( P! b! m end;
8 }3 v4 B( L% K4 F9 f else. b- C7 i* K/ X# w; @' n L
@.Destination := assignLObj[1,row];7 J6 L. ]. T! n" d- ]+ l
end;
6 h8 f2 g8 b2 D t6 M9 Z# j7 p, \ newDirection(@);+ X! ~) O8 a3 r2 l) ?3 R3 c0 t0 {
@.HasOrder := true;
$ H! L7 w+ I1 e0 B end;7 L* |# s# h" i; n
end;
1 M0 F& v2 f5 A; lend; -- of the method
, x6 M; S1 N$ h" O |