/* called by: entrance ctrl of the object 'track'
6 f& i: N0 s0 _ V2 O1 g c2 T3 o. ^*/
* e$ y5 [6 n/ v* Sis
5 `% Y8 P+ t: C part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 |' E" } y: V' s/ Bdo
. j+ i9 P7 B2 o( w Lan := rootfolder.Internal.Tools.AOLlanguage;( n- B- r2 R. W0 W. g( t
if current = @.Destination -- else return
6 a; t8 w& u5 Y9 ]& P7 r2 l then
8 U* v6 {0 g9 U! Q @.Destination := void;- |& C; K4 ]) {5 {1 m
if @.occupied then
1 W. C) S' E5 Z* R( }, W part := @.cont;1 q/ S- ~- {, w' B! M- m6 Q4 W9 r) y6 P; m
@.transpOrder := void;. s5 e$ K7 L+ l& @3 s7 A: b9 V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ F3 \7 N+ B) l( A5 C
@,root.eventcontroller.simTime);
) u3 I4 U- w! s2 h; n+ o @.HasOrder := false;2 W% H) b' E/ h! A U5 c9 L
@.DrivingHome := true;1 ?! S% {( U$ ^2 b9 o. d5 e0 C, m
rgManager.tryToStartTransOrder;
) S7 q3 x. ]( p4 C4 A+ V; O. |" S5 U if @.Destination = void
( Y% w) w) v6 S+ H7 T# o3 F then -- no transport order for vehicle @
! N, [! r0 s* J* e9 k" i. s @.Destination :=
7 F% }* q; u. m5 e rgManager.nearestFreeStation(@,track.~);; [ _7 l2 B% a: d+ \! T x: D
newDirection(@); + e: {% s( N" H8 i, G2 f* [: ~
if @.Destination /= void then: P! h2 _# s# P7 \1 u9 C+ s
@.Destination.NumReservation :=: g. l- b1 g7 D
@.Destination.NumReservation + 1;
- k7 D# n4 m" w5 x; C end;" r# P" Q! e9 F% O1 F$ C
@.CurrIcon := "drivingHome";/ Q( ^" y% ~, C5 i/ G" d4 \9 S- i1 R/ _4 m
@.DrivingHome := true;
3 v7 m( F4 r' K0 V B" \6 ]; O/ k end;
3 u/ Q' ` o( w else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 ~; ?" v) B) ?2 b part := @.transpOrder;
, F f$ _0 \2 b! O9 N part.move(@);-- load part
, ^2 D% D% c, b3 J j. O @.CurrIcon := "load";
! ~/ z& Q2 m6 H7 k2 Z& R# h GlobalDistObj := part.globDestination;+ G$ P! h) `& _% h
assignLObj := rgmanager.rgAssignL;/ [$ q- {1 O' {: h# B
row := assignLObj.getRowNo(GlobalDistObj);1 I4 J' U- a1 t1 B
if Row = -1 then -- since 707 o4 f% p& z6 {, S! }
if lan=1 then6 w. x7 a2 C+ k: T- ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) d& m# K1 J- ^( D: a0 w8 b
to_str("in der Andockstation: \"",?.~.name,"\""));& m. ^. U2 Y! F' ^
else
6 v5 l0 L. Q7 T$ U# C; o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ S* o+ }1 H, f. |& @
to_str("in docking station: \"",?.~.name,"\"")); 0 c, T n" ^2 X! a" g
end;
4 d% |$ ^6 t* s$ d1 R3 D else
9 O! |/ w8 ]# u, u6 ?$ l0 ^, ^ @.Destination := assignLObj[1,row];
% g& U# {/ ~- X% } end; 7 x, b' R: ?! E2 z6 X( c% \
newDirection(@);6 u1 L1 c) N/ Y1 C) @8 b: Q' Y8 C
@.HasOrder := true;
b% [! B0 m% I4 G+ @7 j# _ end;2 ~0 k6 q, C2 M7 _8 y2 a2 V. ]
end;+ P7 i9 e; T, D3 b2 ?/ }
end; -- of the method1 W, y1 U( q- Y. A* r2 G( ~; J
|