/* called by: entrance ctrl of the object 'track'* j1 q1 A# G& v$ Y1 w5 j$ }7 f
*/
! s0 y. r- x0 z k( }; Tis
/ g) |1 u, `' u part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; B/ i: H3 I+ [9 a) i" o1 \do+ f7 @. _7 w8 n- M9 _% x
Lan := rootfolder.Internal.Tools.AOLlanguage;
: M' y9 u t) U' t; c if current = @.Destination -- else return& j# A$ g6 L0 L) ^5 w
then1 [% s# k7 ?# P& y8 {( c8 M7 P
@.Destination := void;9 W2 v- x; B, P' w4 ~6 j
if @.occupied then
( p$ g+ J/ C3 K$ C part := @.cont;: R3 I) q- ?& p) K8 E
@.transpOrder := void;8 z( h% R4 ^" x E' U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# {0 {/ z6 E2 ~5 W, l2 o9 E
@,root.eventcontroller.simTime);
3 F* h% v# E" ]2 `' O2 n% Z @.HasOrder := false;; O! V7 K2 Y7 z% w% T3 |
@.DrivingHome := true;) {5 E {4 w2 ]: o# `
rgManager.tryToStartTransOrder;# i+ ~' d, |* y
if @.Destination = void2 ~' O: N* b3 a- i
then -- no transport order for vehicle @
0 V3 n" |" B$ \8 a5 M7 m @.Destination :=
8 `# b3 W# S, N$ ~# {# C U+ F6 l& m rgManager.nearestFreeStation(@,track.~);
/ n* W/ }9 [6 G newDirection(@); 9 h# i8 m0 @) {7 b! p; y. K$ m$ U! a
if @.Destination /= void then) ^8 c4 @8 ~& ]
@.Destination.NumReservation :=
$ o3 |, [" a& Z) i* S# v @.Destination.NumReservation + 1;5 R; a0 q$ ~0 z/ U1 [8 C
end;: d8 M. j8 K, O7 {
@.CurrIcon := "drivingHome";
( F: y$ u* D% C7 @ @.DrivingHome := true;
A! }' F' Z- F' F' j' ^' S end;
, }+ k/ r5 z u else -- the vehicle @ is empty, both vehicle and part are in the same dock station. o5 x- D% F. }0 n4 s
part := @.transpOrder;# p$ {' A! s& h7 W3 s
part.move(@);-- load part; U, H9 ^7 a6 ^5 D
@.CurrIcon := "load";
( e6 e9 D) P5 G. t! x( H GlobalDistObj := part.globDestination;0 M; b8 b* J+ S. ], Z
assignLObj := rgmanager.rgAssignL;1 I7 a9 t. W, b8 N+ [0 t
row := assignLObj.getRowNo(GlobalDistObj);; J9 L) ~2 {: E6 |. A: }- e, N
if Row = -1 then -- since 70
) k) w/ k/ v# {5 P: X if lan=1 then) X* @- U; |; c+ b% B: j0 E x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( d" W) G N( F& C to_str("in der Andockstation: \"",?.~.name,"\""));7 l2 |6 n, G% M% |( k
else. n4 s3 [* h/ T' X3 V" L$ U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 P2 N; Q! L- R3 U
to_str("in docking station: \"",?.~.name,"\""));
$ N& U/ F6 _4 g3 | end;
' U7 ~! ?8 f2 b% F else
" Q; d3 g& r& @ P0 R @.Destination := assignLObj[1,row];- L+ e! w1 g- q! T. q) T
end;
$ M- Z! n' B- f0 P newDirection(@);& T& O# ^# _7 ?/ b
@.HasOrder := true;$ l0 v% {' t y: q% a+ u' U0 J
end;0 h! \% `" V, }; ]9 h8 j
end;
* E; @( w* Z0 k: ?! J! m6 v$ t6 Mend; -- of the method
! N6 @+ U! i& O5 E |