/* called by: entrance ctrl of the object 'track', E+ a* D4 {5 ~
*/
6 u6 y* z- v+ p+ F7 Vis# S) c( f: B% G/ x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' Q! g7 U! S" H, A4 I5 n9 ^. b
do( ]% p5 D. Q- a3 S/ R0 P: @ |
Lan := rootfolder.Internal.Tools.AOLlanguage;2 w9 g! ^0 @* V4 r/ v
if current = @.Destination -- else return, x0 q# a; y# C2 ?* q" U. j
then' @+ _! Q. U! G( V }, H- L" O" {2 F
@.Destination := void;) C/ M1 ~) l! s; C: x
if @.occupied then- m1 u# a) M, Z& t1 f/ C( c
part := @.cont;8 m1 G9 z1 u7 G) J l& p+ a2 }4 l4 A- M
@.transpOrder := void;+ A% A) ?# |( [, i, f8 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) y. |/ Z% K8 E. | @,root.eventcontroller.simTime);+ Z; X9 j9 r2 ?+ U
@.HasOrder := false;
! J: U1 W- Y5 H% k* M2 D: o$ V; B# D& i @.DrivingHome := true;
: {. ~6 `, U3 D- Z5 n$ q rgManager.tryToStartTransOrder;
* l1 P4 n0 `# X9 M9 ]) C if @.Destination = void0 z3 i0 N \- D
then -- no transport order for vehicle @3 `* J7 Z6 r9 X6 C. m
@.Destination :=: [5 i& r$ ?" c, N
rgManager.nearestFreeStation(@,track.~);$ b9 n; E6 K$ N, h3 g0 w0 H
newDirection(@);
7 Z9 M6 p2 i0 D' Y% l, F# ` if @.Destination /= void then; A8 a: d c) i+ U9 h5 q; [2 K9 E
@.Destination.NumReservation :=
9 [/ `1 z# N2 [7 `; e @.Destination.NumReservation + 1;
( d3 a# D5 w# S" S end;7 w; A4 w. w0 B9 B
@.CurrIcon := "drivingHome";
& C# E r; i1 c7 i @.DrivingHome := true;
! m# h% I2 T5 A' Z# N end;+ e0 ^1 ^- e2 A
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 k1 b0 d, f, G8 E# t part := @.transpOrder;3 p( l. l$ e% _# H# ~6 K! S$ ^$ V
part.move(@);-- load part
1 w. e( @# l$ f) W& v- A @.CurrIcon := "load";- V( W0 x2 y4 R- \9 f3 C
GlobalDistObj := part.globDestination;! S5 \# D+ v. k; G' y. B0 Q6 `
assignLObj := rgmanager.rgAssignL;% e) |3 [% q. f% L
row := assignLObj.getRowNo(GlobalDistObj);/ }; x' ]) U% v# B2 v2 l
if Row = -1 then -- since 70. M; }7 u2 G2 S/ H+ a/ u( \
if lan=1 then5 X4 S$ j" W% d& I" J6 d2 h1 v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ d6 b: \& w7 a+ V8 j
to_str("in der Andockstation: \"",?.~.name,"\""));
. R" |8 j& M& R* [6 M/ y+ g else
- s* x6 e5 ? @1 h) M' C, M* I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. |# I+ H; `) Z. h+ v& C to_str("in docking station: \"",?.~.name,"\"")); ( x! D( u! Z3 w" ?
end;
3 l r* _5 ^. W9 j- Z E else2 T9 \, q- P, f6 ]
@.Destination := assignLObj[1,row];* E3 r1 Y4 T% ~/ H
end;
! A! z2 |7 |8 F" ]' u! o1 P newDirection(@);
5 p7 U. r( P6 A @.HasOrder := true;
) C o& a9 C* k6 h% ]5 k$ h end;
9 _2 w, e6 ]2 ^5 ?+ I end;6 {4 w$ W5 _; ]/ Q! U; h; `6 _; _8 o7 c
end; -- of the method/ n; `4 }& C& d f% }' S* o
|