/* called by: entrance ctrl of the object 'track'; v4 s, B* ?' q5 v. ?0 m T
*/, f" `6 j- L; }; Q, U$ y( ]
is4 p, q, @9 N2 r3 ~; I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) a7 u; B2 c1 }1 a2 E1 }1 L
do6 w+ F8 r) c" ?
Lan := rootfolder.Internal.Tools.AOLlanguage;; c7 V$ {; D/ {
if current = @.Destination -- else return
$ [- \5 X! C7 W then
9 M9 z" _/ l6 R9 W: ?+ T @.Destination := void;
/ E+ W6 V$ @& L2 L) v if @.occupied then' U7 l( `5 Z. ~' N( B- u8 L
part := @.cont;% ] A/ Q: q k; r4 g$ s; p
@.transpOrder := void;* }# E7 {+ v" Z. `! ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 j0 n1 f! b$ w2 n) I% N4 T @,root.eventcontroller.simTime);
- h3 G' j0 c- D# T% j0 F x @.HasOrder := false;. g. C4 `8 b& E% H' Z% Z
@.DrivingHome := true;
, u; P( y: [% d6 N, y/ R rgManager.tryToStartTransOrder;
) A7 d, m% m2 X' o if @.Destination = void/ H' e2 S7 X4 S1 s" [5 l9 j
then -- no transport order for vehicle @4 J, B9 r2 B+ Y) ~+ s
@.Destination :=# o# N: F, Q: N" d
rgManager.nearestFreeStation(@,track.~);$ d2 r, S' @$ J# Y* a8 O
newDirection(@); * r+ W) }' M" Q( K+ Z
if @.Destination /= void then6 Y* V' M# p" _5 f
@.Destination.NumReservation :=0 t: f! l1 h5 L& C: I
@.Destination.NumReservation + 1;
3 N. M) B, M2 F7 f end;( T& Z, K) h& ?7 ^1 n; e; b) S- B
@.CurrIcon := "drivingHome"; h# [2 p1 E! M: h
@.DrivingHome := true;$ D3 o/ Z% C; F; G! g
end;5 ^( K3 W2 M; ]9 J4 ^# a% g- S8 F) h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: M: _' c6 Y& t$ S n4 c part := @.transpOrder;7 v# N) E1 i- d) N8 G
part.move(@);-- load part% [3 g, q; i7 \; b6 }
@.CurrIcon := "load";
a9 e5 k8 M1 H- j4 e5 Q- O# W GlobalDistObj := part.globDestination;
: N7 T$ f$ z7 Q2 V* k assignLObj := rgmanager.rgAssignL;
3 B" w! k2 }. U/ R row := assignLObj.getRowNo(GlobalDistObj); y, l$ N) c8 z ?* h
if Row = -1 then -- since 701 X7 R) R+ @+ H. }& \* V
if lan=1 then2 d" g3 q4 S: [% [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ y0 ^; U1 \" p. O) F& b1 l
to_str("in der Andockstation: \"",?.~.name,"\""));1 ^/ X& r {9 {3 b% h. s
else2 L' L5 o1 M4 u) `+ Q) X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 i( R2 @% W: K9 S7 D( G to_str("in docking station: \"",?.~.name,"\"")); / m, @9 W+ M0 E$ b" n+ ]3 B y
end;
( A" T7 U* t4 F8 h else
9 _! U# U& ?; u1 T/ G4 l' h @.Destination := assignLObj[1,row];
, [" x5 N6 x& h0 v( O. P end;
0 Z1 L% r1 j' U- h newDirection(@);; ?* L3 J" m/ B F' O2 E
@.HasOrder := true;; _7 P$ _; T* s4 h
end;1 X" A9 Z$ g1 @- N0 Z
end;4 f: s# n7 c' @. F
end; -- of the method
0 m2 }/ w7 O" T |