/* called by: entrance ctrl of the object 'track'
- i5 w7 d+ Z( H1 m*/
8 i) X- |! {. L @( y) B, uis0 p% k% g, O/ Y$ A6 f2 H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, ~% p% p0 P6 n; g
do* w& x) s* z, H! h/ _9 F
Lan := rootfolder.Internal.Tools.AOLlanguage;) r/ W( u. `! v6 P
if current = @.Destination -- else return. z- v" i) `3 p& u0 m$ Z! B: {
then
7 G4 Z$ K* h0 t& W @.Destination := void;
1 x3 t( b# ?5 o" f if @.occupied then
0 O2 N! k! V' a6 c part := @.cont;
) B1 `. r6 j$ X; G @.transpOrder := void;
% R; r# O- s1 J. ~' _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) n/ t2 O0 I' g- j. A6 ^7 G @,root.eventcontroller.simTime);
+ @& s& Z8 S* R" t @.HasOrder := false;
( H! y7 I% g! b) X @.DrivingHome := true;
, X: c1 o- H: S, n& k r6 K% J: U rgManager.tryToStartTransOrder;' Y) t0 T$ C, u% w
if @.Destination = void. p8 r4 X. |& U8 T6 }
then -- no transport order for vehicle @- o2 j' a& J+ S+ @0 X0 i8 d9 M' N5 v
@.Destination :=1 p+ R5 a3 q# M8 U Z0 \
rgManager.nearestFreeStation(@,track.~);
7 ^6 u# m5 z. G/ N/ q newDirection(@); E) M& c3 X- {3 x" ?
if @.Destination /= void then
5 U( `4 E$ j' ]: Z @.Destination.NumReservation :=3 _' k$ O* e! z! X, @7 ]+ D7 |! g
@.Destination.NumReservation + 1;
2 } f M8 S0 R3 ~. M& x. ? end;
G2 R* \+ n9 r! } _( [ @.CurrIcon := "drivingHome";
4 t) N f( w6 x, X9 z+ w" ] @.DrivingHome := true;$ X3 S$ S6 _+ ]& N! f
end;
4 P: S0 ] w7 ~; g else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% l' t) ~: P0 p. n part := @.transpOrder;
1 Z( }7 T7 {; p# J3 E( {3 H part.move(@);-- load part
3 i. V) J1 E* h4 Y' K# N7 I @.CurrIcon := "load";
- D, k) B7 v& N$ C GlobalDistObj := part.globDestination;
' y0 m: J2 k. q9 B n7 { assignLObj := rgmanager.rgAssignL;" Z8 u( m% b n2 b( I
row := assignLObj.getRowNo(GlobalDistObj);6 o) e' m! V* M% w4 Y4 A4 ]" b
if Row = -1 then -- since 70* u- C# ~9 v# [" f
if lan=1 then
" R# }+ \7 p8 W F0 G6 Z: k: Q7 K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# r! S. O2 Y6 w# ]9 a5 F
to_str("in der Andockstation: \"",?.~.name,"\""));1 z. P3 l' }8 [ X# s3 l
else' d' \/ g! p# U: z; l# ~: J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 r$ X0 s! d0 g+ v
to_str("in docking station: \"",?.~.name,"\""));
) i4 _) i# k g; n) ]1 v end;7 E+ }2 ^' g/ G
else3 c# U1 E1 F% W( J- h5 x. h# I
@.Destination := assignLObj[1,row];
+ u0 J T0 A I \ end; & L4 a9 b. w* @# v, J3 N! I
newDirection(@);3 k. s" V9 L8 \% N' ` q
@.HasOrder := true;
# ~& E' v' @: w% r end;
- g& A/ |2 {3 n' D& D end;2 h4 y, _2 D( f9 k; j. y8 k
end; -- of the method
" T, j) n+ u) G |