/* called by: entrance ctrl of the object 'track'
% [, \8 _( l% K( s! w9 Z: ~% e7 [5 r*// Z9 W7 {. c2 q* L' `5 i1 o
is- P ^1 h1 `: v5 ~# |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 Q4 `! ^& r! p% [$ p7 t, e5 Fdo$ S. s+ v- u N, l
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 l' K. [+ ?& V/ u& b& Q if current = @.Destination -- else return6 {' o4 }3 J2 J
then
5 C6 @% ^. A' g. i) ?% I @.Destination := void;
" {& c4 n t8 D, ~' `$ @7 X if @.occupied then9 q3 ? ?7 @% n9 Z
part := @.cont;3 X+ [. V( [7 S" W2 K" I4 \
@.transpOrder := void;
; u) y7 t d+ d/ u' E; \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' Z, t a1 h. V5 K$ w @,root.eventcontroller.simTime);
- a5 W( H% ~2 D p @.HasOrder := false;
% u e( J( a. s3 z @.DrivingHome := true;
+ q2 h( @9 P; @( D- V$ L3 X rgManager.tryToStartTransOrder;9 }7 S7 f( ^7 l) V& H* Y
if @.Destination = void
8 C) A1 O( b0 l! G( o( @* S then -- no transport order for vehicle @" Y( e* Q# i1 t9 t9 E* y, Q/ s
@.Destination :=3 H0 l& `: _" c0 K/ x7 a5 F) l; V
rgManager.nearestFreeStation(@,track.~);
' a: L1 |6 W6 c- r newDirection(@); / v8 S+ {2 R" B3 s! n( C8 E
if @.Destination /= void then
, \% b/ {& K7 {9 \" @. R @.Destination.NumReservation :=
G* w2 w; T, q @.Destination.NumReservation + 1;3 H$ C7 l& m& l2 H- w( L. u& D; `' q' C
end;3 k5 E) p" t$ T! ^. I# r
@.CurrIcon := "drivingHome";
n3 Q. d, Y# R$ H% b8 s @.DrivingHome := true;
2 k/ W5 O/ c3 u. Y end;
# H' F9 o* T9 D9 v else -- the vehicle @ is empty, both vehicle and part are in the same dock station( O( S) e+ C3 s/ b
part := @.transpOrder;" d- f& s0 e) a7 r. q W
part.move(@);-- load part
7 m# i) u7 e6 B) K; I# ?( W2 n% } @.CurrIcon := "load";* Z# Y& E* }- l5 {, ~8 E
GlobalDistObj := part.globDestination;
2 [! P6 F6 Y- B4 E% Y' J assignLObj := rgmanager.rgAssignL;4 d. T, k! V O$ T5 e% G
row := assignLObj.getRowNo(GlobalDistObj); Q9 J' q) \1 ^& ]
if Row = -1 then -- since 70
& q% R1 X7 V6 B9 D; ^ if lan=1 then
; v6 ^4 ?9 R& A8 ?/ z! P: M, C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 r4 s6 ^/ Q7 q! r
to_str("in der Andockstation: \"",?.~.name,"\""));" v5 h o5 l1 E# c& ~ v2 a+ p6 R
else- q2 r, N. v) s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, J2 \! W3 q$ G" d4 |1 g. A to_str("in docking station: \"",?.~.name,"\""));
0 w$ V2 E" K) g) h7 P8 r end;0 L7 L) B9 [: i: U
else* Z/ X2 n! `! [; R
@.Destination := assignLObj[1,row];
/ c4 l8 h# t, O) P end; ) o. t+ V4 D6 } e; w
newDirection(@);7 d O: Y7 o1 E' i+ V
@.HasOrder := true;
" Q" u+ J& j7 t- e end;
* O$ T& r: P0 U/ ` l end;
! ], y/ H/ p8 E: E h2 q; m3 fend; -- of the method
, y$ t0 Z' Q- m0 P9 j# S |