/* called by: entrance ctrl of the object 'track'
7 B8 k: u+ d; I! p0 G T" k*/
* H" n/ `4 B$ g2 h- Tis
* w, ^7 J/ I3 W% l part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) {# H- g* P0 _- c5 n0 b& fdo
/ y. S) k6 |0 r) c$ G X Lan := rootfolder.Internal.Tools.AOLlanguage;! U8 `/ r, f" ]; C: {
if current = @.Destination -- else return' N/ M& [5 k1 Y8 t, d
then) p/ i; K" [0 i* g
@.Destination := void;
* C8 x* ~0 F" i4 U if @.occupied then" i1 ^9 u4 M! t* U) D; ?( j& F
part := @.cont;, l. r' C2 _5 Q1 ^+ J
@.transpOrder := void;
% c5 T) j3 t! Q: u; L5 \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, X1 j% Q, l/ Y. S$ g
@,root.eventcontroller.simTime);) U5 j1 d. I5 U
@.HasOrder := false;
5 o# Y$ A# J, `( i4 j @.DrivingHome := true;; g2 t$ G4 c+ p( Q# V
rgManager.tryToStartTransOrder;0 Y2 P K+ V c
if @.Destination = void. _: l: J" M% L/ @, n/ x
then -- no transport order for vehicle @# Q- B; J' @4 W
@.Destination :=3 ]+ [# ?, ^& u; a! x$ U
rgManager.nearestFreeStation(@,track.~);
0 \1 `( x% K5 W- C5 f newDirection(@); 7 v! o! a1 G% z3 F* q
if @.Destination /= void then L" z, _: @' `5 Y: U: k# y
@.Destination.NumReservation := P0 V/ l2 @7 Z9 A# Q
@.Destination.NumReservation + 1;9 J4 N- f Z- Q4 u- P
end;% a0 I! P$ M: c3 \% x5 w% U
@.CurrIcon := "drivingHome";
6 A5 S: L+ O2 _. p7 W+ R! ~$ Q3 m @.DrivingHome := true;' B* v; ~9 Z( }! F! O$ Z0 T
end;
& o, Q' m1 y' a( Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station) t A; ?& }" F
part := @.transpOrder;4 h( e, E; @6 g+ u3 L
part.move(@);-- load part
( w* t: j3 {' a+ Q& @0 A- m0 E @.CurrIcon := "load";: ?3 |. `5 L' A
GlobalDistObj := part.globDestination;
2 g/ p, G8 W/ p5 \ assignLObj := rgmanager.rgAssignL;/ a3 A5 J! N5 B* K5 a( O t0 N
row := assignLObj.getRowNo(GlobalDistObj);
, [. G/ C* V! x3 g) i if Row = -1 then -- since 70' r+ [# s! \+ m, X2 q1 I+ p
if lan=1 then
. E/ h' S% `# s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 Y$ d' \9 w+ h7 L8 x4 Q" U to_str("in der Andockstation: \"",?.~.name,"\""));
& _1 m3 x# Z5 j$ X7 t# W else# l; e4 ^$ j/ m8 R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ w- Q( i5 ]& z* N: a# h: H to_str("in docking station: \"",?.~.name,"\"")); 1 C* c9 w3 D2 c! H5 }
end;
4 J- F# D- G& l else4 q& |, R" c+ o% I2 ?3 G$ e
@.Destination := assignLObj[1,row];+ h0 e' e) v: c
end;
& g+ a' F# A1 {- n" E2 ^ newDirection(@);4 w( h# h5 i) W( f
@.HasOrder := true;
% ^ x$ m/ D. z. @, v end;9 D# E( I7 f/ W- O2 l& p" L; v6 E
end;% o6 O. l: Y) U/ G$ g
end; -- of the method
; w/ i' W4 s: B; G- A: Q8 k |