/* called by: entrance ctrl of the object 'track'1 A8 k+ @4 m, d
*/
8 i! V+ g6 n) c( a; o b8 K! }is( v, y( S0 E# Z) s" F, ], x1 x3 l5 m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; j) f. b+ o$ }, P& t9 B% Y' Kdo
" n$ ^6 X* Y. Q% K: ~8 U8 _% Z Lan := rootfolder.Internal.Tools.AOLlanguage;
' Y, v' G/ \* X# K if current = @.Destination -- else return
7 U n' h2 d) n2 g6 o then
" `3 h6 q! \7 r" w3 W! Z% X# \ @.Destination := void;# I& P2 y/ c! X5 Z% n/ h7 ^# m
if @.occupied then
3 M2 |6 y9 j$ D. n# q4 ^+ ~4 k0 ] part := @.cont;
- l* R# J0 f9 c6 `+ g! d @.transpOrder := void;; S3 Z* O4 P* G: V `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& k: [# t0 b+ R) \
@,root.eventcontroller.simTime);5 y0 c- O# L- G9 m& ^" M
@.HasOrder := false;+ j# [2 t+ h; _5 X
@.DrivingHome := true;" L0 ], e9 T( z' O8 B
rgManager.tryToStartTransOrder;
' v) M+ @; { N" i5 T! u. A if @.Destination = void
. P3 Z; d9 S4 g5 U' n4 O then -- no transport order for vehicle @+ ?$ U* ^. x/ S U$ R
@.Destination :=
- Z, ?0 Q3 ^6 f rgManager.nearestFreeStation(@,track.~);
% E7 ?; Z! n% H# N- f newDirection(@); 5 w5 ~4 \5 _4 K0 `# C: F, G6 ]
if @.Destination /= void then* x1 i8 m* Y* ^. v5 W9 ]
@.Destination.NumReservation :=4 w* m/ {% u2 k7 l6 ~% y% A% \0 Z
@.Destination.NumReservation + 1;
' ]2 ~6 b k7 O& y end;* n. B: Z+ m& _6 N7 ?+ ?* w$ c
@.CurrIcon := "drivingHome";
# e7 m8 G6 p1 i. C @.DrivingHome := true;
8 [1 z- y$ B$ i9 X3 i, P end;) v' h s% Y6 Q) X2 K7 w- B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' T' _3 O. J% \1 k
part := @.transpOrder;
4 e" v7 F9 {/ } part.move(@);-- load part
9 q( \4 w# y, c p3 F. u @.CurrIcon := "load";8 \/ f+ B! B4 [% P. f2 X" m+ ]
GlobalDistObj := part.globDestination;
6 r) \! ]9 a$ I assignLObj := rgmanager.rgAssignL;( }/ X- V# U6 ?$ G6 k* ?
row := assignLObj.getRowNo(GlobalDistObj);# O6 X. b% U; b6 g1 u# E' L1 |
if Row = -1 then -- since 70% L) B' Q- @( Z) o
if lan=1 then
5 Z l& Q; A* K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, b- u, y, {1 l3 x: _, z& [6 z
to_str("in der Andockstation: \"",?.~.name,"\""));& w/ C' G# A) p [
else
8 g) p% h) W9 d: U5 w4 ~' c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* _& z- x0 a' C
to_str("in docking station: \"",?.~.name,"\""));
# m3 j$ p7 B. R end;
3 b4 `+ J; ^9 I4 A- ~1 b else( D8 o- G4 e5 h3 O
@.Destination := assignLObj[1,row];+ k5 @- o9 m% Z' O( Z- N- |
end;
7 o- c( q* s4 h, S( U* S3 P* N$ [3 U$ w newDirection(@);
% e( R5 q4 d: I# B @.HasOrder := true;; K( B. l% [$ `7 }; p0 x- x
end;4 J" F3 v( ~: {- l; C0 V! m
end;
6 B; W0 x9 f$ c. \) b$ E8 j) z" Wend; -- of the method j+ f5 a% X6 u# x
|