/* called by: entrance ctrl of the object 'track'
) n! J* {2 _3 h( e' |; M2 I% w( m*/* D! t" c* L/ u8 p3 A4 S
is
. w+ U$ S3 g4 h& ^6 V8 y e part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 k, h: r+ H6 _5 x m% Z! L' D
do" Z1 P9 v% X. `: }
Lan := rootfolder.Internal.Tools.AOLlanguage;% f/ m0 |, b- W8 Z/ [# m, `
if current = @.Destination -- else return/ g$ }+ o6 v8 I1 g7 h8 r# m" C- y
then
0 Z# \; d3 r, v6 Q9 q @.Destination := void;' z; y+ w8 A* _2 j
if @.occupied then2 E; ~, `" ?) r( S
part := @.cont;
% E S9 v( ]) k* h @.transpOrder := void; n9 I% `$ n- L0 \! q& A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( s& H# G5 y5 m. c! W @,root.eventcontroller.simTime);
* \3 O9 v, G. m$ J; T. [0 Z @.HasOrder := false;3 u P! m* H2 a/ U+ E. T
@.DrivingHome := true;, ^$ A; q- i1 C( `2 H
rgManager.tryToStartTransOrder;3 h% F* L& l; ~8 ^% \
if @.Destination = void# H$ P0 x( R% C5 o5 P f
then -- no transport order for vehicle @: P. u3 Y4 o' C: h% }: E
@.Destination :=
; D# Q, c" Y! J5 o. Z rgManager.nearestFreeStation(@,track.~); Q; ~6 e, k7 H( ^
newDirection(@); : V; n% Y& a4 c1 E
if @.Destination /= void then
* R9 y+ Y" N( d" I% x* M1 ? @.Destination.NumReservation :=3 i3 |. C5 u0 u6 @2 M$ U/ A, D
@.Destination.NumReservation + 1;
8 F6 V+ g; }$ w$ A end;# A2 ~9 H" D/ k! K0 d3 W3 R
@.CurrIcon := "drivingHome";
9 {6 e% A6 L' o# W7 `6 {& H- E$ Z @.DrivingHome := true;
, e! n, }& u- S, q* k2 O1 v( ^" ]9 u end;, _% M' |- q J h+ N; X/ {4 c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# u5 ?3 R1 A9 n* ?. Q o part := @.transpOrder;$ Q/ Z9 R; I) {3 o
part.move(@);-- load part, {7 }' N3 @0 r: H
@.CurrIcon := "load";
* x/ ~7 E& ?/ s+ X; a2 n! T( P* C GlobalDistObj := part.globDestination;
3 s( J8 u4 m( W8 `9 F! D assignLObj := rgmanager.rgAssignL;
( p* H% }; Q& K9 U/ I( e; N8 M! B row := assignLObj.getRowNo(GlobalDistObj);
* z) [% }7 W% }$ V if Row = -1 then -- since 705 P4 A+ K: O" ]9 f
if lan=1 then5 k7 P c) @( {/ N- g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ u; B& [2 I5 q% Z! i. p) z, P/ \; Z to_str("in der Andockstation: \"",?.~.name,"\""));
3 a( @0 l# P# d; p. X: W0 Z( z5 d else9 {& _( X4 I# c( H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# d" t! S7 B$ D6 I( A# T9 e' T% G& A
to_str("in docking station: \"",?.~.name,"\"")); & _1 L+ [1 P8 p* z* `) {8 J
end;& m% u% H$ G+ H& q
else9 X# [% \' a( M: c+ Z6 O
@.Destination := assignLObj[1,row];0 `: [! s8 F* N8 y. u* t! Q" ]: v
end; % o/ c% W5 w6 C5 v
newDirection(@);, l* b. z T5 R4 r6 y% S; y4 N; A
@.HasOrder := true;/ Y" L& P2 }% [* {. w) L9 [9 H
end;( F- `/ d, z- c
end;
7 c/ F f9 G5 y# b2 ^8 s |end; -- of the method
' M3 }& B1 t7 L |