/* called by: entrance ctrl of the object 'track'9 Z9 G( \2 K* r! Q9 i. F
*/( B( V* h* H0 |- ]# S( J
is
7 Y5 m& h1 R5 `5 {, P part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 L( H7 Q2 ^7 W ~+ O% Y1 N0 {; T
do
/ I9 V/ t# V7 L2 P Lan := rootfolder.Internal.Tools.AOLlanguage;
& S! F/ p1 d) @9 n7 E% ^1 y if current = @.Destination -- else return$ j! F- w& i/ d6 Q. o( [
then
' f8 ^4 k! A# t6 ]' |, Y7 p @.Destination := void;
" }9 O* y+ m) G. P1 c: S) _ if @.occupied then
# D3 T3 p" M/ v! `( M part := @.cont;
/ @2 V) M, ^3 E: o# @- K @.transpOrder := void;
" M5 o% \) i1 c; Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ h/ J e1 F8 n9 p" k
@,root.eventcontroller.simTime);2 ~6 x6 W: q1 g0 v3 i1 h0 X
@.HasOrder := false;& U8 F. q* I7 t( C# A
@.DrivingHome := true;7 u6 i/ ]1 m7 \2 G
rgManager.tryToStartTransOrder;" L1 ]. @: h+ A
if @.Destination = void$ q' Q1 ^( R( Y4 K5 Q
then -- no transport order for vehicle @, L8 k+ I$ ^1 {
@.Destination :=
, }$ @' o5 m2 E rgManager.nearestFreeStation(@,track.~);
# a; u3 e3 Y2 |) y- G$ U newDirection(@); ' u9 h9 h# N# X c% F( I" T
if @.Destination /= void then
$ m0 j3 r( L8 V8 Y# { @.Destination.NumReservation :=
% M5 l( H3 Q5 N5 N @.Destination.NumReservation + 1;% ?7 R8 D7 B, J" Y5 J
end;
' m0 {- |( C0 u% m! ?# W @.CurrIcon := "drivingHome";0 `) o" n7 k: O, r; j$ M
@.DrivingHome := true;
, Y0 _: g3 s4 w, \, i( _ end;) a; w8 D2 q N5 s9 N2 c. X0 e8 @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. X! D- @: a8 j# F part := @.transpOrder;& Q& p% z( w4 e# I; _% z
part.move(@);-- load part! M, ~" D6 _0 f
@.CurrIcon := "load";
/ I' D6 ]' J. K1 ?* v7 G GlobalDistObj := part.globDestination; z8 L+ Z& j1 _ c' m; b" h( W( H
assignLObj := rgmanager.rgAssignL;
# z. q. h( D1 }/ x# N: z row := assignLObj.getRowNo(GlobalDistObj);- T' `' n4 Y3 J: Q3 A, [
if Row = -1 then -- since 70
: U# j, B: j; _& X& g* b if lan=1 then0 v# a2 n; D- R4 L
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. }+ p. Q* @) J+ S% f1 j
to_str("in der Andockstation: \"",?.~.name,"\""));
9 N- v. F: n( X$ L: g0 C else
% X$ O( i; I# |* e# }% h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 | @1 T1 c3 S& h2 Q3 ~9 |8 y to_str("in docking station: \"",?.~.name,"\""));
' k3 z- M0 Q! L' q. r end;; s1 u' F! \3 ]; X4 J: E3 r
else: v0 k% b3 ^2 H8 N; m
@.Destination := assignLObj[1,row];
, t+ [; q+ s& c end;
& Q2 k4 u8 G( d$ Y3 G newDirection(@);
$ S) K' S8 E$ w/ |5 W) b @.HasOrder := true;- J$ T2 p* v/ W2 H4 B# X
end;' J# Y4 E: l! `, Z
end;# d: u" F# S0 W" N- Q# \9 S) ^) ~# S
end; -- of the method
6 M! f- ~+ M c6 W0 I |