/* called by: entrance ctrl of the object 'track'
$ a0 n" p% n' {! g*/7 L5 A7 w+ ]1 K
is+ [" c) b/ A6 \
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( U. O# L* ~2 @& rdo3 V. O" G# c8 l8 ?) O( o& c# B+ n
Lan := rootfolder.Internal.Tools.AOLlanguage;5 ]8 T2 _6 X1 M4 F8 }
if current = @.Destination -- else return
1 u% T" U$ N5 n9 Y0 l# A then
2 f+ D7 X! D" d9 T$ w @.Destination := void;
) O$ s$ l% ~ F) x# T if @.occupied then
' x: [; H2 ?7 _ part := @.cont;
. \$ l7 p, r5 x* n' b$ u @.transpOrder := void;) _* V' W8 C% m$ k8 ]( ?" B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- G; z9 t# M5 D& F: Z) ^' w1 E* g @,root.eventcontroller.simTime);6 |( V) X' @# i/ g% F" i; |
@.HasOrder := false;
/ U* u/ p+ c$ P6 [7 W; X6 P @.DrivingHome := true;5 \ c; v" Z6 [0 l) W* [' K% y
rgManager.tryToStartTransOrder;
) I% O2 }# p$ u& Q) Z- L: `! t4 S if @.Destination = void
- ~ W- p7 ~" l. t then -- no transport order for vehicle @
/ C% S7 L, }: Q1 T; A) d7 s! f @.Destination :=3 S: v; N+ M0 H! t
rgManager.nearestFreeStation(@,track.~);
1 f. _* f7 q: A, D2 L newDirection(@); ( g- ?3 j d0 ]) _# s W! \5 R' Q
if @.Destination /= void then& A: F! T( I! b. n2 M1 r: s
@.Destination.NumReservation :=
5 P: L1 s& |6 z/ M7 I8 {6 R @.Destination.NumReservation + 1;
4 I C, i$ [+ T/ i2 Q end;, ]& k7 l3 w9 r* Z; z# j. U
@.CurrIcon := "drivingHome";
0 c4 x% u& e5 `8 C, B @.DrivingHome := true;
6 T! k& I. ^4 M- {2 r& R5 W! a/ h end;
, @( [$ c# j4 N4 w else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 |: r7 R% b# E/ v, k
part := @.transpOrder;
2 i Q! h2 e0 i+ U6 A3 [7 `5 t; \ part.move(@);-- load part
[$ r4 R5 O/ Z2 k. B _+ K @.CurrIcon := "load";6 g7 E$ q+ f" t5 D2 H& \! s
GlobalDistObj := part.globDestination;; R& Y9 s& E# K' {
assignLObj := rgmanager.rgAssignL;
0 \3 V1 j- }$ z2 C$ W4 } row := assignLObj.getRowNo(GlobalDistObj);
" i% w5 J3 r4 t if Row = -1 then -- since 70 e1 x9 ~& w+ d8 w8 w- y
if lan=1 then+ t' o9 N. z/ Q1 t- a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% G* ~7 h- F* { s to_str("in der Andockstation: \"",?.~.name,"\""));
4 \; y3 F- a( _* ]/ ^: j else
! `" r$ B( X0 c8 E& e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 [- T9 o) l# T* T
to_str("in docking station: \"",?.~.name,"\"")); , e6 p k' S1 @
end;- g% ^- f9 M2 e' O
else
- Y0 ]5 ]/ B8 s& a4 c& E9 T @.Destination := assignLObj[1,row];
2 V8 Y! v0 ~" u5 a end; ) d9 a* E. n7 Z' Z
newDirection(@);" M- e8 T& G2 w5 V S
@.HasOrder := true;; E; Q/ y9 l4 y# B% D$ o: a6 Z
end;
. X% M3 G- A3 e/ x D end;
# l: H( ?, ?/ z4 D& Q4 Pend; -- of the method; T3 N( A* X2 t" f
|