/* called by: entrance ctrl of the object 'track'
- Z, R6 ?; N3 i4 Z R T# x*/1 p: e% B9 `' |5 @) S
is6 s& I0 P& z% K6 c; S' t: r% Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 m5 u2 {% X7 D
do
* {2 Y3 }) u: d1 r& T! W) D+ N8 I Lan := rootfolder.Internal.Tools.AOLlanguage;
% o7 X6 [" W1 @* X- A if current = @.Destination -- else return1 l( }' F6 d; @1 J3 h
then
8 F" i2 Y" p4 `1 Q$ @ @.Destination := void;
: ]% F$ K6 e5 d- i& T if @.occupied then
X+ K2 }& L$ p0 B part := @.cont;, b5 M7 I6 H4 j& J
@.transpOrder := void;
% v% R, I3 R% g) ?# D1 j+ ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& [" P. b2 Z3 t, B! a, t# L @,root.eventcontroller.simTime);, `0 ~4 ^! Z$ j6 ^
@.HasOrder := false;4 c$ ~0 g e1 _/ b; T
@.DrivingHome := true;* U/ ~, i. H4 o# `
rgManager.tryToStartTransOrder;+ ` w1 U3 N6 s/ x6 D/ B
if @.Destination = void7 k8 I; i6 U* r+ u+ s
then -- no transport order for vehicle @& R: @. C- V- {( N* v) l
@.Destination :=* D0 r- V+ L Z
rgManager.nearestFreeStation(@,track.~);
) }& K2 ~; P; O# [ newDirection(@);
# J0 j- f( E6 h$ D if @.Destination /= void then' Z; r: I) |( O& g* Q+ [7 U
@.Destination.NumReservation :=
0 ?8 B9 B! N. v- b4 }6 y: \9 g @.Destination.NumReservation + 1;
/ j( r" j& x K4 f4 t. } end;( W( @* f! t$ G+ h B6 P! E! p% h
@.CurrIcon := "drivingHome";
8 c' Y2 T2 d8 ^- T9 M j4 T) I @.DrivingHome := true;& p8 N, V& u: N' s8 V6 i
end;' T# v( ]: c/ u$ Q# k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% r7 K e7 U6 P x part := @.transpOrder;
; e# v l, A+ b1 W9 R& t4 A: u part.move(@);-- load part
* D- }. g8 g8 \5 s @.CurrIcon := "load";( Q: n2 k6 r$ o& k( v
GlobalDistObj := part.globDestination;
# A! p' @8 N' h# ^6 @5 }5 }1 d$ K- r. z assignLObj := rgmanager.rgAssignL;0 ^' x- C' E. ?, ]" y
row := assignLObj.getRowNo(GlobalDistObj);) N7 z/ T, `6 J, t* x3 [, D5 N
if Row = -1 then -- since 70
4 S, [% |0 e# {* ] L/ O5 d$ k* v if lan=1 then
! l; j9 X# `% \1 J5 _5 p: P+ ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, k8 O! O) ^9 y+ x$ N# h i8 i to_str("in der Andockstation: \"",?.~.name,"\""));
5 |8 k8 L7 v. u% y else) j2 V. I3 g" Q+ S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
` e4 J, K% K2 |2 C% v) C+ C to_str("in docking station: \"",?.~.name,"\""));
Q. I( I! T0 y3 u" [ end;- a. O2 }$ S7 e \& _' N
else { a' M3 U. q2 z) l; }
@.Destination := assignLObj[1,row];( u' P2 e$ K3 s2 }+ [
end;
9 r9 f5 v- L2 \2 O' {; B; z$ p7 t newDirection(@);# f* n0 D1 A+ l
@.HasOrder := true;8 ?% r9 ]) H, L# k6 Y; L
end;
9 {8 |( H6 f3 Q' |) p end;9 y6 d" {" @& H; b7 E$ J8 p. V4 M" q
end; -- of the method, u$ m: `% \8 p7 I
|