/* called by: entrance ctrl of the object 'track'
4 u, F! f1 T2 W. I, l% K# p*/
5 r9 H( ]) F/ Sis1 ], M5 Z0 a: _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* x! [9 b/ W/ R2 U0 k i0 ]( \do- [' a7 ~7 B* \' k$ P {
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 D( k5 ?7 s$ ]5 D6 v5 W6 Z+ S1 L if current = @.Destination -- else return0 H4 N0 M6 j$ W7 Q0 f! z9 q6 C/ V
then, f5 U. \, s; ~3 g7 b# X
@.Destination := void;9 I3 p- p+ k# f) g1 C, P
if @.occupied then
' K c0 R% L- I! d; c# R) E part := @.cont;: N# y/ a- }; G
@.transpOrder := void;
2 r8 o" p2 C" J# `4 u( Q% ^& R6 Z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* c( A1 H- @& _3 c: w2 I
@,root.eventcontroller.simTime);
( X! l1 Y. O0 K+ Q' C+ _1 J, ~' @ @.HasOrder := false;
- b2 U/ i4 K) @$ Z @.DrivingHome := true;
: _ d4 \5 p( g+ y4 { rgManager.tryToStartTransOrder;& o( f9 x/ _0 p) C! o! j$ M
if @.Destination = void& n& k) X; I# J1 t# v
then -- no transport order for vehicle @
# r; c* D# v% K! U @.Destination :=
: X( P8 T6 e9 |( P J rgManager.nearestFreeStation(@,track.~);6 q% U2 n- m2 Q7 u: r
newDirection(@);
7 R# h5 Y- T8 c9 S if @.Destination /= void then8 ^2 Q1 K7 Y; f4 U/ K u9 g5 U. N
@.Destination.NumReservation :=
1 u7 N$ ^. G' {1 R4 X1 N @.Destination.NumReservation + 1;
4 Q* r; x% h' t3 a* m5 q9 R% F: [$ v end;
( Z+ \! ]2 ~5 L- ?& s @.CurrIcon := "drivingHome";
; P6 z9 A" I) \( X( T1 {4 |6 g @.DrivingHome := true;9 r2 F% Q" w9 \7 T
end;5 o7 @5 `# t% v) R% @! _. r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: e9 s, Q9 n5 q3 u6 [ part := @.transpOrder;
- Q& u" W8 [9 n ^5 ` part.move(@);-- load part
# ~- {1 |- S# C J, w2 T @.CurrIcon := "load";
! h+ T1 T+ i0 c2 H+ b GlobalDistObj := part.globDestination;
* z( O) \% Y# m/ t: K assignLObj := rgmanager.rgAssignL;
2 C2 h! Q2 L; I row := assignLObj.getRowNo(GlobalDistObj);
; o' P4 _$ F) _0 b if Row = -1 then -- since 70
% E) Q+ j0 h& s: Z if lan=1 then
. G2 l& v; Z6 } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 n$ y: J) `2 {4 C' l3 I
to_str("in der Andockstation: \"",?.~.name,"\""));' Y6 K% G1 e8 Q; q' U
else X* k2 {7 d0 G$ R, C: @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 {, k6 ^9 Y# ]3 d3 j3 J7 e7 w
to_str("in docking station: \"",?.~.name,"\""));
O: b+ k# \- L- G# U end;6 t4 G4 q: _& g& c' f# }; L1 j
else) i& r6 g% B* H# t; e- j* D
@.Destination := assignLObj[1,row];' Q0 Q( G- n$ |: Y: s
end;
2 X+ \' _9 T6 | newDirection(@);" G% B3 y1 u6 K( Y: C, }+ R
@.HasOrder := true;2 {# N3 C) A y6 S% H% {
end;
; [ w$ y2 |! c/ |3 E6 T end;8 c9 P: q% o O( B
end; -- of the method
3 Z7 |# d+ Q8 C! x' R |