/* called by: entrance ctrl of the object 'track'
2 O: V3 ^! y) q( t2 x) N' x0 w2 K*/
! m- D c( q% Y Mis+ Q' K# b1 z5 R! F% Y7 y/ t7 m% R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 w9 t0 q R" Q, Gdo- T0 j& x: y) C/ ? @, [' O
Lan := rootfolder.Internal.Tools.AOLlanguage;
, o" \% Q. h% J# s5 ?0 t if current = @.Destination -- else return. h: [1 g. a4 _" K3 q5 ]2 q7 g
then
* X/ g2 }8 _5 L! B @.Destination := void;
4 M4 y1 `: y. g% {; \, M/ i if @.occupied then: a1 ], J/ g9 D8 p0 p( R' j
part := @.cont;
9 o Z% K4 ?& f @.transpOrder := void;9 {0 L6 U; t9 [( {! e0 W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," L- n. t0 [" k
@,root.eventcontroller.simTime);. w4 P; E: ^* K8 K: n5 Z6 p, l
@.HasOrder := false;! u+ g9 B0 z& g U# e8 p& n9 |7 ~
@.DrivingHome := true;
' x2 ?) e- O% x( A, l( n( {2 U. y: _ rgManager.tryToStartTransOrder;4 p0 p4 s- Z- ]( y9 B/ a: T
if @.Destination = void; e/ V4 _$ f) M3 h
then -- no transport order for vehicle @
1 L! K! z/ h2 G @.Destination :=
& ^. a) T9 q4 a rgManager.nearestFreeStation(@,track.~);2 p" Y! W' g/ M x
newDirection(@);
! i5 t# S" P$ r4 B9 G# d0 U if @.Destination /= void then
6 O$ [9 ~9 T! _- W7 [* V @.Destination.NumReservation :=
% z8 w; n2 O7 d8 R. a @.Destination.NumReservation + 1;. o& H2 f# u8 V9 h1 ^
end;7 \9 O/ O* A3 @
@.CurrIcon := "drivingHome";. f: K X: b9 _4 |
@.DrivingHome := true;
: j: G& w3 l; j/ w end;
4 _; ?0 a" K" W/ |4 E2 L O else -- the vehicle @ is empty, both vehicle and part are in the same dock station" e7 G/ U5 W6 A/ I# ]
part := @.transpOrder;
" @0 D: H% m* s. P, ^1 d% A7 k4 } e part.move(@);-- load part& Y$ p/ T z8 p% g
@.CurrIcon := "load";: a& P( \' \& @4 S4 |
GlobalDistObj := part.globDestination;0 F. Y: a( r! m4 d' ?. [
assignLObj := rgmanager.rgAssignL;
* R! A8 }+ c: f( M+ i- J7 Z row := assignLObj.getRowNo(GlobalDistObj);
% M8 r9 g7 J1 f# ^8 W! h& U! T0 n if Row = -1 then -- since 70
& \) I" ~. v& D& L if lan=1 then
( K* `( R. Y& e0 A5 g2 s" q% H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, c# u7 s5 P4 U to_str("in der Andockstation: \"",?.~.name,"\""));
# m: w7 j' t5 H: j8 k M' F else3 a( z4 v3 p I% f- T* X( A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," f1 C& e& ?: H# c" E5 P
to_str("in docking station: \"",?.~.name,"\"")); : V2 g9 [. V/ }! x% E
end;8 z1 j& z$ f8 z$ H4 U* r8 J
else2 d9 ^' E' h* N* ?3 M* P
@.Destination := assignLObj[1,row];
' Y. v: P/ l& a( P& u end;
0 ^8 i+ Q3 `% Z( R, k+ H% v; a newDirection(@);# Z& |! o" t6 }: N( E* O
@.HasOrder := true;
" @* }) ^( L+ Z6 J( q& g end;
y- t; ^6 V% j" t1 i# l+ O end;
7 M7 G& H$ V% A. \: Tend; -- of the method
+ h' L: m2 y+ Z) _ |