/* called by: entrance ctrl of the object 'track'
/ S3 O, \6 D1 ]*/
( c8 @# }& `: }! Ois
9 x. f) H* Z3 j3 f) S; D0 S part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 j, a; Q4 d3 [( B
do
% q. |" y! ?8 m Lan := rootfolder.Internal.Tools.AOLlanguage;
" g, K) j& H: L7 D1 F/ M# R if current = @.Destination -- else return
. A9 W2 J& ^* \5 E0 u% P then7 G5 z* Z$ V/ V5 Y
@.Destination := void;
`$ U) z: V+ g, Y0 e6 ]& @* z T if @.occupied then
6 H7 j; Z8 u5 t* O% H8 F part := @.cont;; S/ }, ^5 J+ G" A4 g% p- O
@.transpOrder := void;
" R/ Y' `+ ^5 ?/ b E, _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 v3 }+ L6 L' W+ S% s
@,root.eventcontroller.simTime);5 b/ b/ q( u6 {: X
@.HasOrder := false;
* k3 ]8 n& c7 z$ {8 A9 V @.DrivingHome := true;! z/ j0 E: |' ~1 t- @& I
rgManager.tryToStartTransOrder;5 [% g" j) W9 c9 a1 S
if @.Destination = void
- t! { }- y6 w3 s4 ? then -- no transport order for vehicle @
$ y" S; j" R' E4 g* W1 e: D @.Destination :=
" W& ~( u' e1 Q5 R2 D8 \ rgManager.nearestFreeStation(@,track.~);, y* r F5 Y4 C4 L2 \
newDirection(@); " G" U+ I- n& b% ^3 Y" k! D
if @.Destination /= void then
% a0 C# Q1 }! O+ M5 _/ Q @.Destination.NumReservation :=$ Z( N' E ^) Y5 M& p6 a
@.Destination.NumReservation + 1;1 d, A4 M" }- w' ^5 b
end;& C; v9 K7 a; y4 k/ J, B
@.CurrIcon := "drivingHome";
' h: f' q! V# Y0 z% _$ q @.DrivingHome := true;/ {$ S; C! v; m0 ~
end;- ]: }# R+ u) p- U- m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! {6 ?0 R7 M! W: K6 S, P8 |! l. Q7 X
part := @.transpOrder;
) r, u" O; C. U+ b& N; D6 u L part.move(@);-- load part; e8 ^% V/ y' W; F: q8 [1 K
@.CurrIcon := "load";
0 T1 F n/ A+ L( K8 L, ^9 m$ I GlobalDistObj := part.globDestination;# v9 j! d8 K* l2 U
assignLObj := rgmanager.rgAssignL;
. M& H9 k- N3 P$ K. g7 U5 E( [ row := assignLObj.getRowNo(GlobalDistObj);# g) g7 ^/ g+ {7 Q: b: }
if Row = -1 then -- since 70
w8 }( ?) @6 F- n' I+ w: P if lan=1 then
# X9 r( Y( s" N5 H; }. b+ Q" L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& R4 s3 J' @2 b to_str("in der Andockstation: \"",?.~.name,"\""));% a5 L- t0 O: ]" Y# Y
else
) g3 A8 P4 ?0 K0 s" u& [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) R! \' j- r: u1 i
to_str("in docking station: \"",?.~.name,"\"")); ! T( ~( K3 `9 E. ]0 G
end;2 H7 `3 c$ C8 S" F( j' u A2 b
else$ X2 g. `: z* [- \2 ^8 k% \5 {
@.Destination := assignLObj[1,row];
$ u1 A+ f* p8 X0 R) z end; ' o( F- ]# g; H8 b9 `% Y/ |- L% Z" w
newDirection(@);
/ u. F8 B; l# N @.HasOrder := true;3 u5 v' K* d* R8 T) N1 Q
end;
* `$ w ^. r$ C3 N5 ^ end;5 c4 V; k' ?( T+ C8 k
end; -- of the method
. T% `! v1 h; B+ S |