/* called by: entrance ctrl of the object 'track' ? J _6 v% }" B; V' w- a9 b
*/
7 Y, L6 {2 y; k& [9 \% Eis. k3 j4 S8 o- D5 q% r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ r6 V9 `7 M, Y
do
0 u m( z, M: `% b Lan := rootfolder.Internal.Tools.AOLlanguage;
' V( i7 }3 ~/ u9 M0 x$ V) ^ if current = @.Destination -- else return
0 r# a) Q; X3 h" M9 J then
0 ~4 c0 G) @9 A1 p8 g5 g8 y3 y& |6 f @.Destination := void;
: J& P0 ]. p- S3 K6 @2 L. m- l if @.occupied then8 f; W6 U* N; M* g* ?
part := @.cont;4 r7 `$ H' b4 h1 s. H4 s
@.transpOrder := void;
9 F. ~/ ~' W3 r' @; N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 [. u. J' z' I
@,root.eventcontroller.simTime);6 M( k6 }# E+ x; h
@.HasOrder := false;" e( J; W$ s. s1 h0 U7 @
@.DrivingHome := true;- w' |/ r/ A) K! ?% V' \4 O! s
rgManager.tryToStartTransOrder;
. `6 y7 {8 n& e% N/ u( f; M if @.Destination = void
6 d( s. d1 [- x. y& R% Z# Q% i: n# w then -- no transport order for vehicle @1 F/ b! r- W, _
@.Destination :=
4 J* c6 T1 v# W6 z rgManager.nearestFreeStation(@,track.~);
3 p) Y( b7 T' |8 N, l! ` newDirection(@); , M6 P" R: |, }& [; |0 L; N
if @.Destination /= void then* O% M9 S! H" c. Z& `! u
@.Destination.NumReservation :=7 `# r- A! ~* I! C0 o& n
@.Destination.NumReservation + 1;3 q: H) G) ]5 A1 G
end;
' U: N9 G- I/ j$ g/ o; o @.CurrIcon := "drivingHome";
6 t# H/ Q" x& m3 M$ @( {& z" t8 g @.DrivingHome := true;. `, r; f M! K
end;* g" f/ q1 H. K7 }" }9 ]2 l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# J, e# D4 S* S4 m8 A: E4 ` part := @.transpOrder;/ G. f9 d. y" z* ~8 k
part.move(@);-- load part" l. j( i2 N" C+ c! ^% G. L
@.CurrIcon := "load";. \/ G; g9 U" G4 D, q! X$ s4 e
GlobalDistObj := part.globDestination;
4 c, A* C1 b2 t1 h assignLObj := rgmanager.rgAssignL;# M: Z" T, O# P' Y
row := assignLObj.getRowNo(GlobalDistObj);
; d$ h5 y' Z. E if Row = -1 then -- since 70/ y2 ~8 T$ }4 L+ c
if lan=1 then
# X; [! p% r% h3 y6 e& q6 ` o' K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' }) d/ z, A4 K! Z# N# } to_str("in der Andockstation: \"",?.~.name,"\""));( W* [' h) l# v
else
2 d# v1 {/ W: U4 H: B/ C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
t& f! V* @; P to_str("in docking station: \"",?.~.name,"\"")); $ O5 O7 ?9 {$ K- a- `% g u
end;9 p9 ?$ X- j9 b/ I
else7 j) s: z9 b2 G) r- O- z+ {
@.Destination := assignLObj[1,row];% e0 x( B( y2 F# {
end; 4 b C4 ]" w# R. x2 ?, y; G7 p
newDirection(@);+ ` h6 |' e% H) S
@.HasOrder := true;- c R$ E. ^4 z6 Y( h
end;
^( C1 ]; \( u) l1 J& w end;2 e; c4 U' D% w$ W0 v# e
end; -- of the method
1 h/ E0 g0 v9 \: i$ W+ [( y( M |