/* called by: entrance ctrl of the object 'track'* N m* }* U: T1 M% n
*/
/ @, ^ [' G! wis @" z: o; r; g& u/ h7 U' P; s- f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; P6 j0 x! P! w! M- `
do4 q5 I3 a7 w- y) C4 o
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 \2 d! O& e$ h; a if current = @.Destination -- else return
+ h# \1 c, v, g" s then) s/ K+ M) d4 M1 B0 B. [
@.Destination := void;
) l/ G7 Z9 V# u9 ^* L* w if @.occupied then
* O- ?' V& c! Z# |/ s3 i part := @.cont;
3 S; p9 M% d$ D( h @.transpOrder := void;7 U# h& S7 G ^. O. k' p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 j8 ]! k; I4 w$ T4 _7 j ?. X
@,root.eventcontroller.simTime);7 c5 \& c$ O9 c
@.HasOrder := false;
9 H' y9 F& j' K# l+ G% U/ q0 t @.DrivingHome := true;
. `. H# g& P; A. h% F rgManager.tryToStartTransOrder;- L# I( g" M$ n- w8 z2 I
if @.Destination = void6 I; J0 E& \/ t U! W+ Z! M
then -- no transport order for vehicle @
% n& p( H: @ C @.Destination :=" o' v2 y3 t+ |# C+ d; ?6 _
rgManager.nearestFreeStation(@,track.~);
, W- I6 O, }: q) p! F4 ~& P newDirection(@); ; b% A- x2 K, d- {, r
if @.Destination /= void then. P- U. l3 ?9 M
@.Destination.NumReservation :=" @# M3 `8 B0 Z- _/ U
@.Destination.NumReservation + 1;* O1 l" w) k. \2 D& z1 h5 R
end;$ v- S4 z" h: i7 I; A
@.CurrIcon := "drivingHome";
5 r, c' i- k! ~+ n4 f L @.DrivingHome := true;
/ I- b6 F3 J3 _$ O( p0 l5 ~% t2 i end;
( ?* H7 N/ [ @5 a1 R5 a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: ~% Z' e- E3 E# }$ q. M& N part := @.transpOrder;
. D& p* O% L+ u part.move(@);-- load part& _+ l4 s& ~$ S# f# k) A5 a
@.CurrIcon := "load";% f' c7 g6 I' U1 M6 f
GlobalDistObj := part.globDestination;
+ L; U- w7 v0 _5 }' c! C" D+ C assignLObj := rgmanager.rgAssignL;& g$ g, G {0 o) v- c. R: }5 F
row := assignLObj.getRowNo(GlobalDistObj);
; _* F1 }" [3 C( Y4 V if Row = -1 then -- since 70; \- v/ [$ S& F' Y
if lan=1 then; n) x$ W$ j( G. k* q4 B9 A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," X3 A/ p/ B9 b: i
to_str("in der Andockstation: \"",?.~.name,"\""));
) A6 g0 ^/ e% ]* G1 ` else& g9 P3 Q& @( E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 E* l& r3 _- o7 J to_str("in docking station: \"",?.~.name,"\""));
! k) k& E2 p5 x3 n' S end;
, P! V* Y* l Y- d else
3 q$ g" v( q; z: A) L. N @.Destination := assignLObj[1,row];
* A. A" c% j3 p end;
( t$ F/ p1 E. u7 p5 o# Q newDirection(@);5 N" c* A6 F' w5 O+ [ f
@.HasOrder := true;
5 Z* N# x1 }* p0 P9 P( G end;/ f5 M7 P( P9 A) R, X# Z) i
end;! X7 f' D* `4 B9 J; H" B* n- I
end; -- of the method
% [+ I0 u7 D( Z. X+ E% @; P |