/* called by: entrance ctrl of the object 'track'
" E' [ g. l" D*/
& r. P- ]5 o7 S- L$ F+ }* iis
. x8 t v4 m: u$ {2 T part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 O, n3 E. T+ x+ v& |5 X) {6 sdo& L4 g5 N6 @/ K1 G+ W% x! m$ n
Lan := rootfolder.Internal.Tools.AOLlanguage;4 Q- [. }4 c/ X, G& d) A
if current = @.Destination -- else return, E) y; P) h; h" [4 n# ?2 \& \
then
# v7 y/ C# w8 ]! W: R' W @.Destination := void;
0 ?. D$ ~" Y; d. S- Y if @.occupied then
w m J4 C+ a( c part := @.cont;
& u0 }% C% w" f @.transpOrder := void;1 Z0 ?; l+ J0 G6 n# u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: W+ N$ m7 e' |+ c6 j v+ P* [4 V @,root.eventcontroller.simTime);# D6 @0 T u3 T! d l5 }
@.HasOrder := false;: W7 k* [+ t' B0 V J+ R
@.DrivingHome := true;
9 {+ k6 W4 x D rgManager.tryToStartTransOrder;
1 }8 _# z6 C2 [! E3 y+ A4 m if @.Destination = void$ O- W3 E; k; b+ X" B. Q# _
then -- no transport order for vehicle @
6 \' P- ?5 d6 E% P5 \ @.Destination :=
* ^6 ?3 b9 Z$ \2 E rgManager.nearestFreeStation(@,track.~);* `! E l' U2 Q$ _3 \
newDirection(@);
, j. s( x: F" I0 ^" J if @.Destination /= void then
) O9 l' {) S6 R3 `. \! F+ F% C4 q: c @.Destination.NumReservation :=9 X; e( t" o' s' \( X( Q; v9 X
@.Destination.NumReservation + 1;
+ ?; [, `7 K; O1 x# w end;
7 C2 W$ S- O4 x/ j! _% Z @.CurrIcon := "drivingHome"; |. \; ?2 O: M
@.DrivingHome := true;$ b1 N) b+ N7 Z% A
end;
+ N% z9 U2 _ ?" R% R else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 v6 Q8 Y& o( c/ A
part := @.transpOrder;: B; F1 ~/ A7 ^0 ] O$ W0 R' d
part.move(@);-- load part
2 b5 D- O+ S8 m$ `1 ~) V @.CurrIcon := "load";
" K& j- T, I* [ GlobalDistObj := part.globDestination;
6 _: F' w% W4 V1 U$ `# N1 @ assignLObj := rgmanager.rgAssignL;' X2 Q) Y/ R' V. _2 D
row := assignLObj.getRowNo(GlobalDistObj);
% h. i8 ~9 F1 S/ z8 O if Row = -1 then -- since 70
9 D1 v# ^- D# d0 b0 j. E1 G/ D! s if lan=1 then
" T. K4 x1 {/ @& ^6 n: q3 y" z f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" z! o$ l4 ~! {( `4 N* I! A/ B& t to_str("in der Andockstation: \"",?.~.name,"\""));
3 P: I# g' j: z3 m' J& R, k else- I6 i# F! r- H6 H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' a+ Z6 ^% a3 k. A- V to_str("in docking station: \"",?.~.name,"\""));
0 M- \# {" ?3 x# Q, I3 u0 c end;. G9 [( L v: f; l
else) H3 L; V1 i* t- R9 }
@.Destination := assignLObj[1,row];# b9 T# i' x" e" u
end;
3 m9 J' q5 N8 u ^: H4 {+ l newDirection(@);
8 p/ r3 T! p$ i4 D9 X$ x @.HasOrder := true;
4 T- y0 E; _; ~, u end;! \; J# y2 x. m, r7 Z! |8 \
end;: e1 b" [. B, N) b; i; e1 v4 i
end; -- of the method
! n6 V# V# i P, P: H |