/* called by: entrance ctrl of the object 'track'5 @5 d$ y" o9 k& b$ p1 n6 m
*/. R7 t/ Y3 ^$ E2 u
is
; F. [" S6 x& k; |# Y# X part, GlobalDistObj, assignLObj:object;row,Lan:integer;# s3 r* `" V* | \: l1 z
do
, h, j1 L B3 c: p& u' o |' H Lan := rootfolder.Internal.Tools.AOLlanguage;
. r% |8 h4 V' E- v9 H% T if current = @.Destination -- else return& |( V( {. m. ~
then
* M% s7 Q4 L1 |1 q7 B, B @.Destination := void;
( `. X: u+ b: |' n \2 M if @.occupied then
% j! a8 v+ e! F' {" _ part := @.cont;$ Y: O4 a0 X h! V( z
@.transpOrder := void;8 F1 D* a8 E+ s7 X6 a. s+ \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 |: y% R+ y6 \
@,root.eventcontroller.simTime);
/ L# p# Y# n: }' Y/ J$ z# c2 M @.HasOrder := false;
* f/ D1 ?% Y5 K. y } \: O @.DrivingHome := true;1 {6 Z' F1 ^4 _) C" W5 f3 z' g9 [
rgManager.tryToStartTransOrder;0 S* x6 ?- h, S
if @.Destination = void
- E/ Q8 p+ P* A" h+ p# ]( s$ y+ r9 y then -- no transport order for vehicle @
8 {8 d7 g4 T& p" H& I @.Destination :=
8 u8 T/ o9 p, j5 t rgManager.nearestFreeStation(@,track.~);/ M) C S& z+ z; |5 {# p
newDirection(@); 5 W, o" w$ C) n r
if @.Destination /= void then9 z) w# x4 C4 l( `- g6 _' ]
@.Destination.NumReservation :=- K5 O. e+ } Y$ Z( K0 a
@.Destination.NumReservation + 1;
9 W* v6 w5 T! \% E/ `+ G end;
* X7 O' Z1 I5 E4 y. s; H @.CurrIcon := "drivingHome";) Z0 [/ s# ^- j9 {1 K4 M
@.DrivingHome := true;
" S5 E: `% X, N# W end;& o6 n. _) s# {5 @" v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- h% m! H3 Y1 B
part := @.transpOrder;7 x3 G, ?& O: t7 E, n
part.move(@);-- load part
3 F( p0 {" t5 ^+ c' T5 u# Z- @ @.CurrIcon := "load";
9 ^+ X; f3 s# H$ F$ j GlobalDistObj := part.globDestination;
* k- J* {8 V1 ]6 E" u assignLObj := rgmanager.rgAssignL;, X/ j% ]& r, D% a5 {
row := assignLObj.getRowNo(GlobalDistObj);
7 d# d* `, w1 a1 H if Row = -1 then -- since 70! ?* k* h T' l
if lan=1 then" n6 \" G; y7 C B: @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ ]' M& w6 _9 ` t9 e) t& V to_str("in der Andockstation: \"",?.~.name,"\""));, U! m6 ]' @: B Y- Q0 u" @/ z! [
else) D! R- w. w# H+ I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) x- w' ~ i8 |% F4 }- r to_str("in docking station: \"",?.~.name,"\"")); " {0 ?3 u* [' \# C: o7 @
end;
/ k w S. ~& O ]( L else
7 m, \: k$ h \ K; a3 m @.Destination := assignLObj[1,row];
6 M& f' D; ~6 y8 R end; 8 q/ u N7 o6 ?/ \ V- a" C) m
newDirection(@);
5 M0 {" [+ ^ Y) d" I1 N4 J @.HasOrder := true;
& o+ h& H( v" c6 t7 {& H5 J c end;7 a3 g+ e1 S6 N1 g' j
end;0 b8 a# E, L! C4 n, z+ x5 r
end; -- of the method4 R4 H* e: d- ]( k
|