/* called by: entrance ctrl of the object 'track'% c5 f% h. S' k& q5 `2 r
*/' D/ F0 E& ]. H
is
9 h2 S, q5 g7 _$ T part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 X, J! Q9 K U( v
do
$ P7 I/ P9 e/ \, I* ] Lan := rootfolder.Internal.Tools.AOLlanguage;
4 X: _9 M: h' Y4 h" i# @' i- c7 K9 f if current = @.Destination -- else return3 M' }' z' C8 J
then0 K& [$ n* F; h6 L5 J. C( G# g. d% X
@.Destination := void;9 p/ N8 T7 [( u# v' M2 ?1 S7 n/ w
if @.occupied then
( I0 F, ]9 [9 c, o' k part := @.cont;
; Q/ H% Y% [5 S) b @.transpOrder := void;7 Y5 Z) d9 @3 N3 {5 d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& t7 S! [' |( _* t
@,root.eventcontroller.simTime);
; n% [8 W5 G$ r$ D, x& S/ K @.HasOrder := false;3 O+ n! G& {/ ~. D9 i+ u5 B6 p: _) I
@.DrivingHome := true;' G' {! C9 N, @4 \6 \% V! Q
rgManager.tryToStartTransOrder;3 ^- E$ @9 L6 _" Z2 B# X# _, w4 h
if @.Destination = void
) Y \, m( Y4 N# L: H1 } then -- no transport order for vehicle @) m, {# T1 o) d2 Z
@.Destination :=
H: u% a1 K- G& o! a* @/ \( }* n rgManager.nearestFreeStation(@,track.~);% A/ h3 ]: Y1 I+ `- k
newDirection(@);
& I% G4 [) [* e6 w; c. H+ ? if @.Destination /= void then
# I( g' P. m' P9 L @.Destination.NumReservation :=5 X B0 B% Y! s/ h" f, h6 q
@.Destination.NumReservation + 1;) M* T& D+ x, F: A7 f
end;+ b$ o: F% F/ K: ]/ d
@.CurrIcon := "drivingHome";5 S* B/ [! D. ~. }
@.DrivingHome := true;0 f# i; W) f: j( N3 d: n0 j
end;
+ Y. F8 [; W- ^ P9 @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station( G& g7 `; \1 f1 c+ J k
part := @.transpOrder;" E: M8 ~8 |) {4 K$ z$ W
part.move(@);-- load part# Y! [% R# P5 C8 S' ~: j4 E; d
@.CurrIcon := "load";
8 ]- I$ W) _$ `& E4 I GlobalDistObj := part.globDestination;' [! U/ @/ u# q$ ^2 j
assignLObj := rgmanager.rgAssignL;
. ?* N# ]: m0 z3 g' V row := assignLObj.getRowNo(GlobalDistObj);
* o; K, o0 G& I$ U& Y# J( `- {: H- ? if Row = -1 then -- since 703 n% c- r3 ?9 _- |5 O
if lan=1 then. z d0 p' u0 g2 c- B! Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. p; j( ^' [# @4 P0 L2 n3 D# A to_str("in der Andockstation: \"",?.~.name,"\""));; Z) |7 A+ U0 p7 F9 B
else$ H7 c3 v9 `, o6 F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) l$ J- G+ S' V; T) _
to_str("in docking station: \"",?.~.name,"\"")); X6 s2 H F2 A1 @# j
end;. i' c! ~' I. `( P5 d9 H5 F
else- [. a, ~2 o) S! Q _$ K
@.Destination := assignLObj[1,row];
6 K! q% q( _( M h0 X- R: V" d end; , K, w( ]. J* p( B
newDirection(@);6 m* @6 J; N: M( a1 ?" l0 s
@.HasOrder := true;) F4 ^$ h6 r& M! B, |. Y/ i
end;
3 N" H4 i( M, l end;- {3 f- M: S5 v2 |% l4 L. s. u
end; -- of the method
/ c: ]/ j3 g0 A |