/* called by: entrance ctrl of the object 'track'
7 x; l0 E- F; E4 o# [*/
P- w2 q/ _6 Z& O# wis
' [- s+ g- r* r5 u part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ L) [1 W! ^6 F+ H3 E& k, G- h
do
, P2 H U6 F* E, X2 r8 u Lan := rootfolder.Internal.Tools.AOLlanguage;4 T: c5 y; {& z
if current = @.Destination -- else return
) m+ r$ c: u5 |: I& M then
# e4 F* i: ~8 N6 V4 } @.Destination := void;# g1 x7 J2 o9 b+ k/ n6 Z' o
if @.occupied then
0 }+ B% P( b" ^( K0 @1 W' t W part := @.cont;
4 i/ d$ C. S+ J' a1 N! J% z2 W( l @.transpOrder := void;9 W8 m4 E4 }) e, D0 s
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; i' k% R4 D/ K* @2 i: @# j @,root.eventcontroller.simTime);( N) r/ j3 w: ]
@.HasOrder := false;, v: S ^1 c/ K, J
@.DrivingHome := true;
X8 s1 k3 j9 t rgManager.tryToStartTransOrder;
d3 _5 |% U7 P# F; Z* H if @.Destination = void4 L) P; O" P O7 E, s' _( u
then -- no transport order for vehicle @
& s7 \" r1 _; z5 f; H$ X3 Z( R- ~ @.Destination :=
. G) [8 ?7 G9 N/ b rgManager.nearestFreeStation(@,track.~);
; \5 R' c9 _1 i4 i' a2 t newDirection(@); ! B, A3 V @1 j1 F
if @.Destination /= void then- A/ B# v: @$ \+ o! \" g! l( j
@.Destination.NumReservation :=
" }" V# p5 d2 Q+ }& A6 d. h, T @.Destination.NumReservation + 1;. K5 A; S6 s8 K+ S7 Z
end;
- W) ?7 r7 t. p* b @.CurrIcon := "drivingHome";- ~" Y- T* H m3 U, p
@.DrivingHome := true;
! }* L0 ~1 ]. [& a: y2 X( x end;! x4 O3 v7 ~3 E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 U$ H& F+ I0 P2 Y& {. Y& C part := @.transpOrder;
$ ]% H# L w* \" K part.move(@);-- load part
4 ]; s, w: w+ Z) n( i* y @.CurrIcon := "load";
0 Q7 Y; R. u1 j+ L( T1 v' L GlobalDistObj := part.globDestination;& N% y Z9 z: w
assignLObj := rgmanager.rgAssignL;% o! b5 m) N# D- k3 ~9 I8 Q6 p
row := assignLObj.getRowNo(GlobalDistObj);0 F( T' g0 Q+ N8 ]
if Row = -1 then -- since 705 _4 z$ H; Y+ [) H }- f
if lan=1 then
6 r* \5 s; F' e2 i' w! k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( Z1 {6 x$ O7 e4 H! @ to_str("in der Andockstation: \"",?.~.name,"\""));8 \: m+ \7 j1 N/ u
else
2 {3 r A& Z7 {7 l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# d5 K3 N( o) n) T/ G to_str("in docking station: \"",?.~.name,"\"")); b8 s& u* O# P. t
end;
; F7 ?' \* {5 }4 V0 R. k else" Z+ c: l% k( |" j2 x' H* l
@.Destination := assignLObj[1,row];
( v9 _# ], c8 p5 R end; 6 q+ D) ~9 g$ i: b! c* W+ C
newDirection(@);* H4 E' [$ V: f7 A
@.HasOrder := true;: i# ?/ ]/ Q6 l" u% @. Z: p, T! b7 ]
end;
, s) N/ e1 W# o5 p1 D end;. U9 @4 w+ ^: W: S
end; -- of the method
) X( I" S8 g4 l+ o& E d |