/* called by: entrance ctrl of the object 'track'
( ?/ P: b, S o! `*/
8 L: R$ {: O2 y6 ~) nis
/ Y! K* ?5 f7 E& C# Y6 M# }, Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;* e5 Q8 o0 V8 S" l8 ]
do( H4 i1 t! G; s
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 a: Z2 K2 B! ~' l' E# Z if current = @.Destination -- else return& @& J1 D# b7 Q; k' q( P" T
then
, F9 }# x. I, z' b @.Destination := void;' Q/ \" ^1 H" v- c g
if @.occupied then- A# m6 b/ m3 d
part := @.cont;$ A1 X9 k' T) H+ n+ b; U% T
@.transpOrder := void;
' X {; _/ F7 M3 k. m' y% k6 [1 d2 f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! ~0 h$ Q2 M& {8 A, L @,root.eventcontroller.simTime);
( T( W! W$ \. o u" t @.HasOrder := false;
. K7 J( g& [, u; _ ]! o, O @.DrivingHome := true;
! f9 w/ T$ E; M! b2 ^ rgManager.tryToStartTransOrder;4 P8 u! j% L" E0 C3 H+ C
if @.Destination = void1 }- e, ]9 D M+ T3 ~
then -- no transport order for vehicle @2 n/ s4 i& i/ N1 F6 s% X
@.Destination := r* D/ M1 S( X$ T
rgManager.nearestFreeStation(@,track.~);
1 \& r5 R3 i. s% ]/ w5 U3 c newDirection(@);
7 R& o, m: p8 D. L; d if @.Destination /= void then
: O2 ~6 I) M$ T, f* |' B" S0 P @.Destination.NumReservation :=! K, T' v8 D3 |0 a, e
@.Destination.NumReservation + 1;3 m6 @1 b2 x: y# V, c( ^2 }
end;/ U# p* D6 z6 I$ v
@.CurrIcon := "drivingHome";% o/ W) H* Y# Z! S8 @
@.DrivingHome := true;
& s. u9 P8 ~$ @6 A$ C end;
) ?5 w$ S# m+ g+ } else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& }7 Q# @/ ]* e+ Z. t part := @.transpOrder;4 ?7 n4 ?1 k; i$ A4 L2 c
part.move(@);-- load part7 r, W6 u7 _ a/ L1 I
@.CurrIcon := "load";
& N! D [5 A9 H2 d1 M GlobalDistObj := part.globDestination;5 y. [0 ]$ x. I. E- ^6 x8 w% L' O
assignLObj := rgmanager.rgAssignL;: V' t9 @9 U7 S# u
row := assignLObj.getRowNo(GlobalDistObj);
3 L! z: u) O8 A( c: Q if Row = -1 then -- since 70' u) G0 l( ]- ]3 Z) Z2 e1 R
if lan=1 then
( W; {& e- P) j O1 w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: O8 I! }, k. J8 n5 |
to_str("in der Andockstation: \"",?.~.name,"\""));
/ U. p" z. V4 ]; M# J else
$ s/ t6 d7 ?) V& h. O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 z7 Y3 g0 n7 o+ v6 U7 G; D to_str("in docking station: \"",?.~.name,"\""));
, J: S9 Z% H8 y9 n. E4 h% p. b end;& p- A( L- W% K/ Y3 K- t! c3 U6 X7 G
else
, x! j' W% C' \) a% ? @.Destination := assignLObj[1,row];' r% R. R& j5 y; c
end;
P6 c- H+ E6 I& H6 W newDirection(@);/ M* h6 X6 H- E9 H( o2 I* d: ?5 y
@.HasOrder := true;5 d8 M6 \, |! \* j4 J: f
end;- k# O- z& e4 e/ W& ]9 g [) T
end;2 v2 j f" u. J6 ]0 f5 m
end; -- of the method
5 _' E/ g, `. n# J0 e |