/* called by: entrance ctrl of the object 'track'- Y% }/ `1 ?) _7 T( [
*/
4 Q9 u7 A$ O( j0 U8 ~. g) ~is
1 C5 _/ r( F; r9 O part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 y/ W' H; Y! [ R) p9 @
do% v- ?5 _+ {/ t+ Q. J6 f
Lan := rootfolder.Internal.Tools.AOLlanguage; T: S6 W3 e; W& h
if current = @.Destination -- else return
! M. Q7 p" ^: G5 m5 f then
' R- y R1 l0 D @.Destination := void;2 @( d+ U) M- P# o) g
if @.occupied then
) m, S2 Y( M, E' s1 w part := @.cont;
, }7 N4 ?& T9 y" ^! }/ C9 T# d4 X @.transpOrder := void;
) N, C9 r: y1 T, o9 R( O/ A! T) S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 U. x, }8 [9 o4 A( S: }+ e# ^ @,root.eventcontroller.simTime);
# ]) \& A4 ^4 v# W& n" W @.HasOrder := false;
4 W+ P# R- ^0 g* P @.DrivingHome := true;
$ A+ K# W0 E: V- }6 C rgManager.tryToStartTransOrder;
: k# M2 B7 ^- o# G; Y. l y* H1 O if @.Destination = void8 @# d: |3 r3 b( o
then -- no transport order for vehicle @
3 U) v8 L. @% V* Y8 R @.Destination :=% I0 w; a, Y# J r% y6 T; k
rgManager.nearestFreeStation(@,track.~);
, H5 B1 h, o7 c" G# \ newDirection(@); 6 B0 n+ Z4 k# B# y% f% M% h, J/ r
if @.Destination /= void then7 J5 C; h9 E; o J: o- z
@.Destination.NumReservation :=9 Q# `! V% T% S( {
@.Destination.NumReservation + 1;
! `$ {( s8 e" Y, W2 n, f' I, B' ] end;
2 I0 b7 H$ A6 Z; ?. x0 |0 { Q. j @.CurrIcon := "drivingHome";
( F. W1 C* l' K3 m9 d: Y: _ @.DrivingHome := true;; y) \0 x% t7 ^1 |1 s) C
end;9 N& ~* ^5 l$ j/ x- ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 c( H( K8 f; l part := @.transpOrder;2 \7 X9 X( R+ e
part.move(@);-- load part. L: W) X% {' S- f# }' }1 l% b
@.CurrIcon := "load";, m4 L1 r$ ^! z& f) b# r( _, O
GlobalDistObj := part.globDestination;
2 O6 U S$ m, r: [# p D assignLObj := rgmanager.rgAssignL;
, I: I9 C6 ^0 f. t+ d& `* [/ L row := assignLObj.getRowNo(GlobalDistObj);' T9 g/ A# p- Q% ]
if Row = -1 then -- since 70
: M P$ l6 @4 _! ?! B1 m if lan=1 then! E9 p- a& W% c$ J( F; ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 `+ K3 u, P5 Y0 ^6 r1 I' _ to_str("in der Andockstation: \"",?.~.name,"\""));
) o0 }- ~! h. N. y' L else9 I1 I- E/ a( S" d) \. p
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ u. x! W7 P, q | to_str("in docking station: \"",?.~.name,"\""));
' j. y A4 K0 {4 Y end;5 S0 v3 y) D9 |
else* ~7 ?4 U9 o' D; j# |
@.Destination := assignLObj[1,row];
* [" `. ?3 W) V. q8 ^2 K, \2 i end;
+ b; `* Y6 D+ V newDirection(@);) g T7 }$ N; }# ^; M! m. k# [
@.HasOrder := true;- q! j& g1 j" G0 _# F. m
end;
: z) ^+ R0 F6 _; D. P6 M: z: F' t/ e end;% k1 u" P( i: \8 X, B! z" [
end; -- of the method
& c: Y) d$ R5 p# i" x- ^8 d; L) O |