/* called by: entrance ctrl of the object 'track'2 L p/ w" q5 H0 }7 n5 W
*/) S, B3 }& l; R l' |7 z1 l
is
4 M. f! I3 ^$ u4 T6 \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;( f, W) }) e6 \' y( q
do& v& C: a; r0 S
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 _; w& l1 v, R if current = @.Destination -- else return: x( S) k+ Q' C3 a
then% I& l. c" ?) i
@.Destination := void;8 b+ Y3 v0 g' u- i5 S6 Z, k
if @.occupied then
9 {: e: J9 e6 P) m9 e part := @.cont;
! t# d( d8 L, A7 O @.transpOrder := void;/ W1 A4 [# T' M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ W- S$ Y6 ]+ @2 `# c6 F1 H @,root.eventcontroller.simTime);: D1 F; k, m! k$ M; I% k
@.HasOrder := false;! d6 u# |) v. G x3 \/ r
@.DrivingHome := true;! ?9 w$ c! u: }- x! v: B/ D! S" i
rgManager.tryToStartTransOrder;
0 R3 h* d" ~1 ~0 d/ w" B- V if @.Destination = void# ]. b" |) o% ~+ J4 J6 F& ~
then -- no transport order for vehicle @5 _( C. R& S" ~! q' o$ w5 J9 r
@.Destination :=0 T3 J j7 N( B8 e+ a
rgManager.nearestFreeStation(@,track.~);' K' P0 f N/ G1 L/ j9 j6 B
newDirection(@);
0 b4 O! r7 I$ ~1 ] if @.Destination /= void then; w4 b+ d. t* ^- t; P7 i
@.Destination.NumReservation :=- S( l6 R' ~/ x5 ?4 a$ P- w1 p
@.Destination.NumReservation + 1;: l3 N g6 O9 x' k
end;
! a$ B0 H7 H$ {. v4 l @.CurrIcon := "drivingHome";) n& l0 d e2 Z
@.DrivingHome := true;
# D; e8 @* ]6 [ m0 O% j0 p end;" S, T1 S8 N, |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) [3 k+ L4 E1 K5 d' F part := @.transpOrder;& l, {. e: I) M
part.move(@);-- load part
% B! L2 ?* C* r% I. ~ @.CurrIcon := "load";+ c, g! D2 ^, w7 X, Z( H
GlobalDistObj := part.globDestination;9 j0 m P# u* E/ E/ c
assignLObj := rgmanager.rgAssignL;+ ]+ Z H& s+ X5 d( G3 d) h. L
row := assignLObj.getRowNo(GlobalDistObj);
2 y( B6 a0 ?7 h) y- v0 t0 Z if Row = -1 then -- since 70
( {9 D8 _7 |7 t0 z) R' m/ W if lan=1 then; L e1 ^& ]3 t* i& h) ]2 B/ |5 z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, K& n5 \( [- t/ L; H to_str("in der Andockstation: \"",?.~.name,"\""));; T+ `* ^% V& {5 |* {. }
else
0 ~3 s9 g' @' ^1 D% P! X2 c7 D/ y* W; h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 ?7 Y% J p' z/ y4 q: H to_str("in docking station: \"",?.~.name,"\""));
* ~9 E- d7 X6 x end;( r0 G( `$ c0 w$ m! ?
else
6 S) H0 ]( k, {: ~* R/ P+ ] W @.Destination := assignLObj[1,row];$ C+ f+ Y+ I6 n# T2 j9 D& h: ~
end; . y/ Q1 g; ?3 b
newDirection(@);& M7 E1 v. u! \6 z' I6 ^9 d4 |
@.HasOrder := true;( w. m, w; ~, h) v- y0 ~
end;
$ N/ E; R# Q1 V2 `' q0 T8 O end;! P1 ]* d( V k9 w9 q7 G+ X8 S
end; -- of the method
1 W9 y9 k- r) e# o |