/* called by: entrance ctrl of the object 'track', R& \5 i3 i% [+ O2 D% b
*/' m1 \' @2 B; h6 a0 Q8 y
is
1 M# |/ y% j8 p6 p% o2 ?) C part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& E' T& r. a! ?% e8 s+ Z# T; vdo4 M# r; J2 e; b- w" w4 X
Lan := rootfolder.Internal.Tools.AOLlanguage;5 w. C" k4 {# {( T" G
if current = @.Destination -- else return
; G. B3 Y& D$ q6 H9 V' E N* i$ C* W then; T$ R- K2 W" B# C) O7 Z/ ]
@.Destination := void;- D; u( y' E; T B$ i6 ]4 E
if @.occupied then
S4 N, H5 m7 z( D part := @.cont;
6 n3 k, K/ t9 G. u/ E a. d: i @.transpOrder := void;
$ }" z8 V( }# \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 P$ I3 A9 z* f/ D5 U
@,root.eventcontroller.simTime);# Q3 n! w/ }' ^2 F/ i
@.HasOrder := false;# D9 e3 t' Y6 \$ N& R& i+ p( \
@.DrivingHome := true;& M. m* d0 o& g+ L$ U
rgManager.tryToStartTransOrder;! N T% b4 Q: o
if @.Destination = void
. D2 Y4 { h* U* P' y, { then -- no transport order for vehicle @
4 T k$ b( a7 Z' D$ _& u2 c @.Destination :=9 l; Y8 f) _- E k6 @& h; m
rgManager.nearestFreeStation(@,track.~);6 J7 f" Z5 I7 J) v. T/ y
newDirection(@); ( \6 `5 B5 T" _
if @.Destination /= void then/ E4 W! M( S9 o- o5 N
@.Destination.NumReservation :=
7 a7 x7 ?2 k9 U: f1 H @.Destination.NumReservation + 1;5 w$ P* t" }- L a
end;
$ x _. W- S2 \7 {' Z% z9 y @.CurrIcon := "drivingHome";
3 k% d+ } t0 m @.DrivingHome := true;* x& {/ P5 I( U- a6 c
end;7 P' r) p( Z2 \& _' S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) v) t4 Z7 _' w/ k+ c& o' _ part := @.transpOrder;- P9 S$ e2 D7 V
part.move(@);-- load part. C* H' V% [) a. ?" M5 _
@.CurrIcon := "load";
* I7 B' o8 u$ H, q6 k GlobalDistObj := part.globDestination;
3 L7 h1 f: v" v" U& [' C+ h7 q assignLObj := rgmanager.rgAssignL;
+ F/ [. N, m# v" E( r row := assignLObj.getRowNo(GlobalDistObj);
K. t0 y2 S( M9 T) k if Row = -1 then -- since 70- P# t4 x4 U: [: r4 m4 n
if lan=1 then1 }# p, x) {. z" y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: E% }# A4 o6 V8 S
to_str("in der Andockstation: \"",?.~.name,"\""));. @- }: J3 _9 Q. D$ q; K, M
else
# ^1 T+ |- i' J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; K2 ?& v$ x5 W/ t- M$ M
to_str("in docking station: \"",?.~.name,"\""));
/ A0 d3 E" a6 Y5 Y) H7 R end;) f3 Z, c$ e3 C% a; |
else
L- }9 |8 c* e @.Destination := assignLObj[1,row];
: @4 [( a3 I( L5 D8 S end; $ i. j9 O" ?: c. r- k' m
newDirection(@);# H' s# B8 r6 K' M
@.HasOrder := true;2 J' M# ]( P% e9 A1 d# D
end;
- Q2 W. V' Y- h5 ~+ i end;
+ z" i# g, Z, l- \' ]3 ^. J4 oend; -- of the method7 A- {% P [- j+ L
|