/* called by: entrance ctrl of the object 'track'& W7 a- S5 M9 w* i
*/
; I4 R) Y% G' m& his
. b9 j$ i ]/ u. k7 Z5 W part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- [+ q6 ~7 Z( w' s# q& i- x7 ]do" m1 P7 w6 F$ D7 Q
Lan := rootfolder.Internal.Tools.AOLlanguage;5 Q0 ]& x5 c7 ]2 G
if current = @.Destination -- else return
, E& g: m7 W) w3 r4 V3 x then1 @$ e, }! m, j
@.Destination := void;
0 I% }# l5 H6 x if @.occupied then
! b, i/ N1 Y; z, ] part := @.cont;6 S/ C' d* m$ O$ n5 Q* U- O4 s
@.transpOrder := void;, Z6 @( e5 L1 v: C O0 z* _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* r( p# q( n6 J# y5 n$ F+ m @,root.eventcontroller.simTime);& _- |- V3 H+ b8 X; C! O& |
@.HasOrder := false;( y+ I8 y- S, p; s
@.DrivingHome := true;! N+ o- W8 D0 |5 |9 \
rgManager.tryToStartTransOrder;+ ^* R& H4 R# O/ M& i
if @.Destination = void
, e: e+ U. N2 k5 }/ e* D1 k# K2 s# M: M then -- no transport order for vehicle @3 x% O5 }& E! `& D% u
@.Destination :=
7 Y; w! W' C/ G( A" O7 v rgManager.nearestFreeStation(@,track.~);0 e5 i' Q# | G: Z% h+ v* E
newDirection(@); 9 X+ c/ q+ B! j1 r
if @.Destination /= void then
, x+ v! K4 A3 }$ U9 _6 n. o @.Destination.NumReservation :=9 R' O; s: ]" C
@.Destination.NumReservation + 1;
0 F4 ^0 E7 B y3 c end;, X& o! A" |: P; b- `. F) O
@.CurrIcon := "drivingHome";
' x6 Z4 e7 a; @& _0 @+ k0 S$ P @.DrivingHome := true;
6 K8 Q2 r# k U+ f. X end;
) Y# }) G& n1 y& h1 r! q# G& l else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% m9 t3 x% L+ M& ?* A( L part := @.transpOrder;
8 h! _, V* D4 |+ g& P part.move(@);-- load part7 n# D! L0 H6 A
@.CurrIcon := "load";/ n# p. ?* f* l- E
GlobalDistObj := part.globDestination;: p4 E6 b8 Q- k0 ~; {9 B L
assignLObj := rgmanager.rgAssignL;; Q9 u% i3 J4 k" w" k$ k9 L
row := assignLObj.getRowNo(GlobalDistObj);
& v. H+ H, m- \% e1 E if Row = -1 then -- since 70; M* C+ n. y1 G! ~# y* B
if lan=1 then) t% _% r3 K, l! e; e* T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 s8 E% d% ?4 u, B to_str("in der Andockstation: \"",?.~.name,"\""));) X9 W9 X( t5 T2 v% L6 s
else2 @5 q4 M. G4 u ^; E: @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 _# T ?% ?) G+ U! W
to_str("in docking station: \"",?.~.name,"\"")); & ~9 _3 a; e, ?$ e4 D: m
end;- h# q$ d3 }2 F/ W' W
else/ {$ ]+ M, n! E) L+ H
@.Destination := assignLObj[1,row];& C6 }* r7 R( j6 e& J, a* l
end; 2 e$ ]) \% I& m4 x p; B2 S: `
newDirection(@);
q" k) s& l2 u, Z, D6 ]6 i @.HasOrder := true;- A+ x0 Z8 z8 H8 K) z: R
end;
4 L$ Y a. c- X- m7 r% f end;
9 o) j: U5 \7 y0 zend; -- of the method
( Z/ \* o1 A A" g' `9 C |