/* called by: entrance ctrl of the object 'track') X: r/ ?% z" `9 x& k$ g/ w3 _
*/6 d* a% T% F. ~: L& s
is3 W* m! m0 U1 z, `) Q f7 M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 w4 S2 r4 S9 X
do
, `* Q. x [1 s, r$ Z, A. T Lan := rootfolder.Internal.Tools.AOLlanguage;
2 y. R! f+ l/ q& A; J. }% R if current = @.Destination -- else return( e: n8 A) S X8 g0 k! x) `
then
0 S7 k, E" y* g; Z" ]. } @.Destination := void;
3 e9 K C7 G+ u2 L. q4 n if @.occupied then
9 O/ q4 [: N/ n# Y3 [1 I3 t part := @.cont;0 f5 r( @4 r4 R2 f9 j' w9 }& [
@.transpOrder := void;
! ^5 q* c( I8 G. _7 d0 k. h4 n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& d A4 _" k6 a: Q# j7 Z
@,root.eventcontroller.simTime);7 K6 ?7 }; o( l# z, o
@.HasOrder := false;5 H4 k0 k9 }7 N0 }
@.DrivingHome := true;: e" F$ P4 k% T9 T# C
rgManager.tryToStartTransOrder;
# b. R. Q) w* m2 h5 @ if @.Destination = void Y( J! R1 }1 J, w# R! B
then -- no transport order for vehicle @
6 l. ?% m: w9 V x% y @.Destination :=6 p7 j* ?7 Q! {
rgManager.nearestFreeStation(@,track.~);
9 E' z5 h N' c2 L; W) y newDirection(@); - e1 Q4 t4 L- G
if @.Destination /= void then! y9 s( h1 f; K' v2 ?) F! N: [, I. L
@.Destination.NumReservation :=% \ k; V& s' P8 Y
@.Destination.NumReservation + 1;
8 s7 E, l+ Y; n7 o9 v end;! g: z o: u1 ?* V7 p
@.CurrIcon := "drivingHome";$ q! N: o: {/ {4 j& s. F8 v
@.DrivingHome := true;. X! v$ \: k* p* D
end;+ Z, {+ h! d& E4 f+ E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 i7 p0 \; D7 d5 F/ e$ T9 h! q part := @.transpOrder;
7 R: d+ n" A$ n/ _/ y part.move(@);-- load part- F7 {. u$ o/ ?
@.CurrIcon := "load";1 p3 `- [" }: ?$ k l
GlobalDistObj := part.globDestination;/ }& Y3 M8 ?- @7 n" F7 p4 g
assignLObj := rgmanager.rgAssignL;' @$ J8 T* U7 m+ c5 t5 @& M* R: q5 I
row := assignLObj.getRowNo(GlobalDistObj);& N: _. b% A, z: N- S
if Row = -1 then -- since 70% f" h$ ~" O, {0 y# Y! Y5 t0 E
if lan=1 then
" ]0 K, I! ?% s5 K6 h0 z. @ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, s- d9 Q; m: ?
to_str("in der Andockstation: \"",?.~.name,"\""));* j# |' e: {7 ~; R4 P( O
else
) Y0 n! `8 @( r }5 }4 O4 I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! O7 M: v* ~1 U3 c' V( L7 x
to_str("in docking station: \"",?.~.name,"\""));
* [3 a, D4 b) i) M0 Z$ ?, g1 N* e end;
! X& J: B5 }/ W$ \5 p, _" [) l else6 ?7 x7 @) ]% ~- G+ ^: `! G
@.Destination := assignLObj[1,row];+ y! Y5 \0 B4 N3 r( A. u# m: Y
end; " T4 |1 D. ~7 k' _8 E, R! k
newDirection(@);9 S p2 c! t, b8 f L& Z
@.HasOrder := true;
7 m- l0 _, \8 s: r* X* D& h& C$ C end;
$ i0 K2 z: ]7 _# B+ U end;
X3 I n. Q% J& y+ Aend; -- of the method
0 @# ^3 K3 |7 F( U9 L+ L [ |