/* called by: entrance ctrl of the object 'track'" u, G2 [0 Z" K" [" p1 V5 v# D
*/5 v1 A/ S) g# i6 t
is2 ^4 c; @: Q7 m4 r4 L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 a; f+ b. ~/ ~* l+ ?/ t) a6 ?0 o3 cdo
- j5 v; n/ h1 ?: t; e9 f: V Lan := rootfolder.Internal.Tools.AOLlanguage;0 F* N; \' a+ b8 ]. V6 ?6 \& P6 w
if current = @.Destination -- else return' Q) y9 v, q+ j; o
then, L* N; Z E4 p# t$ i- J
@.Destination := void;
* r' G ]' G* R if @.occupied then
- P: c. n7 I2 V: T: W9 { part := @.cont;+ s* \2 k1 k5 q/ g- l+ M( r6 ?6 M
@.transpOrder := void;
* \( L# A) E5 b2 K+ L) W' T( @6 O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. { ?1 P0 U: {" J! m
@,root.eventcontroller.simTime);
1 E4 ?# M, k V d; V2 H4 u/ u @.HasOrder := false;
, o% w! p) B9 W @.DrivingHome := true;
# E0 |$ \* |% Y5 a+ m rgManager.tryToStartTransOrder;
# N6 x' a+ M: N8 ^. m( X if @.Destination = void& V- i& m% y- l% H9 n, U
then -- no transport order for vehicle @
* U H" e% J) J @.Destination :=4 U6 e q: r4 T; z. `
rgManager.nearestFreeStation(@,track.~);9 x2 q z- {0 B7 g
newDirection(@); 6 G* q3 M6 g3 H/ P
if @.Destination /= void then
& l0 ]% c1 t9 [$ H2 d" J/ ` @.Destination.NumReservation :=3 R5 }; Z% E6 u% G8 W! A( H" Q% U
@.Destination.NumReservation + 1;
& w% d6 v: F$ U; w9 S end;
( E$ ?- _) O* V; x/ X# I @.CurrIcon := "drivingHome";
7 h# V Z! [& h) M8 f1 | @.DrivingHome := true;
9 O m4 ^6 V( j& n a0 a end;
5 ?( x+ @2 [8 l& S0 } else -- the vehicle @ is empty, both vehicle and part are in the same dock station b& l- H& ~" l( k* d
part := @.transpOrder;
2 ?8 o# n/ X" R4 S2 b0 M8 z part.move(@);-- load part
4 |5 O3 u8 Y* H5 G h0 R2 u @.CurrIcon := "load";+ D* a2 b1 {' F* w. ^/ B4 n" @
GlobalDistObj := part.globDestination;" Q( O, c7 u' }# u. i
assignLObj := rgmanager.rgAssignL;
+ e) v2 f4 t- Y* G& T% V row := assignLObj.getRowNo(GlobalDistObj);
% ~( n. f8 E) o! X+ P9 w0 S1 R0 T8 y t if Row = -1 then -- since 709 j. I0 |: ], {9 }0 J3 ~
if lan=1 then4 p! U8 x- F6 n& _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 M0 I/ G" n) D7 C to_str("in der Andockstation: \"",?.~.name,"\""));3 e3 x. c6 S; T5 ]: q) Q9 s) ?
else
( \# m* B# @+ a) @" p% ^8 [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! {/ B, j! x" I/ B4 f to_str("in docking station: \"",?.~.name,"\""));
4 ?2 N$ j+ T9 S5 j! B1 s/ d end;
& K% l4 M* q: b5 k else) t6 d" ?; b4 |/ L1 }+ F5 p9 ~
@.Destination := assignLObj[1,row];* H! ?: K) o/ H0 c& K
end; * s* k3 x$ U* |6 M2 h5 V
newDirection(@); p( k% p- q6 X+ R+ u+ J9 J
@.HasOrder := true;
8 ]3 \( B9 X. p, q( |$ V end;
6 V$ f8 w* x/ n) F! B end;
3 Y+ X) y- I0 R1 Q. Aend; -- of the method1 B" }! x+ _& I z5 g- F
|