/* called by: entrance ctrl of the object 'track'
2 |; K4 ~9 g; w3 Z) C*/. R% v+ l9 A+ R1 w
is
0 d& @* c r# _! f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' ]# R: a& [7 W3 q! Ido/ K; k0 A( t5 R7 v4 }, E, T7 v8 m
Lan := rootfolder.Internal.Tools.AOLlanguage;+ A. _; u( l+ J+ T/ e
if current = @.Destination -- else return
+ t& N2 C: W+ z, ~ then2 J; H7 A5 O( _
@.Destination := void;' r/ q0 t; p9 n3 S1 t3 ?2 z K! [
if @.occupied then
; t+ L0 n4 n' ?0 e2 y! @8 x part := @.cont;
8 m" W1 ]. y/ V! v( q8 f5 p @.transpOrder := void;2 j5 E1 C$ h, v2 w) g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 K: X. S) o" M3 B0 S6 u- _ @,root.eventcontroller.simTime);
4 I' q! t6 I$ P @.HasOrder := false;& ]; T7 ~6 L2 ?/ ]+ S9 f
@.DrivingHome := true;' |. E( \& O. B1 M, n% h/ B
rgManager.tryToStartTransOrder;8 X9 D# b- D: L3 f. {
if @.Destination = void' X# M$ i; U) t2 ~; `
then -- no transport order for vehicle @) b6 G6 q4 L7 F1 m- n6 a) K: @
@.Destination :=
1 r% J" E+ {& U9 f o rgManager.nearestFreeStation(@,track.~); v* I. y3 v) M2 o U* ` }
newDirection(@); . u. N& V) r+ E, j) w+ Z
if @.Destination /= void then
" u' H$ M, l1 j* O2 p7 T( I @.Destination.NumReservation :=/ d" Z) c! e$ z0 @& x+ Y
@.Destination.NumReservation + 1;. _7 g* Q# ~) x2 D! L" f. C
end;
. V0 y; w9 }% }0 B' ^* r @.CurrIcon := "drivingHome";0 A) U5 S/ o8 f; ~6 N! ?( j
@.DrivingHome := true;6 k0 A. U8 d( A
end;
+ Y8 b' `* o+ U y" C9 J: { else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ l) Y, H; z" Y
part := @.transpOrder;
3 t5 j' L/ Y% F0 H part.move(@);-- load part
. |! a1 ]8 h: v' i3 k+ m @.CurrIcon := "load";
% P' E& ?9 z3 u2 F GlobalDistObj := part.globDestination;
8 U: @. i3 ?: y assignLObj := rgmanager.rgAssignL;9 [. ?' q( {$ {3 ?, {
row := assignLObj.getRowNo(GlobalDistObj);( w2 D/ M% R1 A
if Row = -1 then -- since 70
' K: b, W% k! U2 r8 K) v if lan=1 then& Y- ^& x# Q9 f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 @) D" d0 q7 J. i) _) J. _) Q
to_str("in der Andockstation: \"",?.~.name,"\""));
}& L3 b& w+ R: M( ], h, K else5 }. d0 k* f& o: }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
g4 G% E! V* j) T& e0 i to_str("in docking station: \"",?.~.name,"\""));
. f w( O" r' I, @& U2 B end;
+ s% n8 a: ?8 o else. e1 P/ g0 @( ]3 u; ?, y+ t
@.Destination := assignLObj[1,row];% l1 v8 D, F( _7 ^6 z, o* M% c
end;
% J* u+ J' d1 a- A. | newDirection(@);
. t7 ^1 M" Z) | @.HasOrder := true;0 ~! x% P4 d5 f
end;/ U4 d# a" T, [; h; b n; T+ O+ Q
end;# d. d% Z- B4 m0 X& F# \# c
end; -- of the method
# M( a' |) ]: T6 k* T2 ~ |