/* called by: entrance ctrl of the object 'track'# A/ J; \ r7 K$ u( _: S6 }1 d
*/
# S# x7 \: _; P" d" V% Ris$ }: h0 a4 o3 I4 B& y* N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' e S K y s
do) b! \( E' B6 E
Lan := rootfolder.Internal.Tools.AOLlanguage;; i* R* J# P- F8 \1 z! k1 i
if current = @.Destination -- else return
6 j; f2 P; E* b# k: W% B9 L# o, q then
& v! G0 S+ ?& b3 M @.Destination := void;& n: H. ^8 L) ~6 `
if @.occupied then$ H( R0 C. C* B# q5 P
part := @.cont;
2 s( A. E" y- \) A @.transpOrder := void;
" Z9 b4 d8 _7 K/ g) y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 B2 T) |5 Y5 m% k" M. I: F! T
@,root.eventcontroller.simTime);. ]0 V+ k L9 m- ?$ y7 b2 ?
@.HasOrder := false;* I& z; N& [$ z. \: K8 N
@.DrivingHome := true;
$ e( R( x$ B N- O5 ^/ m3 U rgManager.tryToStartTransOrder;: [7 {4 U4 A z/ L: Z+ l9 c; A
if @.Destination = void
; L, a5 r$ A1 L. e5 T then -- no transport order for vehicle @
, h+ D, V& c! Z @.Destination :=) y5 K! O1 Q' _' \7 E& |7 d! G9 L, d
rgManager.nearestFreeStation(@,track.~);7 C; |& {' i& k6 B$ A; Y3 b4 h
newDirection(@);
& Z0 \2 p. f: Y if @.Destination /= void then
7 ]1 o% M! r: x% p @.Destination.NumReservation :=" Y6 i8 X9 l/ i0 H$ c' U
@.Destination.NumReservation + 1;& }6 I8 q4 o/ o
end;" C! d3 J* ?) v" j& m: p1 I
@.CurrIcon := "drivingHome";: l2 n( k+ v7 A+ ~* j
@.DrivingHome := true;
1 ^ [7 d: W4 P' ?' O end;
) e/ {4 U) a# c) p0 B l else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& z# h P" o* G5 h) { part := @.transpOrder;
9 l! Q+ F1 J/ c4 I& M3 e9 l8 [ part.move(@);-- load part) O3 S" J7 k: M
@.CurrIcon := "load";
/ v% c+ g( i* O \( E$ @6 N$ y GlobalDistObj := part.globDestination;
% r' Q* I- p( m S8 x2 c assignLObj := rgmanager.rgAssignL;
: U- M& k2 j9 a' n) {4 r9 Z row := assignLObj.getRowNo(GlobalDistObj);
. r3 U D4 J8 u9 c- S if Row = -1 then -- since 700 J. w) k& p$ b( V6 Y
if lan=1 then0 U. J( Q8 f& b5 [3 t( S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( [, a5 L, |- }% M) a0 a to_str("in der Andockstation: \"",?.~.name,"\""));2 e# R9 h- E4 i. r4 m' p( \
else+ M$ |% `& N( y3 q+ r( ?4 w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ \ v5 a/ }% p- z* h5 g5 [ to_str("in docking station: \"",?.~.name,"\"")); 7 r0 Q; {0 E: }1 j$ |4 k
end;
% E \0 ?: I& B/ Q& F; v6 H else6 n ~) F; T( d- Q; D6 Y
@.Destination := assignLObj[1,row];" K1 S# E( \7 g8 F9 g! V0 F6 Z0 H4 T
end; 6 b4 `2 u! L" E# Q- N1 \; L- w- Y
newDirection(@);
& s) i6 E- j9 ~* h( G. |" H @.HasOrder := true;
* W w9 |. \' [/ L* f end;
! B+ |6 u- u! H; d! z5 F. ]# G end;1 {4 _# z, B# T' W- Q& O# A
end; -- of the method; X1 A4 X4 k. e$ X0 U) F
|