/* called by: entrance ctrl of the object 'track'' Q5 i; y' k$ p5 m: P" x
*/' x; R( m( }1 I+ D
is
d2 p2 G, {# f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# U) L& \7 x5 \' ?. V0 Ido" O4 C/ V$ S$ B6 d
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 S4 @5 I8 ^2 R7 c4 D if current = @.Destination -- else return: `4 x' @, z' J1 R f
then5 {( r" @/ K: C' p
@.Destination := void;+ L7 w* W/ V' W- ]! S( Z U! m. V) \
if @.occupied then2 p$ N5 b8 T6 L' L$ ]
part := @.cont;: M1 P3 O; a0 D- O
@.transpOrder := void;7 h, ]" ?3 o! H" L! R% M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 p# X5 N2 [0 v Y# {. a
@,root.eventcontroller.simTime);
3 c8 y" a% f9 T0 j @.HasOrder := false;0 s0 X Q# V3 Z7 B, l% Q; R: P
@.DrivingHome := true;0 f9 u5 j+ q g ^ X) Y7 e
rgManager.tryToStartTransOrder;
; `: D4 m' a/ s( P) { if @.Destination = void- T7 ?' U6 j1 }# g6 f9 g8 j, G
then -- no transport order for vehicle @' R7 l0 P4 `5 V) B5 h, g0 n5 G
@.Destination :=& c a1 Y5 {8 X& B
rgManager.nearestFreeStation(@,track.~);
% T0 l3 L6 }" a- U2 G" D newDirection(@); ' H7 [4 L4 |' Q3 A( l# F
if @.Destination /= void then
$ n7 E7 Z+ l h3 O8 [$ e @.Destination.NumReservation :=
" J& l' h U j/ ?* b4 O @.Destination.NumReservation + 1;
& Y" ^& u/ P+ }; m a8 T end;
' H6 Y i; z# V. i& B: x @.CurrIcon := "drivingHome";. A4 M' e! d2 a8 U: \$ p
@.DrivingHome := true;- a9 u/ s6 ~9 T! S0 x
end;
- o, s. m$ B* w) } else -- the vehicle @ is empty, both vehicle and part are in the same dock station% Y* G3 p7 p2 { h" J) }0 J6 `
part := @.transpOrder;
& N+ B& k6 W& m: \+ g! a. L7 } part.move(@);-- load part
- k# p7 k6 `( |8 n5 C @.CurrIcon := "load";# c$ R- Y% R! x3 H7 N( f3 ]5 m9 y) f
GlobalDistObj := part.globDestination;
7 s7 q5 ]1 |' P+ c; a9 B' Q3 i2 C8 P assignLObj := rgmanager.rgAssignL;& O2 d( C0 i( Q, e9 j6 H, d
row := assignLObj.getRowNo(GlobalDistObj);+ S- K: V, T$ e7 R- F8 V {
if Row = -1 then -- since 701 V! v! T! y; Z! X/ E9 g0 n5 e
if lan=1 then. J1 ~$ E6 ^0 q" E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 f5 ~1 b( c" n3 Y to_str("in der Andockstation: \"",?.~.name,"\""));- u/ R5 F @* o( T I8 t2 t
else- x8 Y- g; l/ a0 U% D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 h/ |; H2 m( y8 `- l- ^
to_str("in docking station: \"",?.~.name,"\""));
$ U) W0 R: m" x, Q# _9 A' }6 a) l end;0 T" y; j+ Z) Z9 K9 X+ g
else, Z1 t. }3 U! u9 J& `$ z8 g
@.Destination := assignLObj[1,row];, b6 R& I \, M5 N0 f. T
end;
3 P7 I0 {- o1 j7 X5 H newDirection(@);+ ]4 r+ Q" `9 `' C
@.HasOrder := true;
9 |) F! Y5 a' |9 C3 D" n* d end;5 p! Q* ~6 p* H3 ^ }* X' t+ i
end;7 C4 g v: t# F
end; -- of the method! p1 _8 l% k* s
|