/* called by: entrance ctrl of the object 'track'
; v# @! J8 g/ h*/
8 J$ ]# ^ _- l* j8 Pis% Z; r; }! T5 E9 i% h' H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; w/ e" m6 c+ ~3 b0 T( F
do
1 c2 g9 J' [% }: i$ R Lan := rootfolder.Internal.Tools.AOLlanguage;
I# s% Q& {: w0 W* u5 m$ r if current = @.Destination -- else return
1 d7 F8 { ]5 l3 x/ g6 B then
; s6 {0 A4 G9 W: _7 q @.Destination := void;
- _. J% Q( Y; T if @.occupied then
# g4 @2 `" a8 O# P0 O: | part := @.cont;
+ w7 G$ r+ K3 x V @.transpOrder := void;
- q7 i' y- [; U# w1 Q7 \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: |# n1 K/ `% M ~0 f
@,root.eventcontroller.simTime);: T s3 ]5 Y& q5 ?7 e* `
@.HasOrder := false;
* R/ W, p8 | V: ?* @ @.DrivingHome := true;
1 S" o, h& H8 T/ K/ S rgManager.tryToStartTransOrder;8 a. _8 T" k( M* s! @' q
if @.Destination = void% n6 d$ f. M, I) e/ @6 E( Y& k
then -- no transport order for vehicle @- w( v8 p; J* r0 b! L# z
@.Destination :=
@" t( S- F, Y4 x rgManager.nearestFreeStation(@,track.~);
) R3 | Z$ `1 y* U: T9 L newDirection(@); ; t3 h- S5 e) T7 b
if @.Destination /= void then+ H4 k" x! i& r( f/ a
@.Destination.NumReservation :=: k) O0 F1 V6 F) B
@.Destination.NumReservation + 1;5 U2 m' d) d2 E6 c2 p
end;" L7 T( \. i" ^+ K/ N
@.CurrIcon := "drivingHome";
3 K$ _. C, O' ~* H) a @.DrivingHome := true;( h5 P8 E0 t! L% c9 g: W$ u
end;
1 ^0 F& ?4 _7 `, a% K: |8 n else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ a: i N9 {/ K; C& @) x! }& s
part := @.transpOrder;( H; e) d9 \9 K; }$ q
part.move(@);-- load part
$ D7 F8 z. W$ a! S; ~2 | @.CurrIcon := "load";
! j7 G. D8 k) z' j) X0 M GlobalDistObj := part.globDestination;
6 i/ A6 x; Q& v; O6 T( @+ J assignLObj := rgmanager.rgAssignL;
* R& ^# `' Z3 q( D row := assignLObj.getRowNo(GlobalDistObj);4 X: k6 O: j5 D* R2 P1 s
if Row = -1 then -- since 70- U, I% Y+ t, G( M3 {; M
if lan=1 then$ ?9 ~. F! |: p4 O
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* M! D0 F, K/ `$ M+ _3 E4 v
to_str("in der Andockstation: \"",?.~.name,"\""));& c5 _; V$ D# g; r& t+ E4 ?
else
, J' k% K' t- H1 x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" n7 r: A8 _* _4 Z7 C; i ~ to_str("in docking station: \"",?.~.name,"\""));
- N( h0 Y, u% r6 a X0 [. K! ` end;
K4 c$ w( b. a2 O# B/ L b else
$ n# \8 G+ P& ~: O- G% [, } @.Destination := assignLObj[1,row];
3 T3 u3 T5 x. T end; . _( G- s8 r; W
newDirection(@);& m% L* h; W2 Z& N. B
@.HasOrder := true;
' ^/ i. D5 {+ y: R! C end;
4 L- s; q6 a& u4 U) ?) s end;
6 l$ g. u8 [# v8 a, W6 tend; -- of the method
# }, k9 i& F" m" e2 \ |