/* called by: entrance ctrl of the object 'track'
" G4 o5 W: e1 J4 j# n9 O3 ]*/
# C- Q" G/ b3 _5 Fis
2 x5 J5 T f; B" ^! H. T part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 q: ?2 Y1 P# |+ N/ Fdo
! I8 Z9 u3 b. }0 ` Lan := rootfolder.Internal.Tools.AOLlanguage;
& B! o, B1 J$ n9 f$ s5 J if current = @.Destination -- else return' H# I/ p- Z* B
then; G5 q9 w& B! V. o& y
@.Destination := void;
( y) S, ]+ u5 m* k if @.occupied then g8 x2 v5 T. T: _
part := @.cont;
# X" R5 A, X7 O" } @.transpOrder := void;
2 `7 H5 L7 t! O+ k* y* c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ M+ E: k& Y% _2 T
@,root.eventcontroller.simTime);
! L ]+ x9 F9 o3 o8 V' v$ F4 l/ M @.HasOrder := false;
( t& c" b+ W3 I$ y- m+ e* N @.DrivingHome := true;
9 b$ ^& k9 n4 l rgManager.tryToStartTransOrder;
. k! Y4 T& N! ~3 g% ]/ C( S if @.Destination = void+ P' |: x e& [$ G Z( |
then -- no transport order for vehicle @: t- V3 s t! t r8 w
@.Destination :=* B3 y3 ]( x7 y1 w
rgManager.nearestFreeStation(@,track.~);
2 a/ C' J: D) ]- o% ^' P6 K newDirection(@); + F. i9 j4 X- t
if @.Destination /= void then
$ J. w# J$ ^, u M! c( ]/ G @.Destination.NumReservation :=7 d c' k. Y# [- t, E
@.Destination.NumReservation + 1;' w& D. c5 R" N9 W( @
end;
% x9 U! I7 b! o" s @.CurrIcon := "drivingHome";
+ d8 x% t5 ? i @.DrivingHome := true;6 w. ~5 F. A5 f9 t) e( C9 G% }8 y" M! U
end;
4 B0 h" ~( t( m: E" W* ^' w* P" \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station, N/ u% A& t! L6 n6 ^5 C! f
part := @.transpOrder;, x$ p! v' r$ u
part.move(@);-- load part4 c; q1 F0 {+ r- Z" }
@.CurrIcon := "load";' V9 G* m9 |, y$ S* I
GlobalDistObj := part.globDestination;( m/ ` ~& A! @, g/ _% Z3 b
assignLObj := rgmanager.rgAssignL;1 \4 X' F& c7 l
row := assignLObj.getRowNo(GlobalDistObj);9 V& Z {! e; g: h, U; y; m, U. Q
if Row = -1 then -- since 706 m/ ~4 b* G4 Y& j' F+ c) A6 S
if lan=1 then
) E/ C* I) H* { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, d$ W) I1 _. ?- O: s) s; W to_str("in der Andockstation: \"",?.~.name,"\"")); z* Z! ]. Z T% e- L- W( o" {
else
* \, _! R6 W, n; e+ f( B! C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* Z8 J# j, u$ a4 \+ p to_str("in docking station: \"",?.~.name,"\""));
4 {5 t, v' b( b+ z end;
* L; ]- j6 b* @+ L' H2 Y else* @9 o% G c* A" H; l- e
@.Destination := assignLObj[1,row];- u# J! H6 Y# B0 O( \6 s# A3 G- s
end;
; v1 w- d! ^/ f3 ?& } newDirection(@);
5 b" [( C& |% z3 U- M @.HasOrder := true;
3 O, t6 f- Y8 F, s! V$ p end;& A4 A' S/ h: j6 E' S) N/ i; x
end;' s3 S& v* u0 @' k
end; -- of the method
( x; E4 o K" G: P+ p4 f8 U |