/* called by: entrance ctrl of the object 'track'7 L4 L5 T+ ]4 U4 L' c
*/. @- t; V: ~" Z$ z" j
is: v0 w: ^4 o! ]) Z7 x& P0 b3 q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; D" F& Z3 I2 [9 ^+ V4 M
do" v" W' f8 k6 F
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 H+ i, U' q/ H9 l2 a8 o; H: W if current = @.Destination -- else return
* n3 d; J0 \* @$ ^4 G, ] then+ A( h5 t1 L, V3 a9 S7 a
@.Destination := void; A9 C/ N/ I; w/ g
if @.occupied then0 b9 F# b' ^& S- d
part := @.cont;) u+ Z) q7 ~: e) n& O8 Y3 W' u# N
@.transpOrder := void;
* ` C6 G9 q4 [! o: y p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, T9 _( r7 C& D. h5 L
@,root.eventcontroller.simTime);
9 g, e0 T& { N! i1 R$ { @.HasOrder := false;
: M# g: g5 F6 W6 ~0 _ @.DrivingHome := true;
/ J! o! `; ^& P, l" ?& o. r rgManager.tryToStartTransOrder;
L. z- t& p+ o/ y" a. e if @.Destination = void& Z( M, A$ g+ \* b& U% c- }- k
then -- no transport order for vehicle @
$ g# @( c& J, K4 u) s: c. y9 ]. b @.Destination :=
9 s3 X$ d8 o4 b" W rgManager.nearestFreeStation(@,track.~);
3 B/ w/ \: p, u3 f2 E1 m5 j G newDirection(@); 1 X7 q8 Q$ y. N/ I# k; Y' K0 ], z- B
if @.Destination /= void then0 b- B2 g. m3 R |* p- y7 _
@.Destination.NumReservation :=
4 _2 F0 Y5 y" X0 t @.Destination.NumReservation + 1;: p0 {) W* V8 J7 h' ]9 O: {6 D
end;
; q; N4 `7 h! H1 k1 d' |+ s2 V* i @.CurrIcon := "drivingHome";! i5 \- t- u) f- G' A' b& q6 `
@.DrivingHome := true;
2 }& E. [/ S7 |* r2 v _% x end;% R; O- b* J& m% V% ]) A
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 u B0 @& k& W part := @.transpOrder;
; O* u9 G$ N! d. Z1 b- P part.move(@);-- load part
' s+ T x1 L& P: f @.CurrIcon := "load";" T A }2 `5 z' H+ f N/ v$ y
GlobalDistObj := part.globDestination;" L3 d1 Q* K; W& a. P
assignLObj := rgmanager.rgAssignL;
) v: K: Z; u/ b v+ p. I$ e row := assignLObj.getRowNo(GlobalDistObj);! I3 _1 N, D, c
if Row = -1 then -- since 70
! j6 Q( Q2 B: g+ w8 k6 t' i if lan=1 then/ x$ k, J. k) k4 f3 Q$ `: D
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
I# _( M& f9 ?- e. X8 W6 p to_str("in der Andockstation: \"",?.~.name,"\""));
m" U" J# G% @% s else
1 V6 q$ h3 o. Y R% Q# W' p4 x% } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! l8 [- ?; Z- `+ [
to_str("in docking station: \"",?.~.name,"\""));
& _; K4 a' F* H6 A3 T end;6 D, ~5 z' ~$ _. C- W. b
else
: Q0 b, z- ~( t1 } @.Destination := assignLObj[1,row];
6 j+ z8 n8 n' f( K end;
% k7 S1 K% \, p6 d' m+ G newDirection(@);
1 ?- s! n2 G+ G @.HasOrder := true;
8 ^0 j0 N$ V4 \2 D+ S* d9 P; B end;- ?7 _, `6 w7 T( ]
end;7 R, E' L2 @) C$ ?
end; -- of the method
' W# |8 n* @* m# N/ Y: ^6 | |