/* called by: entrance ctrl of the object 'track'
; v$ f! P7 Q8 t: d& b*/! ]" t+ u& I' o8 u6 I
is
4 O$ s( U3 E4 E ~$ R3 F) i" \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 h" f4 Q# r7 {9 K& `! zdo% {' ^) A& C# p8 y
Lan := rootfolder.Internal.Tools.AOLlanguage;- q7 f+ g0 V7 |) C+ H8 o! C4 L
if current = @.Destination -- else return
$ a. o y, d% u& T/ s8 n) } then$ z7 M7 t/ S+ ~5 B
@.Destination := void;
& V) x4 A) w5 C$ I if @.occupied then5 T: y8 N- G0 }. M9 ^; l( O
part := @.cont;
' R) Q$ u2 ^. U; t* @# ^* \ @.transpOrder := void;+ q& @- Z& P- K8 O. g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ |( A G6 E3 M X( r
@,root.eventcontroller.simTime);
7 ~2 ^- j( U: g8 E @.HasOrder := false;
$ X' k: L8 J; |* R7 F. U9 N8 `$ H @.DrivingHome := true;, Q: \! A' A9 m/ P* S( J' n2 ~- z
rgManager.tryToStartTransOrder;1 b6 a# t. S/ J/ z3 U {6 o" {
if @.Destination = void. _* O8 C) U; n1 A0 b
then -- no transport order for vehicle @
) s3 X' c) H: W( i @.Destination :=
# `$ a9 s1 ] q# [ rgManager.nearestFreeStation(@,track.~);3 Y( y# D, a* B9 h
newDirection(@); ; h- G: U8 ^4 L" Z
if @.Destination /= void then
4 W4 o' h- U. J" S3 U @.Destination.NumReservation :=
5 j9 M, O* l! o% [ @.Destination.NumReservation + 1;
6 O8 v2 ?+ G, m3 e end; x \' @& I$ ]9 h
@.CurrIcon := "drivingHome";
m% u0 i1 {5 o3 u# p7 D @.DrivingHome := true;
7 m! C' h: J ` end;
! Y& o/ Y7 Z, B! \+ K0 r) k: c else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% N% X& I, L. c S+ A( f part := @.transpOrder;4 \$ q5 Z7 [5 _. a1 _$ r
part.move(@);-- load part( r' v9 ~3 Z# [* C
@.CurrIcon := "load";+ H8 {7 P# x1 ]8 L% R7 a0 r# g
GlobalDistObj := part.globDestination;2 g, s! Z0 f: O
assignLObj := rgmanager.rgAssignL;
; o6 F/ R$ Y0 F) P( D# r7 Q row := assignLObj.getRowNo(GlobalDistObj);
6 b$ y0 y3 {0 Y+ `2 M' i if Row = -1 then -- since 70
( S: z7 V% ?* I+ \5 k if lan=1 then! x$ E$ Y$ Z. S F( Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# Q4 l+ N. V @$ A5 \# h2 I
to_str("in der Andockstation: \"",?.~.name,"\""));( `; |: B7 I9 G2 a1 c
else
4 p: f; i- L9 t B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 e) \: l6 g" v; i3 d to_str("in docking station: \"",?.~.name,"\"")); & L/ J* N! x% f7 ]3 V
end;% A2 m( b" s& s. i. H0 y+ ~) q( b
else* f! }/ X }/ e6 |( f
@.Destination := assignLObj[1,row];
7 L7 C7 U+ U2 g X/ F$ x end;
1 Q; S- F% }6 F( v newDirection(@);1 j2 W! |8 @# p5 n+ x
@.HasOrder := true;
% P! C0 ~) N$ o$ p9 ]3 K, d( u end;- I9 H0 b* m( d; M; W) s* W* d
end;
2 s- _8 N/ @+ O# ^0 {end; -- of the method
" k; t6 M: A# n: N2 |$ }5 l7 ~8 } |