/* called by: entrance ctrl of the object 'track'/ S1 m% E# b4 I
*/% f* ?- D7 {# Z: M/ m+ Q
is
7 @; Q# _; i) V9 s# F( D part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& C* h; W- \5 s9 Hdo3 C5 ~% a( t* r
Lan := rootfolder.Internal.Tools.AOLlanguage;' ?% b5 L3 M4 x) A3 f7 [7 j
if current = @.Destination -- else return/ X7 V: ]2 J x; F9 M
then
+ J; d! W0 J1 m" n; K' } @.Destination := void;
/ X0 p7 W, m0 H5 t3 O if @.occupied then% {6 O% j! }5 C3 [
part := @.cont;) x: M f- d o+ |$ J
@.transpOrder := void;3 E1 R3 z* q2 P9 M- p3 f4 L# `: ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ F0 [4 P: a. q9 l8 s2 T: s @,root.eventcontroller.simTime);' d s/ E* R' N# n, h# A r
@.HasOrder := false;
! W% O6 i6 W! W ^% ^ @.DrivingHome := true;
( Z3 Y' Y9 c( I! N: M rgManager.tryToStartTransOrder;' [ @) f" P8 j% y" k& s0 Y% }
if @.Destination = void, a3 S u7 z/ i/ P9 `: x
then -- no transport order for vehicle @
+ I+ \: k. h9 Q w @.Destination :=; L5 v4 v1 l6 n3 O3 T( [
rgManager.nearestFreeStation(@,track.~);
3 H: N9 Z: o5 R" { newDirection(@);
* @. J1 X; Z! z" M7 V. g if @.Destination /= void then9 Z+ Q6 K/ n$ o5 `% v
@.Destination.NumReservation :=/ h% T. V% b, n* \% v
@.Destination.NumReservation + 1;
( U/ k+ o7 a% X9 J# |9 R$ y: B% u end;
4 t* o$ z8 K+ M- a1 C @.CurrIcon := "drivingHome";* f) ~, X* H4 g: c
@.DrivingHome := true;
% b. `. _( _, @: Y/ b end;* }, R$ _( M' o& H& q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- I! u1 Y$ S2 W
part := @.transpOrder;
4 Z3 V9 i, d: H% C5 T+ T7 a+ |1 p6 D6 u part.move(@);-- load part
4 u4 P6 J, A3 w, _; J: A' ?8 r @.CurrIcon := "load";4 p3 k& {; O2 J% P [; N6 H
GlobalDistObj := part.globDestination;! q( O4 O. G' Q
assignLObj := rgmanager.rgAssignL;4 z% K1 f* y5 X) s
row := assignLObj.getRowNo(GlobalDistObj);% h9 H/ ^+ `3 b* i
if Row = -1 then -- since 70
- J- p8 A9 [& r% k7 b9 Z; G/ \ if lan=1 then& ^6 T( m+ F* ?* z" Y3 y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) c. r( S# V& o7 J8 X h8 u1 X5 A to_str("in der Andockstation: \"",?.~.name,"\""));
1 D1 `8 s" y) c# E, t else
: M) K8 l/ |% x3 w% P( Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' s- J0 V, O5 k. i" q7 {% y+ [# n5 p
to_str("in docking station: \"",?.~.name,"\""));
8 y& f2 u, F7 h* G. `8 l; B end; E/ n, Q4 w" y' N2 }
else# A3 Q# o) I" ]) n0 s- i
@.Destination := assignLObj[1,row];. F6 ?1 I& I$ T( j& v
end;
$ d7 o, \, M& l" |! E newDirection(@);
* L* {' b9 U6 z+ S7 Q* I4 u; ^ @.HasOrder := true;
' n: M# X5 c. ]$ ?0 a8 c' f end;; H' s) }9 ~- }. h" Z5 P
end;0 j+ _. L( o, n% \1 h0 P2 [
end; -- of the method \* m1 {6 A: T& q3 r. m4 ~1 l
|