/* called by: entrance ctrl of the object 'track'
% o l6 b, \- X6 V' g$ g*/
/ h3 D, e5 D& ?# jis/ A) E, Q3 I& Z5 H$ G3 L9 l. p" J& C: K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ K( ]; X) k; O
do
. m4 i1 J+ A/ l2 B7 `, _8 G7 ` Lan := rootfolder.Internal.Tools.AOLlanguage;/ p/ G" b9 c0 [9 G+ ?- R+ L
if current = @.Destination -- else return- \; i& F2 Q* h( r, B# ^3 E
then
5 t. h; v4 }) z% R @.Destination := void;
0 b$ P1 n! V- p) ^ if @.occupied then# X0 w, y9 m3 D$ a2 {8 g2 o
part := @.cont;6 V$ K% r+ e2 C3 P
@.transpOrder := void;
( C& ^" i) i3 ?7 M# \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% a6 y' p+ b) r9 Q) ]4 V9 o- M3 G @,root.eventcontroller.simTime);2 ]( Q+ \* d4 i
@.HasOrder := false;9 V: ?2 N; c+ S& X0 K$ j5 m3 x6 Y
@.DrivingHome := true;8 y# R+ N) T4 ~9 c- w( ?
rgManager.tryToStartTransOrder;$ c' L- P' C4 P) Q/ w+ O
if @.Destination = void( u: o% O. U) K5 _% N8 y# l
then -- no transport order for vehicle @1 I. b; y6 \2 k3 i
@.Destination :=
0 @& X% _3 F' P& b, D rgManager.nearestFreeStation(@,track.~);* ^ f# I; \6 o0 L) O2 R6 T* O
newDirection(@);
% u% L; C4 P; U if @.Destination /= void then
8 Q4 p9 q- Y6 M& i# c8 X @.Destination.NumReservation :=
' w3 F8 w' Q% n @.Destination.NumReservation + 1;! n* u4 y6 o" `, \; U) _
end;
. \' v! S2 B! S% r$ K4 s' }7 a( ~ @.CurrIcon := "drivingHome";
8 \# X) Z" Y. N- U& E3 l+ _ @.DrivingHome := true;/ ]% ?3 e! `1 n0 q1 H
end;
. u6 K' S6 P8 S3 V" X. l; l: I else -- the vehicle @ is empty, both vehicle and part are in the same dock station% Y& n& A- x4 |; ^
part := @.transpOrder;
+ F/ a$ o3 [1 w0 i5 W: e" V1 S1 M part.move(@);-- load part
2 p0 |6 j! H* W9 Q! M8 m* d& s @.CurrIcon := "load";
, m) @# a+ w& G- G, u! H- [ ~% Y+ [ GlobalDistObj := part.globDestination; ?; Y) l9 S" ~# y( t3 K7 P
assignLObj := rgmanager.rgAssignL;
: y: G; _+ B8 k2 ? row := assignLObj.getRowNo(GlobalDistObj);& D3 f% p k) f6 H
if Row = -1 then -- since 70
: @* a [' ]5 B) a( T if lan=1 then
7 G! P5 z9 @- i5 M+ q | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ D5 T+ _2 S. ^, R" }# ?0 V5 @ to_str("in der Andockstation: \"",?.~.name,"\""));
. R% X$ [! s0 i8 _0 F/ j( V else
: Z$ G4 |3 N, _2 V( p6 W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 X! }: G; M. b# \# E to_str("in docking station: \"",?.~.name,"\"")); 6 |7 W/ e/ e/ c3 m, L6 |
end;
8 ?) R$ Q/ c: y% E; @/ O: m else
' X) j) g) G# u' i1 N$ h9 p8 @$ z8 [ @.Destination := assignLObj[1,row];
# L$ _3 M, [& U+ \; o* B# b& ^$ a* z% g8 C end; 8 ] C! g% n* {7 ~7 S
newDirection(@);
9 a' Y3 f7 S- J4 @ @.HasOrder := true;6 \4 j+ `) _8 v9 S. O
end;0 Q2 M6 J' F/ j
end;* g$ Y" {. J8 y( m
end; -- of the method
, n' ?4 |0 a2 R! P) ]( w+ k) } |