/* called by: entrance ctrl of the object 'track'' p- ?7 }9 W4 \5 r
*/4 }- C8 A# J M/ S
is
! P% ?# x) ]; n( ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ d/ g& b9 t5 J4 m7 I# udo
& s- X7 y' B8 A6 u# Q4 f2 c Lan := rootfolder.Internal.Tools.AOLlanguage;
. i9 J9 a& b. X& t7 R) n) h0 K" C if current = @.Destination -- else return
" K, ?+ y5 a; q, H4 y then
6 E& j3 _1 Q+ \ G5 a* f; { A o @.Destination := void;2 p' |) ~( l& s! _. p" h
if @.occupied then
/ z# D% G) ~% ` part := @.cont;4 X# v- H V3 H
@.transpOrder := void;
+ ]7 b3 {- Z2 _* i$ v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 a. I5 o2 K' |: z& d! m1 i @,root.eventcontroller.simTime);) x9 D4 d3 b) G
@.HasOrder := false;
4 t9 b# Y: U3 Z' `8 C+ u0 w: x @.DrivingHome := true;9 p2 e5 X5 r T- _5 K& {1 Q* ^
rgManager.tryToStartTransOrder;6 P6 V% B2 n) s! c: u J& |) C
if @.Destination = void7 n# A$ m! p E G' w. s) j
then -- no transport order for vehicle @# e J; K2 U& n0 ?( n. s
@.Destination :=, Y* S$ V! N! K+ b/ g6 Z
rgManager.nearestFreeStation(@,track.~);2 Z4 I( |. T5 ^$ [; v
newDirection(@); ! ~5 [' c. z; V' L) N1 f6 \1 l
if @.Destination /= void then" `, m: w" o$ d
@.Destination.NumReservation :=$ m$ U9 L( P4 ^; }" Z6 R& N8 m
@.Destination.NumReservation + 1;. C# e# E$ b" {2 L
end;# |4 n: o7 B* h6 X9 t" Q7 o% N
@.CurrIcon := "drivingHome";
8 D) ~( y) ]1 c# X @.DrivingHome := true;3 w9 Y% t. J' k4 ^- ]
end;5 C- V+ }/ ~7 F" F) k0 [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) W! i$ ` P& P7 ~+ \& @
part := @.transpOrder;
1 e) ^. r* E8 Q! q- E part.move(@);-- load part
$ H3 i$ Z, N# R @.CurrIcon := "load";7 G2 T$ w4 l1 J, s. y
GlobalDistObj := part.globDestination;" L& `; t' z1 d( a) `) T, k
assignLObj := rgmanager.rgAssignL;
; J+ l. [, W+ w0 D3 h row := assignLObj.getRowNo(GlobalDistObj);" w+ h. S8 ^8 Y5 S& G7 {, p; e
if Row = -1 then -- since 703 u* u6 |: x5 a8 _, I
if lan=1 then7 o" Y; p% q* m z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 P5 Z. e; d' N* [7 z
to_str("in der Andockstation: \"",?.~.name,"\""));
; v1 p% N9 g& m( y1 L: T8 k$ H else
# Y( a; _- J: k0 H% f7 e* ^4 G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( S, A/ ^$ i0 D to_str("in docking station: \"",?.~.name,"\""));
' q* Y L! a' n. g9 z$ W9 h end;
8 V- a3 v; K( m; x1 Q else
: _! a! g9 D2 k+ t4 M% H" q; B, _" i @.Destination := assignLObj[1,row];
' r$ d/ C5 S: W# s; ?4 g6 E% { end; 5 P. F" ]) P- n
newDirection(@);
& R" Z! \, u+ b3 M1 ]0 X @.HasOrder := true;, h6 v& |% y; V
end;% t; ~7 v9 w: U- c5 ?
end;- H# g7 L% K3 t5 v/ |
end; -- of the method
% Y/ U' V2 \. ~2 E: F3 J2 e% D |