/* called by: entrance ctrl of the object 'track' t2 f* R7 v5 c2 `
*/0 i" p4 B6 i- L- w" b0 A1 L( H
is6 Q+ y s/ k) z+ ]1 Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 }4 x% g2 D3 u8 Ido5 D0 D5 G% Y: c" c; {
Lan := rootfolder.Internal.Tools.AOLlanguage;
# ]; ] a. S( g# a& a* ^ if current = @.Destination -- else return- S I6 q7 F9 u- V7 o
then
$ R3 E6 c0 k1 |( }3 ~& l& N @.Destination := void;0 Y+ q7 y1 q; m! y9 u
if @.occupied then
! A: r' p3 ^5 i: L( C& V part := @.cont;& l2 j. ]3 ~; c3 A2 y* U
@.transpOrder := void;' V, M; h/ T5 ?: k: u! Q! u; t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 K( _% z* x3 K4 }. A9 z( m/ n3 p
@,root.eventcontroller.simTime);
7 A9 P0 V# c1 N( ^/ M* s0 f( H2 Z @.HasOrder := false; W# Z! \6 z2 i0 r3 B! x, Q
@.DrivingHome := true;
& f0 S9 R7 F8 p# N! T. N y" w rgManager.tryToStartTransOrder;7 T( ?! U' g! f2 a H' c. P2 {
if @.Destination = void, N: f* V N: M
then -- no transport order for vehicle @. m/ O0 \/ [; O% v, R
@.Destination :=
) G1 _! a' _0 J# u rgManager.nearestFreeStation(@,track.~);
`& S- L5 r0 Y- z newDirection(@); ! a1 {) _( f. M5 l' k8 s' T
if @.Destination /= void then
- i. q$ U4 p5 s1 J8 N @.Destination.NumReservation :=7 ]2 y' x' K: R' Z9 c k5 @' C
@.Destination.NumReservation + 1;
" p, x6 O ]' @; x) Y v5 P& z end;
6 ^8 ^- L1 A3 p) B @.CurrIcon := "drivingHome";
- @$ d& c& F8 k& [) K1 { @.DrivingHome := true;6 I" N3 G. \2 s N
end;
/ c! h$ |5 v$ `* y: P8 G5 A- Q, P else -- the vehicle @ is empty, both vehicle and part are in the same dock station; M' X& Q `6 ~! G1 Q
part := @.transpOrder;
" w. N4 w5 \! x) c$ }; l part.move(@);-- load part2 J0 ~# x1 W9 g# w# l
@.CurrIcon := "load";0 r! f/ ?. W4 t( h6 ^) w/ B8 {: X* A: G
GlobalDistObj := part.globDestination;
5 r; V. d) A& E8 \9 t1 Q7 i assignLObj := rgmanager.rgAssignL;
) \' ~: P( r [0 W6 \% x& m3 V row := assignLObj.getRowNo(GlobalDistObj); ?5 R; I. J% o% k
if Row = -1 then -- since 702 Z7 V# f) R- A* v( k
if lan=1 then' E9 b& T" c* b* Z: y S! v2 c
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 O, i/ _; @8 M, _ W2 }) D1 s
to_str("in der Andockstation: \"",?.~.name,"\""));
% |" }$ p( h7 Y7 z# g else
' y3 ^( ?; h2 X5 c/ [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! o6 K/ w7 y% l" t' }
to_str("in docking station: \"",?.~.name,"\""));
: z _. h7 C- I3 U% m Y2 v1 |4 G end;. G" H `/ H4 v2 W1 Y/ x6 h
else0 @ B. g8 I+ B: c* ?
@.Destination := assignLObj[1,row]; P. l4 t. k$ `
end;
" Q9 |$ N4 G4 P+ I8 p; P newDirection(@);
4 Q3 S' e3 _' ?; P7 [ @.HasOrder := true;
7 a. s7 D/ ~) B end;: h8 h F. K; O7 h/ U6 C1 v2 @6 l. j
end;
! Q6 [: Z. q% f: c7 U5 Y$ ?6 aend; -- of the method0 o$ n, g0 S( J4 o+ @
|