/* called by: entrance ctrl of the object 'track'
+ s3 i& {% i) w; V1 ]6 S1 w*/
, ~8 d% y3 g0 Nis4 i3 i+ C7 g* v2 x4 f8 n# J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 D9 W9 R. Q9 k# h) O `5 N. q6 e7 |
do" Z, a- R2 q* r" L
Lan := rootfolder.Internal.Tools.AOLlanguage;# v2 h: s2 b; X5 Z2 P
if current = @.Destination -- else return
* j0 K/ g3 i/ X% u6 m) r then
$ T) G2 ]- s! G" _" v. Y6 | @.Destination := void;6 I8 w0 S* x- H( G8 E% n$ h
if @.occupied then
1 \0 O4 H1 {6 \* g) [6 z part := @.cont;7 a* U, f& K/ @+ \$ G* J
@.transpOrder := void;( {( f+ ^/ `' j5 Z9 }% S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 Z+ f0 P( Y8 v
@,root.eventcontroller.simTime);: V+ ?5 @/ C3 c& Z& _& @& Y
@.HasOrder := false;
1 v: ~! `, i& Q/ i% I9 @1 k @.DrivingHome := true;9 }3 \9 Q# V1 I4 n2 C% T# }5 M D
rgManager.tryToStartTransOrder;
& N1 [% \, x8 O if @.Destination = void
1 \/ D6 V) X- F# o1 S then -- no transport order for vehicle @
" D+ A' B3 [& J2 ~ @.Destination :=
+ x) L9 P3 S$ N1 K$ q1 J rgManager.nearestFreeStation(@,track.~);
/ F4 q ~( h2 z5 z/ r newDirection(@); * N p8 o t+ n; d: ~; w, f# C
if @.Destination /= void then8 {. l1 u! w) m e5 J5 S
@.Destination.NumReservation :=
% |# E6 q0 E" u) L. b @.Destination.NumReservation + 1;
2 N/ W) ~2 u! c! f: r( X end;
Z- _3 m. s- T. Z0 }! j8 z+ t* @ @.CurrIcon := "drivingHome";
& l+ \# W& h! R' ^" Y q @.DrivingHome := true;
7 V* i- h% A" i1 ^# s! _$ J end;: X, s7 R* h( I8 P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ a$ v( z5 S) x! s1 _# } part := @.transpOrder;
" i* c _" G/ B9 T8 P part.move(@);-- load part
4 N0 p: ^( a% M5 |7 @# B6 B1 N. | @.CurrIcon := "load";4 J; `& ~/ H. ~
GlobalDistObj := part.globDestination;
. L2 v: s, I) s0 a& D assignLObj := rgmanager.rgAssignL;5 i9 u' ?5 n4 S3 j
row := assignLObj.getRowNo(GlobalDistObj);+ o m8 k6 W* I4 B/ c+ `
if Row = -1 then -- since 70
! `8 w$ [ {# v; `& ^6 y if lan=1 then& ]1 ?( q1 L r1 G9 X4 G( y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, P S9 W2 @5 {) e to_str("in der Andockstation: \"",?.~.name,"\""));! G0 ~* ?. T' b8 ?+ B
else
6 N d% ^; d/ r" G% k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: H' |0 C+ P. R1 ^1 N" P to_str("in docking station: \"",?.~.name,"\""));
2 M* X _% S$ A/ K W end;
# _0 C5 h$ L, y% p: P+ h else
! p5 {8 f9 J0 X) @ @.Destination := assignLObj[1,row]; c9 [3 k- Q( I1 ~ i/ ~* O1 M; t
end; 2 R* X) \) v2 ]8 {; l
newDirection(@);
) V }0 n8 w9 _ @.HasOrder := true;8 Q8 e1 p$ M& X/ y) l- M$ R
end;" E( Y& i. j; p7 v0 N. J2 G3 ?
end;
+ f+ ]6 E% t- \end; -- of the method3 h4 Y, j1 ]2 K
|