/* called by: entrance ctrl of the object 'track'
" F: j- L( x p* P4 t*// Q! P& \8 q& {0 {' |. @
is: @" F4 N, T Q% i1 b3 {, O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, _) a M& u& K d+ hdo
6 W: N1 F1 j! B' \0 O. x Lan := rootfolder.Internal.Tools.AOLlanguage;
4 Y; s( ^2 h# s1 n0 k7 T. H if current = @.Destination -- else return
9 m1 O! x, J$ L then
0 z p* u) \$ V. x4 U( V @.Destination := void;8 O; n( }! H3 [! t1 n/ J3 l
if @.occupied then, k8 U, K3 \" {
part := @.cont;
/ i' D; X/ o9 w3 ~- K @.transpOrder := void;
5 i6 X. B( W1 E/ h* o: _, X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 n& }+ \ z" d# p; `9 Y @,root.eventcontroller.simTime);8 l8 g1 U) [; g
@.HasOrder := false;
0 e8 J* v' e. W @.DrivingHome := true;8 p, Z! Z9 P. d' f+ k
rgManager.tryToStartTransOrder;, n7 Y \% F/ e6 t" O
if @.Destination = void
, ~# S* j; J5 T8 i4 E: o6 C1 ^, b then -- no transport order for vehicle @0 r0 N" t) L% {* F q' z+ j, @
@.Destination :=$ ^% L7 W0 ~- Q [- j
rgManager.nearestFreeStation(@,track.~); C6 _, d2 S' c/ v; l
newDirection(@); ' J0 x' k) u# J- u+ X2 O, f
if @.Destination /= void then
1 u% q* c+ \4 @; s3 b% G2 z @.Destination.NumReservation :=- J( C6 q3 ~" F! J n
@.Destination.NumReservation + 1;
/ _2 n$ ^' L; m& R0 ` end;& L( G* {$ i" V" u p
@.CurrIcon := "drivingHome";+ g3 L* y m G0 S2 c# |/ @
@.DrivingHome := true;
4 L0 [! i, |0 h3 r% d end;7 B, Z2 Q6 T+ ~4 e$ a2 U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* O( c; y; n7 E: y: r5 E4 D part := @.transpOrder;
8 Q! L8 M) N/ { part.move(@);-- load part, O# h& i# E# }$ G, r3 @
@.CurrIcon := "load";
0 f0 `9 z: j8 r4 l/ { W5 @ GlobalDistObj := part.globDestination;
{$ X" [- \' T! x9 b assignLObj := rgmanager.rgAssignL;
, x+ m$ O, L/ e row := assignLObj.getRowNo(GlobalDistObj);9 i2 n, o g0 i- V) D7 p' ]8 G
if Row = -1 then -- since 70
H& X' e3 c# N8 r& ]8 _0 q if lan=1 then. i: E; n" {. q: x! ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) r9 A T [( i to_str("in der Andockstation: \"",?.~.name,"\""));
: R- ~1 W0 p; b& M: U else
% J& ^. _( y2 z2 s0 m- P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) p. h- s8 j; A+ \ to_str("in docking station: \"",?.~.name,"\""));
5 Q, h/ }8 J( R- z end;
! L7 b7 i: ?! Y$ U' I, t6 d1 q' v else
# D& y* ?7 ~+ B0 D; d; ?) {$ u @.Destination := assignLObj[1,row];8 e: Z( G: W& ~# X' y* g
end;
) N3 I/ j: c, d# E9 x newDirection(@);
! O& ^4 \ O' {4 H @.HasOrder := true;$ ]; [& W/ {- _( A" E/ Z5 t
end;5 `! m/ g. s9 p2 r! d& r
end;
/ ]! \* z+ \- w3 }9 c: k1 E6 Aend; -- of the method7 L. f6 z+ T4 q2 R
|