/* called by: entrance ctrl of the object 'track'
6 Z5 k+ d6 h2 D% R! m) \8 j& I*/
6 c4 Q; z! B" W9 ]; o% p/ @is! c" G/ W+ p' q1 V/ m7 h# ]3 J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ U/ ~! T- T* P$ v2 z5 R
do& \( w5 s! d8 S0 ~
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ `! } [2 g; _% x2 s if current = @.Destination -- else return
' f" z- X* K3 u8 \ then* R% R7 y r2 C. H5 ]& J) C
@.Destination := void;/ ~% p' U7 h! y' J- r9 j
if @.occupied then
3 T1 t u' E; D$ t9 a part := @.cont;
2 I9 l0 t" _, ~7 j* } @.transpOrder := void;
* z# s3 O/ e* D6 r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! w! |1 _4 r2 G& [ @,root.eventcontroller.simTime);
$ H3 w0 D) o) f/ `' |) b) t @.HasOrder := false;
5 f" C: m( f; c: a* h @.DrivingHome := true;
9 N' l# a# v5 p rgManager.tryToStartTransOrder;6 l2 L3 p' n A# e
if @.Destination = void
d* F9 C% f; d; I- r2 B" Z; O then -- no transport order for vehicle @
" I% h2 c$ L3 K @.Destination :=
W8 |- d: d6 t2 z6 {9 {' k& P rgManager.nearestFreeStation(@,track.~);& S, p; x2 \& Q
newDirection(@);
& m6 Q V9 o+ S% n+ Q! Y if @.Destination /= void then z6 b& r/ C* f7 a* O, z
@.Destination.NumReservation :=: b, r( _1 a; X' B J* U
@.Destination.NumReservation + 1;
: `, k5 x0 M v& e: N$ \7 o2 Z end;
0 ~6 t) ~: _, w4 h( ]: g @.CurrIcon := "drivingHome";
+ h$ f, d* L7 ~6 h6 z. A# u1 n* S7 } @.DrivingHome := true;
# ]7 c" S5 t) v3 s6 h end;
; d: ]; _# P. L1 F2 I else -- the vehicle @ is empty, both vehicle and part are in the same dock station; s7 D* d% p( T+ Z* J3 `
part := @.transpOrder;
/ y0 Z1 I8 x' u& ^3 O) B0 t# d part.move(@);-- load part# @1 t3 x+ _) k( I- S
@.CurrIcon := "load";
+ M" X1 `! o K) e' }/ R) E GlobalDistObj := part.globDestination;
% {; `" g& m \4 R$ Y assignLObj := rgmanager.rgAssignL;# H8 U9 h2 U8 V* R" [( F6 n+ K
row := assignLObj.getRowNo(GlobalDistObj);
! C! W4 C; b/ H+ j7 M2 J: d if Row = -1 then -- since 70
P: f- d1 l# y% n2 Y5 {$ n if lan=1 then
V! M1 t7 d. o2 m+ M' f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 i* o- K& p/ x" r) I to_str("in der Andockstation: \"",?.~.name,"\""));0 a8 P: `) @% \/ D8 K# `1 M& E
else! `9 o/ I) t8 { w8 I; d. f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 C3 t" a: j. R$ s/ V% s to_str("in docking station: \"",?.~.name,"\"")); " N5 v2 d; H1 G8 }
end;3 m U4 q6 \# u( z9 B
else$ c _/ l6 v+ M* {6 M) ]$ l+ K
@.Destination := assignLObj[1,row];
+ c, r; r! t- Q0 g. j1 N6 h end; 8 g2 `$ M" t/ ~3 ^$ o2 g
newDirection(@);$ C! Z5 s1 r+ C0 n) @2 I$ l8 @
@.HasOrder := true;
% b' O6 d7 [0 w8 T/ v, ] end;4 C+ Y, E: t, q2 H% ]- o! H6 [
end;
' A% \) f, X( f! T. {5 N6 u3 \5 Xend; -- of the method" _$ J7 }, i$ Q3 F- d: @
|