/* called by: entrance ctrl of the object 'track'
- \3 M# ]/ V `4 `7 T: R9 x*/5 m1 G2 x+ d5 K9 m8 ?6 e# O
is6 y! c& o, C: u! Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ Z0 V5 m; b3 F% W. V- q5 L
do
( P. s" x, a+ k% C Lan := rootfolder.Internal.Tools.AOLlanguage;
1 M& u5 _. L4 u if current = @.Destination -- else return
; W4 R, x e( M2 Q7 u then: E/ w8 W( `/ T
@.Destination := void;
9 X3 I' e# Z$ k4 w4 ]2 N if @.occupied then
8 S: f! i" M0 t part := @.cont;
% C0 Q( i5 e$ S! N5 t+ }/ u. m @.transpOrder := void;
, B- m: q3 d, Z/ j4 m& b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 ]. ^) h) `9 ?5 G' P6 n+ q @,root.eventcontroller.simTime);4 l' C6 `/ e* g2 d$ n: w
@.HasOrder := false;) @/ y* |: e" p5 K* |3 A
@.DrivingHome := true;! p) W: f8 g: |
rgManager.tryToStartTransOrder;7 Y8 o6 W G, x, l) |! H" M
if @.Destination = void7 ~# U+ z( w- o h: ?
then -- no transport order for vehicle @/ [! V* ?0 J' J, `) G
@.Destination :=# f/ n, u; h( s: T+ Z! ]* X9 x M0 u
rgManager.nearestFreeStation(@,track.~);
, j2 q3 Z5 [! H1 k# H( Z) G newDirection(@);
& ~4 y" |& G$ q2 ?2 G if @.Destination /= void then
5 N3 p0 R+ r4 C& l# d @.Destination.NumReservation :=7 y z; m1 l7 V$ y
@.Destination.NumReservation + 1;% H' N3 e( D8 R2 r! z( j; X
end;0 f3 ?- r _4 Q. ^, f) m9 e3 }% [
@.CurrIcon := "drivingHome";
) e/ M& O3 c" ~6 w. | @.DrivingHome := true;" \: k, \, X, N6 T% y$ l
end;( ~9 j( c% k P; F8 n7 l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ I) l3 ^: W) n part := @.transpOrder;) p4 f* X7 E, }4 r: q
part.move(@);-- load part
! h- E# s, _9 n* J' o& m @.CurrIcon := "load";
8 G& \1 @2 w' b GlobalDistObj := part.globDestination;6 v' k" E) m- K" p3 }' b
assignLObj := rgmanager.rgAssignL;3 u6 O- ^7 f7 n' {: A
row := assignLObj.getRowNo(GlobalDistObj);
- @8 j% o, A' Y& f! k if Row = -1 then -- since 706 h. B+ [" O- @7 J( Y' B
if lan=1 then
B; r+ u9 P0 ]- V; {, u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% O! G: {) \2 q
to_str("in der Andockstation: \"",?.~.name,"\""));
" k7 d, `) L W/ h$ D# B else0 j1 _- W* w \6 z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' |; P& }. @2 u' D
to_str("in docking station: \"",?.~.name,"\""));
: h, q* g: `% ^ end;
( c4 V9 h: E) W0 ^ else$ s0 @! C$ \0 V ?
@.Destination := assignLObj[1,row];% L2 p3 Z+ I0 F) q1 d* r
end;
5 C* O) U; F7 K/ T0 ] newDirection(@);4 M0 p. S3 G+ |: h" g: |
@.HasOrder := true;0 [. k- E" \* e% }9 X
end;
) G+ U1 t! Z( N end;5 e2 ]8 @. Z; B
end; -- of the method5 w7 {/ A& a# e, I
|