/* called by: entrance ctrl of the object 'track'
6 Q1 X1 @' U6 }; a" O*/
. T8 M2 U5 n1 f qis, Q0 @0 @6 d) f+ _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, D& m* k' f' a% a( |5 a7 f- z
do
! S' R. D3 @3 a* j Lan := rootfolder.Internal.Tools.AOLlanguage;- [. F. u7 p( a2 {9 F' k# g
if current = @.Destination -- else return. \) n- ^/ _: J6 s# J% u
then
6 ~+ f! K2 W' c; i @.Destination := void;9 Q' j0 p* @0 Q2 Q6 Y8 Q' B3 C
if @.occupied then
! @/ R3 F! |, A( s y, I/ `. K) x part := @.cont;
6 Y& S7 r9 a) J: Y @.transpOrder := void;
& |2 Q& U4 | ~# L* `# Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 Z( n0 S5 L/ a( o; H# Y @,root.eventcontroller.simTime);
+ @5 [6 A6 a* s" Z: U @.HasOrder := false;
* B% A* Q: Q+ X @.DrivingHome := true;; Z: {6 ^8 M6 h' o" z) E
rgManager.tryToStartTransOrder;! F. x1 M8 Q/ F4 ^5 X- C
if @.Destination = void
$ N5 w3 a/ v; P6 G8 V# L then -- no transport order for vehicle @
" Q8 h. Q, l8 s: O5 t @.Destination :=
: {' p/ B$ s% o4 ~" ^$ P rgManager.nearestFreeStation(@,track.~);
) M9 Y+ E# g. G* u! n3 a; p" z newDirection(@); 8 ^# W- s4 v' W7 v- A" |" @
if @.Destination /= void then$ X8 j6 X7 l$ l G( B
@.Destination.NumReservation :=2 h6 i$ G0 T2 t# P1 W2 j N
@.Destination.NumReservation + 1;5 F1 s8 u8 }) w. `) U6 d1 j9 t9 V) R
end;
( V, r, Z7 Z! }0 R# B. P( P @.CurrIcon := "drivingHome";% D% E: x# L3 j5 t: \$ x
@.DrivingHome := true;( V3 X7 m& `, C/ A+ b- Z
end;
& ] B. a( F- L" M else -- the vehicle @ is empty, both vehicle and part are in the same dock station c5 l0 u+ R+ ^# [; T
part := @.transpOrder;
+ u) B( u1 b0 V0 o, {" R1 N part.move(@);-- load part! `. e5 U- I6 N6 W1 c" [, F
@.CurrIcon := "load";- I" Q, L+ c a2 Q! S F
GlobalDistObj := part.globDestination;
7 u/ t# x7 k' [* f* R' I assignLObj := rgmanager.rgAssignL;
% e! M. Z) o" T4 L! v# W row := assignLObj.getRowNo(GlobalDistObj);% R! i0 T. R: |; W# Q, J( N
if Row = -1 then -- since 701 M k }- M. x" p
if lan=1 then
; A; `* X L* T# t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 z. A% o# G0 Q6 F5 X
to_str("in der Andockstation: \"",?.~.name,"\""));; Z- W1 ~5 t' P8 `4 _
else
* C, k9 b+ @" o2 U5 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," Z( {# W8 ]: v6 H0 ~0 \: S% U) ?
to_str("in docking station: \"",?.~.name,"\"")); 2 Y; k1 ^9 M9 t2 l4 u
end;
* ?/ Z6 [# c& y) w else& G( |) y, c9 G$ g( C& }
@.Destination := assignLObj[1,row];4 Q' T; v. Y3 _" e5 W- c5 }
end; " _" O- M0 O( p% V
newDirection(@);
4 K3 _7 R$ J: T; a- p6 G& K _ @.HasOrder := true;# \$ Z2 k3 Y* @% }4 W$ g
end;
/ U/ m3 O# n1 U5 O. c" q& h end;8 ]- z9 b: z, \& B8 w
end; -- of the method! S: ]% e3 z! [9 t0 W
|