/* called by: entrance ctrl of the object 'track'3 z& `' @8 u; A7 j. [
*/- T# f6 ?4 M0 s. A" q+ J
is
6 ~" e3 W2 R5 E part, GlobalDistObj, assignLObj:object;row,Lan:integer;" \0 d; J: @8 P% s1 H! K& k8 e
do
% G: f* }# U0 P" \4 e Lan := rootfolder.Internal.Tools.AOLlanguage;! X; S( v6 y7 G; w) m& w r- \
if current = @.Destination -- else return7 G" C$ P% d) a+ j1 F- o5 g
then# y$ I1 C i$ {: h V& l
@.Destination := void;
, W/ ~4 I1 N0 w3 ]7 d. ]) h d9 r if @.occupied then2 U: A- `- H4 v1 A0 f$ `
part := @.cont;! o8 L( i2 }( O d+ e
@.transpOrder := void;
; }. E( F, F2 o6 H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& t* H7 {! A) S5 g% V @,root.eventcontroller.simTime);
4 m- S+ d8 W8 q0 I2 ? @.HasOrder := false;
: Q* a" D! y! M; S ] V @.DrivingHome := true;
5 T U0 w4 t: x# u9 [1 z/ B rgManager.tryToStartTransOrder;7 D% \9 o5 v9 U* g
if @.Destination = void
0 l& P6 g( |& r/ x* r5 n then -- no transport order for vehicle @( \. q0 n" k0 C* h
@.Destination :=
; v N) _8 X" }# { rgManager.nearestFreeStation(@,track.~);0 A3 I8 d( {+ `6 W4 w) P2 y3 a
newDirection(@); + K3 V) B* q* O# \. b6 ~
if @.Destination /= void then
! [, `* Q: {0 D, V1 }4 ` @.Destination.NumReservation :=1 a3 D3 T3 J0 \ e3 o1 C9 ]: D
@.Destination.NumReservation + 1;( ~; d6 v; b0 W T4 H
end;& z/ e3 @, C t+ }* }% R- g
@.CurrIcon := "drivingHome";! J/ g0 X! |; S; P, A
@.DrivingHome := true;3 E9 T8 Q! x! ]% R1 B3 U, G
end;: x! ^: d8 Q: _& r# l' M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 H; j. h; T) S; w% [
part := @.transpOrder;
' p3 E, O' O, b _ part.move(@);-- load part4 \$ o9 @2 F: ^6 l( P, C* J
@.CurrIcon := "load";
6 P# U1 {, u9 Y. b) Y: m GlobalDistObj := part.globDestination;
% H# ~1 D m# M2 c Z/ v assignLObj := rgmanager.rgAssignL;5 _/ u* E- a( C8 s
row := assignLObj.getRowNo(GlobalDistObj);# R# c! N6 I' W( |0 |% _' H
if Row = -1 then -- since 703 h# A7 q1 H, U; F, K
if lan=1 then' w, M% f/ d& |0 S! ?9 J& Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 `" I. x5 j3 D
to_str("in der Andockstation: \"",?.~.name,"\""));$ ?7 x) b9 r9 N7 R- z( h! W
else
2 n* C/ E/ m: }1 ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 X( `4 W8 l/ T' r! o/ O to_str("in docking station: \"",?.~.name,"\"")); % E" H6 |& V: Z8 E0 {% ~3 Z7 E
end;
0 }5 c/ Z" n; c) v% t% r6 [. A, R else
1 d9 B% R7 B& r( P @.Destination := assignLObj[1,row];
) I3 E* [! l4 S5 V1 j2 ?; A end; + a4 _; r" [$ ]/ W% M) A" w
newDirection(@);
% i! Y% N: }( ]( F \/ r1 T5 z' R @.HasOrder := true;9 r1 ?& Z. Q& {" n' j
end;1 L+ U! b" _* T6 N: `
end;4 r4 y; L, c/ u- W6 V4 v* J
end; -- of the method
, Z+ E+ F1 r$ d$ }% G |