/* called by: entrance ctrl of the object 'track'
/ b6 a4 h. X/ T6 o& M; H% R. p*/3 D! W- k' k4 d' N7 X
is8 Y2 G* P* s0 y3 |- R' m8 [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ B8 D n5 |6 a* {1 Tdo% |, J; n1 |" Q! g
Lan := rootfolder.Internal.Tools.AOLlanguage;! M- z7 {: L. @ s$ {# g" A( r
if current = @.Destination -- else return
. I2 p7 ^2 S# P. _ then
! u5 l8 u' o( L @.Destination := void;
3 x1 U( T S1 t if @.occupied then
6 Q- A+ \$ X0 b5 t" F/ d$ n part := @.cont;% i8 \' y7 Q, ?7 G
@.transpOrder := void;$ z" ?/ t ?7 ~; P; |" F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, r9 D% z" F% ~$ u$ v @,root.eventcontroller.simTime);
2 P: M0 l' L1 X @.HasOrder := false;3 q5 q( n- o" _; A" D) ~1 D$ D# m$ _
@.DrivingHome := true;/ {: r. V# r5 b
rgManager.tryToStartTransOrder;! a4 r7 ^2 t' p4 ^6 O
if @.Destination = void$ q! Z; G3 ?* w
then -- no transport order for vehicle @7 s( _0 a: y' V$ B0 A! r! ^' g
@.Destination :=! s: ?4 D6 b$ N' M/ H7 O) g
rgManager.nearestFreeStation(@,track.~);
) A+ W, X3 P, m: I2 C newDirection(@);
+ o% C" B1 Z, N, o* u if @.Destination /= void then
& h5 [5 y, W8 F @.Destination.NumReservation :=/ ]5 y( ?/ x1 u; m$ ~' N- J2 H* S
@.Destination.NumReservation + 1;
+ y" O0 w' k9 z4 e end;% v( {3 J0 g2 T. }$ ~% N
@.CurrIcon := "drivingHome";9 l) l: F: r$ f* [+ a7 d
@.DrivingHome := true;
1 P" ^) M n( Q- J5 Z end;
5 E9 A3 b; w! f" e else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; b1 t; [- Q7 i: p0 P$ Q- z part := @.transpOrder;
" ~% N. f! P6 c+ v: S6 @6 J part.move(@);-- load part. `8 d5 n) M1 j6 t' m( ^4 O$ o! o
@.CurrIcon := "load";
: h* L0 l4 B. \3 C9 e3 z GlobalDistObj := part.globDestination;! h+ u% v, |) R9 z1 D; z* S) L5 A1 u
assignLObj := rgmanager.rgAssignL;
' h' K `, |1 k4 w3 V+ M row := assignLObj.getRowNo(GlobalDistObj);
$ N* s& X# a* [- S# B4 ~ if Row = -1 then -- since 70
0 Z9 Q) F4 F& C+ y if lan=1 then& m8 |( T- D, \$ e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ A' V; [0 T" @! g! c3 a0 p to_str("in der Andockstation: \"",?.~.name,"\""));! A8 o+ V! I5 O
else
0 J0 b, C% z1 ]" z6 F0 `7 _ e% \: h4 W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ O, S. C% x5 r5 \" l to_str("in docking station: \"",?.~.name,"\"")); ) B) y* ~* x, F3 q- k. Q1 P
end;. e1 l. ]* P. N: w2 Y$ Y: q
else2 ]9 S/ v5 M, j4 u
@.Destination := assignLObj[1,row];
; k- L5 I9 X! E& }% ^ end;
* V0 P! X0 g/ Z2 V newDirection(@);! }: i( [7 F6 W2 k
@.HasOrder := true;
, h/ I @0 g3 A( I6 S+ { end;; i6 h' X3 q, S' t
end;
) x% Z f1 ]" N, dend; -- of the method
( q: A( o3 g- p% r0 }; v/ p$ C |