/* called by: entrance ctrl of the object 'track'
: B1 E! {/ w4 S*/1 k7 n2 I% ~ s
is
7 I+ r5 ]9 {4 {! M1 r8 @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: T% l$ u) M( C+ {, I* kdo
/ M5 Q7 T7 Q# c: e7 a Lan := rootfolder.Internal.Tools.AOLlanguage;+ w) j$ m6 Q: o: X
if current = @.Destination -- else return
; o5 E. C `. g3 e# I9 T, ] then/ g7 b* J% p$ Y( y0 q2 e5 t
@.Destination := void;
, {9 X% Z( U* z3 y4 T if @.occupied then
* _; q+ n9 r' A. p part := @.cont;
2 e( U5 q4 y' c4 p1 _3 ?& g8 {7 e @.transpOrder := void;
4 c) f- j2 o4 c7 i$ A" x( O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ f; p. F r7 d! J* }! R \ @,root.eventcontroller.simTime);1 B& F9 p0 y, L4 P1 {7 P# N# b
@.HasOrder := false;
: G9 i3 T" B' o$ E @.DrivingHome := true;
9 R# \5 M: w$ n( |) y0 |% Q rgManager.tryToStartTransOrder;
% i* c0 ]1 e8 s' ` | if @.Destination = void
2 ], H d1 R! s& ] then -- no transport order for vehicle @0 l( @' l; G! m1 O
@.Destination :=
3 P) g# U4 U5 l# O) d" S4 @! t rgManager.nearestFreeStation(@,track.~);
! V) l# m/ n1 e; I; t) I newDirection(@);
! I7 o! f6 s& P5 G- B if @.Destination /= void then& G1 s, a" n7 k; w$ k
@.Destination.NumReservation :=5 u+ e% O' P* q9 X
@.Destination.NumReservation + 1;
8 ^$ Z/ U0 k; O B1 ~2 e end;+ {! a Z* `, Y, i4 o
@.CurrIcon := "drivingHome";
& \: E/ j9 V" K9 ? @.DrivingHome := true;# s2 S' \/ x l) N* b' F
end;( ] A( o; q+ i0 O" M, W1 W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) ~" n$ m" E( | @
part := @.transpOrder;! k5 D6 }( }( ?8 |& \) A2 ]
part.move(@);-- load part6 f& ~" }% Y8 V2 P
@.CurrIcon := "load";
- r6 ?/ A! g" f GlobalDistObj := part.globDestination;9 m" D- ~- ~7 O$ c
assignLObj := rgmanager.rgAssignL;
, F2 V7 T9 Z* Z q row := assignLObj.getRowNo(GlobalDistObj);. M2 k: p& o- Q
if Row = -1 then -- since 70
( P5 E2 q! s6 C" u. K if lan=1 then
5 O2 h5 b" M$ f0 K' M( @' w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ o: e" [( [+ n& I4 C3 m
to_str("in der Andockstation: \"",?.~.name,"\""));
+ g( l, o0 y+ C! n- E q# v+ t8 R" j w) V& l else) u D( j/ I, X6 U0 J; N3 s' c
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 _7 M. L6 x/ B6 ~ to_str("in docking station: \"",?.~.name,"\"")); ' U# t0 j) p# l$ }0 S
end;
6 p% t, Z7 [# i6 q' b else
8 J8 ~1 _7 B" A$ Z @.Destination := assignLObj[1,row];
2 J% F+ u2 ~! k4 C, Q0 B% e0 \ end; ( v5 v$ X8 u2 t- M
newDirection(@);
8 k2 w. ^( ?2 J3 D4 ~7 N! t% V @.HasOrder := true;
! _: s e: D$ U" J end;! g, }% F* {! |: s
end;
0 t. r$ a+ W M3 P' h1 t( Z2 [end; -- of the method$ n Z8 P* a3 r/ b+ @$ O
|