/* called by: entrance ctrl of the object 'track'
% A/ Y' ]1 h3 k- v, n; l$ I) [! b*/
/ K6 d* n# ^5 Y1 X( i) @is
6 I' w% }4 a; t, P5 i' m8 \3 S8 e) V part, GlobalDistObj, assignLObj:object;row,Lan:integer; ]+ o& m: k% c
do7 M4 J% ~8 n: w3 E
Lan := rootfolder.Internal.Tools.AOLlanguage;+ Q6 a# ?5 k4 z, _2 s( b) p) i
if current = @.Destination -- else return
$ a; R" N- b; G, W/ X! m | then
: c( F% X% d& x: m, S8 s @.Destination := void;
0 E$ Y$ @8 s( \1 q# g* _( o+ Z( H if @.occupied then
- k7 D0 \# M( N/ d, z2 }* Z part := @.cont;
! @& c9 ?4 o/ [4 R% ?' ?% r @.transpOrder := void;
1 l, i0 q3 }" }/ O2 ^, o2 R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, T1 D0 ~. }8 A' t2 A" {
@,root.eventcontroller.simTime);
+ O+ W4 e, C2 T: ^ @.HasOrder := false;
, E+ J& l, o$ x; t5 Z8 N. U @.DrivingHome := true;- Z& k$ i4 J( u4 _3 K, q
rgManager.tryToStartTransOrder;
5 n. t3 H' C( A- X& C if @.Destination = void4 z, r- z6 s1 l8 L6 N
then -- no transport order for vehicle @& p/ g5 z! ^9 i; x) S" m( }# B
@.Destination :=
9 ^: G" t' W! {2 ^) u" _1 J rgManager.nearestFreeStation(@,track.~);
0 F2 D' s9 l7 I newDirection(@);
: }) y1 e, k# p# ] if @.Destination /= void then
2 k7 }( u- q0 ]1 f1 h$ t7 P( U @.Destination.NumReservation :=- }1 c0 t8 u8 H) ~: g) \% c
@.Destination.NumReservation + 1;
% z8 O% B4 ~. [. j end;% e, b: [+ b' x- m' d& }3 W
@.CurrIcon := "drivingHome";8 V% `+ s5 d# d; }4 |
@.DrivingHome := true;- V% Z4 B+ ~7 x2 V' `
end;
+ c, C3 I' _! B& x$ U else -- the vehicle @ is empty, both vehicle and part are in the same dock station' W( D, ]$ c, v) s3 A
part := @.transpOrder;8 k8 n4 ]9 k$ j* E8 o7 _
part.move(@);-- load part
" b# {7 {- H c% b* o& c% j @.CurrIcon := "load";
) l, L' E" i* b& n0 J/ L& t GlobalDistObj := part.globDestination;* c! ] T6 ~5 T- K, W3 C
assignLObj := rgmanager.rgAssignL;' D2 S4 S4 X/ @: j3 S
row := assignLObj.getRowNo(GlobalDistObj);! K% F- u) B. M0 k( S/ b
if Row = -1 then -- since 700 Z3 L% m% @5 v. Y+ X) J# I
if lan=1 then& {8 l- f& }: i) F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 ?8 ~3 E& O9 |3 ^) ^8 A
to_str("in der Andockstation: \"",?.~.name,"\""));
0 [. B$ [6 j- @6 n O3 a/ [/ m/ q1 m else0 Y# j: w8 S M9 E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 {% P8 d4 P9 Z to_str("in docking station: \"",?.~.name,"\""));
C0 e+ Q/ G$ h6 u. a end;
& P. i2 G4 [8 l4 c else6 A1 s- e# n- [7 d2 g. W e/ D+ M
@.Destination := assignLObj[1,row];
$ P$ h% n: N+ u- n8 r7 B end;
, Z [0 D: o5 p+ o: M- ~$ E newDirection(@);
9 Y; n& S& D; w! q4 g8 L. A, V @.HasOrder := true;
# S7 u% g. x2 j. @ end;
* ?: Q1 m$ U+ |0 C- n. ]% a% p end;" q5 q5 Q; A' O$ B2 s/ f0 G* w% O
end; -- of the method
1 P) q& b$ E: i, u# n% ]; w |