/* called by: entrance ctrl of the object 'track'# P1 _4 Y% v* j9 n- x5 Z0 l
*/
: e4 G& L( a' Y( Ais; o# r; _6 h# e; D3 c6 z& F& Z6 h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% |" v0 _1 {9 l/ u* qdo8 ?; B9 s$ `' _( e
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 n; b- D; _0 g0 C- r a8 I! R if current = @.Destination -- else return
. m( [. @4 \$ I! o* S3 b then3 ]% ~, c% b3 D* l6 r# O, _
@.Destination := void;! \! c3 @6 J! ~: r( g( K4 l0 D0 ]
if @.occupied then& z. n! b9 F, v/ w
part := @.cont;$ i0 o# D3 x8 ^4 [- {; T7 C; j7 w
@.transpOrder := void;- W/ A& y1 w# L3 d" w* o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! ?0 j* k6 e' S @,root.eventcontroller.simTime);
& n l) c( I; {) }" T @.HasOrder := false;' l( D$ P8 m: a+ G4 p, ~
@.DrivingHome := true;( n& |" d" a' g7 G! s% f1 G$ O
rgManager.tryToStartTransOrder;- l/ y8 k' l+ ?
if @.Destination = void" B( u6 L# ^) I
then -- no transport order for vehicle @$ F, t' e& B7 n, O# g1 j2 M: B
@.Destination :=+ p) F9 A6 h1 R9 F% u4 z
rgManager.nearestFreeStation(@,track.~);/ H5 J7 J, m. { f- p) O
newDirection(@);
* ], k0 e+ _2 I3 h( D/ m if @.Destination /= void then
: X, k4 R5 X' I8 H# ^ z0 C @.Destination.NumReservation :=4 E2 a# i5 a* t5 C
@.Destination.NumReservation + 1;& }$ K3 s4 N0 k: j, }: n9 Y" t
end;5 D8 N+ g0 D8 m2 {. H, ]5 C
@.CurrIcon := "drivingHome";0 z1 ~( K( F6 @( H
@.DrivingHome := true;+ E% C# L: [& [" w) C
end;
: U' X& z" ^, [/ t" k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
n! x) N" P' ?' b" a part := @.transpOrder;
2 d, P1 ~& [0 j6 ` part.move(@);-- load part
! j) g! V0 s. q9 i0 K- t @.CurrIcon := "load";* C& m% i; S' s7 o* Z
GlobalDistObj := part.globDestination;
/ ~6 {* c5 u0 ~$ G; \* @& i assignLObj := rgmanager.rgAssignL;+ x3 G7 u. e9 A1 R$ G. |+ |$ K
row := assignLObj.getRowNo(GlobalDistObj);
* R2 m' W" x/ _0 Z& z if Row = -1 then -- since 70$ V% M2 }7 u1 p5 Y1 x
if lan=1 then7 R7 U' U* _& W7 x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) V- G" p Q* h; ]6 D to_str("in der Andockstation: \"",?.~.name,"\""));
) y+ n7 r- M/ R4 W else
9 i% g% Q) S+ e( }$ [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ e* f1 ?- ?0 H0 f8 {
to_str("in docking station: \"",?.~.name,"\"")); - f6 }# N. y% T( T
end;+ L- f0 Y9 l, }' T; M
else
. l3 L' o8 Y* ^- T8 l) d @.Destination := assignLObj[1,row];+ Q5 l' g- J5 L
end;
% t( a e! S# U- Y newDirection(@);2 V3 @4 d/ w; O& B0 ]6 ~
@.HasOrder := true;7 \+ N# ~, T1 c" ?2 g
end;) _7 U, K) P) ~6 |
end;
* C1 H( C/ ~9 t- O8 f# Uend; -- of the method1 g# Q9 j1 w" a0 {& A$ W# s0 X3 c
|