/* called by: entrance ctrl of the object 'track'
9 ?& u. [3 y R i*/
! x% |( U3 y3 w% j$ s2 C8 Vis
: k9 l: j. t6 O part, GlobalDistObj, assignLObj:object;row,Lan:integer; k7 q5 r0 W: y. [7 |; {
do
j) t( x% k$ S Lan := rootfolder.Internal.Tools.AOLlanguage;/ f1 H5 N$ }* y1 j/ x7 X) L1 l
if current = @.Destination -- else return
! n. o" N9 f1 m* P# P3 Q then
' ^+ X4 o# R# N @.Destination := void;% K5 B V }/ T1 K) ]- T+ O
if @.occupied then. N7 ?% X4 Z% U9 c+ T$ w
part := @.cont;! O+ b& u$ O$ Z0 H! q( N
@.transpOrder := void;- r1 A& b% S7 h$ v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 z' F9 X4 j. F, Q2 w
@,root.eventcontroller.simTime);
6 V5 l; Y$ P+ K$ X @.HasOrder := false;4 H* Q. [- X3 F- f
@.DrivingHome := true;
, z6 s% v/ d) a2 U, K rgManager.tryToStartTransOrder;& N7 {4 H# U! c, u3 A5 s [
if @.Destination = void3 Y- B# V" l6 F+ k
then -- no transport order for vehicle @; Y% x! H I; G# V# A7 y
@.Destination :=
3 o7 ^$ B9 f: c' ` q rgManager.nearestFreeStation(@,track.~);( s: j W* N; U1 \& X* L, ]
newDirection(@);
# v S: j+ d9 j7 Y7 N if @.Destination /= void then
( {) z1 |1 C$ N( p1 r @.Destination.NumReservation := H& g v5 C2 i
@.Destination.NumReservation + 1;6 J! v$ l5 Z6 v6 F$ i- m- @
end;+ x0 ^+ ?3 d" v
@.CurrIcon := "drivingHome";' W* _- k! V$ v6 t# w
@.DrivingHome := true;
; S. w( Y* g9 C8 y. i: M end;
0 E! D" l1 o7 m7 N; y else -- the vehicle @ is empty, both vehicle and part are in the same dock station- L o5 D( s( C3 L4 [
part := @.transpOrder;
c8 X v0 f) o; {& Q8 s) w, J" e part.move(@);-- load part
4 B8 `( y# K- r- ]- I) o @.CurrIcon := "load";
5 D4 r5 }$ w& T* V3 D2 s GlobalDistObj := part.globDestination;
" Y0 a. ]' E: F; M7 v; R* V7 G6 k6 C assignLObj := rgmanager.rgAssignL;' J+ ~5 |2 v& X9 a) R* P
row := assignLObj.getRowNo(GlobalDistObj);: }- W: i4 m$ b+ a& ] d
if Row = -1 then -- since 705 Q5 V& r$ e$ H1 \3 j8 V& d
if lan=1 then
+ P9 Y. P9 y! d7 A, f5 M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ i9 [# D; ]- L) g2 Y
to_str("in der Andockstation: \"",?.~.name,"\""));6 i# [/ _+ p7 ^! l* d
else
+ f* A0 F9 b, F) }1 R9 _/ s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), | \# o* Z5 {; |! |
to_str("in docking station: \"",?.~.name,"\""));
( P5 B @/ g/ L6 I) u* u end;" Z _" J: h; x, C; F+ B
else. G3 Y4 Z4 c: X5 `( C
@.Destination := assignLObj[1,row];& E+ \. p9 h5 \; P
end; , m" L6 z7 ^! a P
newDirection(@);
& h, R9 c. b* ?) b7 K6 n1 s3 A @.HasOrder := true;4 k; ?' [+ \+ h( d+ k
end;$ J' Y0 K9 B8 P/ E; d6 o* V8 G& p
end;( q. w- R/ d/ A, D: d
end; -- of the method( [4 @ S" H/ N7 B2 b: A" r
|