/* called by: entrance ctrl of the object 'track'
3 X* I8 o/ O* R1 b; t*/
- ~( [; ~, I# V7 ^) E! Mis
' M, l! s; t8 m m. U% N- T) z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 I( n6 \ l* C, F( ^) l( zdo" X- o6 N, o0 T; L# Y8 Y E
Lan := rootfolder.Internal.Tools.AOLlanguage;) y) I7 R- V+ Z
if current = @.Destination -- else return
) `& c/ C$ A* E" r/ W then, C- f M& v2 G8 T3 U) O/ P
@.Destination := void;/ u# w# S0 O7 F0 w) |
if @.occupied then! u! K# L/ D" P
part := @.cont;& u' @( m7 y9 b' D' L1 m. w) G: h
@.transpOrder := void;& P* a$ i( p- m# `% \/ d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 I9 }. D+ U: S; x6 S! A
@,root.eventcontroller.simTime);
, B) f; d' E' F1 Y4 r! {0 ?0 F @.HasOrder := false;0 i/ v5 t. f' j1 s1 k
@.DrivingHome := true;
# v& `0 J- Y- U rgManager.tryToStartTransOrder;
6 |! B2 A k2 z' Q0 Z | if @.Destination = void
0 K" v5 l* s! c" a: F. Y: @ then -- no transport order for vehicle @" P% C& F% h( M, R/ h: T p
@.Destination :=9 X" Y* f. L( m5 O* t* h
rgManager.nearestFreeStation(@,track.~);6 N T" x8 i0 u& h. t0 T: X& F
newDirection(@);
9 m( S- _. W5 M# M8 [ if @.Destination /= void then& f/ Q/ ~7 X% T, q( f
@.Destination.NumReservation :=
1 m1 x* D& i; D% a @.Destination.NumReservation + 1;+ l3 s- p/ ?4 F, K0 N3 A
end; _6 s9 K2 G; ]7 s
@.CurrIcon := "drivingHome"; E; `5 P& l( y0 u0 f
@.DrivingHome := true;
$ ^$ }- ?; d# k& ]1 n* x end;
! I7 t6 w/ p! V4 X) S- [" ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 M' q. S+ \4 m* b& n" p, J- t
part := @.transpOrder;5 Z9 Q9 t4 F- F5 P; N6 X
part.move(@);-- load part9 O6 O& S) b& ^$ D; |
@.CurrIcon := "load";
4 Z; p! ]4 Y* \4 ~ GlobalDistObj := part.globDestination;' e; D+ B) v0 C4 e3 p {4 R& d( Z
assignLObj := rgmanager.rgAssignL;# d2 N0 x) d- U' u
row := assignLObj.getRowNo(GlobalDistObj);8 Z' H9 z2 `" D- T4 `& m+ f
if Row = -1 then -- since 708 s! f. @% Y3 N+ N4 P6 d, t4 u
if lan=1 then& O- s& c7 Z3 b7 Z8 `, @. ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ N9 H2 Z$ p4 K# s, z
to_str("in der Andockstation: \"",?.~.name,"\""));
# w- L2 g; e$ R, J( H% A else
- Z! N% y! N( Q# i6 ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 i* Q$ X& ]" O
to_str("in docking station: \"",?.~.name,"\"")); 3 h# D: [% s0 r, f+ m$ _6 ^* K
end;
; x7 P- q3 L, U else7 H0 r5 P% c b' q* y. H& }
@.Destination := assignLObj[1,row];
' J# t9 C4 Y2 z! } end;
6 L2 _3 ?; u6 g9 E# T newDirection(@);
5 \* p0 F' ?; b1 Y& l4 ^- e% z @.HasOrder := true;
; s* j/ q9 c4 F' Z, |( Y3 c end;
# t. S4 P4 O3 i1 \7 r3 y) H end;
) U6 L7 n8 V' Y1 f- }end; -- of the method! K p) r. u8 e
|