/* called by: entrance ctrl of the object 'track'% @: X5 H$ ?" ~: v4 {6 T# U6 J; U) K
*/
9 C/ v- Y; B+ j [& T' q q) Mis
8 K) f. S4 V c( B0 M. F part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; V$ [1 O4 V8 A6 h: Hdo. Q% k- a& n; i9 H
Lan := rootfolder.Internal.Tools.AOLlanguage;" G; s9 M& N5 b6 ^5 ]. G
if current = @.Destination -- else return. S% @1 P- g) T$ P1 U3 P0 _. G
then8 _2 L& b' e0 k1 N
@.Destination := void;& ~5 ~% i5 X# q9 {8 H: `
if @.occupied then
; f7 Z; c: P; S3 w! M6 X9 @. m part := @.cont;+ R3 O$ k l6 F0 `" l
@.transpOrder := void;# @( \: U* I7 L- o9 a0 J9 P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. m+ d& f8 j( M8 I @,root.eventcontroller.simTime);2 L' p8 S j Y
@.HasOrder := false;
5 H- `5 D. e, R7 J( f* e8 v4 d @.DrivingHome := true;) Y7 \! ~% f4 E5 h
rgManager.tryToStartTransOrder;
+ b- I7 T" a6 D, C if @.Destination = void
* f7 P2 T D1 H: x3 v then -- no transport order for vehicle @
! t* A" d$ Q( v4 p$ c9 B& v( m @.Destination :=1 B5 ` N2 X/ F0 g: H, d
rgManager.nearestFreeStation(@,track.~);5 y8 X* k* |2 S# d
newDirection(@);
+ ^4 a; P0 S" [% ? if @.Destination /= void then, X0 u% C+ Q$ z; D
@.Destination.NumReservation :=) X. J/ s' j; s0 P9 n
@.Destination.NumReservation + 1;, u$ M2 g$ [. a5 C2 g
end;
% A) B& A0 L. K2 M6 H4 k0 b @.CurrIcon := "drivingHome";" R! R# n9 Q8 Y0 x
@.DrivingHome := true;- S) R& e: L3 u
end;0 Q; y' U8 @% Q: d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) c% F+ j+ \5 k, p7 ~ part := @.transpOrder;
6 H$ i( Y K% `! P' d8 d- } part.move(@);-- load part6 J' }0 f" \; F6 ~9 {5 Y
@.CurrIcon := "load";
3 ?, A8 _. z0 ^7 C/ r8 ^ GlobalDistObj := part.globDestination;
$ Q8 h% f2 A0 ?4 r% k7 \0 W$ T- r assignLObj := rgmanager.rgAssignL;& B4 u6 v/ b1 ~) I! |5 y
row := assignLObj.getRowNo(GlobalDistObj);
2 `7 }/ U, p6 b( `' H) B if Row = -1 then -- since 70
' v+ k( @' g: x4 X* o- W if lan=1 then4 W0 ?* P }( w* A7 Z2 x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 M# d% \4 c; G+ a/ S6 k& B0 g to_str("in der Andockstation: \"",?.~.name,"\""));
B; H3 y$ U& a" y else/ W# |- y, d' z1 U- n; o
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), x( P3 h4 V! |- k
to_str("in docking station: \"",?.~.name,"\"")); ) m2 `0 o- X& ]; O6 }* b/ {. K! V
end;
U! o7 o. E' {7 }" c; v7 B& T else
7 ^; u; B2 L. _ @.Destination := assignLObj[1,row];8 `3 Z/ }9 b$ w+ ]
end; 8 j+ m9 m+ F* j% g
newDirection(@);) n& e9 Q( b" b- ?- N' I& X. M1 v6 q
@.HasOrder := true;
j5 y" m, ?- Z$ A) t9 T end;/ j* b. ?5 u: A# ]. ]5 ~! t
end;
^& k/ {. \1 l' M4 _end; -- of the method
8 I( {+ q9 W4 H2 U4 v' W |