/* called by: entrance ctrl of the object 'track'
* ]" t/ D- I Q6 o5 @3 ~*// R" U, U0 k7 {2 N
is2 p5 k. D7 z# p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ W0 L7 X% W" G
do' \4 X* V/ l3 D, A! {0 o2 i
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 c& s$ b( f& ~4 d2 h, _$ p1 G$ w if current = @.Destination -- else return
0 V6 F) \4 D/ x+ a$ F3 t, u$ [ then
* W/ a$ m# E9 s @.Destination := void;
* B- w0 z4 X: y7 N8 {# t if @.occupied then; P6 N+ A6 J0 c5 N
part := @.cont;! S' d( ]" U9 g" g
@.transpOrder := void;. U0 K5 t0 F& _0 ~, s) b8 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, h& M1 E; W6 e) V& d
@,root.eventcontroller.simTime);
( n Z/ U$ P3 K& G8 G* M4 p @.HasOrder := false;
% Y% N! }' G: n5 P' \+ o9 E) b+ f @.DrivingHome := true;3 {1 }7 Z3 j% X" g# s7 }: n
rgManager.tryToStartTransOrder;7 O7 e' Z% l* y% I8 N( Y; [( S
if @.Destination = void
/ u) N3 y9 w- n3 | then -- no transport order for vehicle @
+ }% j- ]8 i4 c* B @.Destination :=3 Z$ ^) t: S& L0 [) h
rgManager.nearestFreeStation(@,track.~);
# Z: X! E3 a% M- n2 `0 o, `/ G newDirection(@); 3 j t4 e: O4 j& s" k. ?7 I
if @.Destination /= void then. h& l" F8 F0 c% l9 R
@.Destination.NumReservation :=
* U8 G1 ]" ~, I6 Z" u& t @.Destination.NumReservation + 1;
) H L. u" `$ c4 u3 n/ L- G end;9 `0 u/ |4 r y; M9 l9 o) I
@.CurrIcon := "drivingHome";
; N D; t# |) e @.DrivingHome := true;
# P' H4 u' r+ s% K9 m/ ` end;! L1 @1 ~3 z% n7 S+ K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& s7 I4 V3 m1 d# b6 g
part := @.transpOrder;8 s. G- Y9 y8 U; |1 h
part.move(@);-- load part7 m7 R2 m& ~. p- f* D. h
@.CurrIcon := "load";& q- u9 E0 \( d( q1 o B, H3 h5 C& H
GlobalDistObj := part.globDestination;- z' ^% F0 W" t2 p8 {1 z X
assignLObj := rgmanager.rgAssignL;4 Q2 {* c, ?6 [ H( \. E5 E
row := assignLObj.getRowNo(GlobalDistObj);
" J0 V2 j) d& C* q" b5 Y if Row = -1 then -- since 70: W; H0 M O! U
if lan=1 then0 ~# f A4 R9 Q7 d* e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% a( E5 a, h/ N5 }9 F" l, c
to_str("in der Andockstation: \"",?.~.name,"\""));+ X/ f" e$ ^9 Y) |' M# s
else
4 y3 C( {0 ~0 [2 I* @2 t8 B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 l1 W/ G1 J, r+ z4 c6 c* S to_str("in docking station: \"",?.~.name,"\""));
! |! M: z W, G/ N" F( H% i end;2 E, Z9 U# ?1 ~1 d: _* Y# O7 d4 y$ m3 e
else* k# u6 ?1 S+ E# r a
@.Destination := assignLObj[1,row];
z" v+ d$ ]% c end; 3 `! }; P, c4 c
newDirection(@);
1 S' L( e7 o& E% I s4 y0 h @.HasOrder := true;# f2 \) i, q0 {( G- R* S5 d
end;
5 g1 f3 ^' D. x1 b# ]# \ end;
5 E2 V. J% ^' U) \3 Mend; -- of the method+ C) |1 Y( y3 o% u. q
|