/* called by: entrance ctrl of the object 'track'
& i2 w6 A. F5 m+ D- m5 U0 ^" U' C$ ]- I*/
7 l" ?% L1 E0 Y3 J& H5 K* F# Ois/ K, |5 h' r K6 t/ H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 ]$ t) O0 r6 T, x! G
do
, E$ C5 b, a, P6 k% M Lan := rootfolder.Internal.Tools.AOLlanguage;
5 J2 ]3 x; p: x if current = @.Destination -- else return4 C* d |+ j3 n& ~
then D' i7 T3 X- Z) j. G& B" h' B
@.Destination := void;& Z9 R' v4 A7 O; ^7 ?7 x& [# } O
if @.occupied then
- C$ k/ V; E, T1 ^+ O part := @.cont;- } Z& J% s* g2 _* q
@.transpOrder := void;
# `' {: ~# \1 y- e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 @ _6 H& U) p# c) \% T2 i: I @,root.eventcontroller.simTime);- e0 b8 K: j( F1 N: e) q% v
@.HasOrder := false;+ a& i4 c) \' P/ [2 W/ R
@.DrivingHome := true;
; g: b( \/ w5 l* d rgManager.tryToStartTransOrder;
5 N' |7 V8 Z$ B( T' O2 V if @.Destination = void
; o0 s+ {) D4 _) a) \9 m then -- no transport order for vehicle @
! T& w; u& @" F+ p1 z @.Destination :=
, e( n6 `6 \. I2 k5 y rgManager.nearestFreeStation(@,track.~);; i2 f' Y* {% t* Q/ g
newDirection(@);
* N* `* \3 H0 D- E& I if @.Destination /= void then
k+ t7 G/ j2 d- {, N5 c6 C4 M( p @.Destination.NumReservation :=, m4 F, |8 Y+ @" b) ~
@.Destination.NumReservation + 1;
7 y* o6 U2 W7 F8 x end;
" v! Q) T8 Z3 `- |+ R$ i @.CurrIcon := "drivingHome";. h# n2 W! q* T
@.DrivingHome := true;
- A8 U! C5 u* n3 s4 V end;
2 l% ~ q7 W" P$ U else -- the vehicle @ is empty, both vehicle and part are in the same dock station% v! y8 T; o# { S: O4 c- K9 Z
part := @.transpOrder;
- q1 C [! C# [+ x part.move(@);-- load part
' f/ ]; w) d) A2 P5 T0 ~! m @.CurrIcon := "load";- ?- P: u4 g+ U4 l
GlobalDistObj := part.globDestination;
3 C3 G2 ?9 O/ Q9 Y# a assignLObj := rgmanager.rgAssignL;8 I1 J6 C3 k, o8 e" R; k$ W% Z
row := assignLObj.getRowNo(GlobalDistObj);
7 z0 f0 g. ~" ^3 t if Row = -1 then -- since 70# v0 s' j U4 b) C" ?. H# \. \
if lan=1 then/ Q0 }- a/ ~5 q, T$ P ]8 _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 ~5 B9 c. m7 U: l0 X I9 }& q
to_str("in der Andockstation: \"",?.~.name,"\""));! L2 B9 j J" T& Z( ?+ U k
else
0 k9 ~: n4 K' m' C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( r/ C: D' t3 s8 P. @
to_str("in docking station: \"",?.~.name,"\"")); : o3 ]. P/ g1 t* Q
end; q, C+ Y+ I& e0 f, E" A1 j( @
else
0 a+ P( @& j4 R' a2 ~0 n @.Destination := assignLObj[1,row];; [% S/ F2 d8 [ {
end;
& [$ U& H) A h( \ newDirection(@);
( V6 ?: O/ [! c- J/ q @.HasOrder := true;
^* ?( U U# v ^: A% m end;
: q# x* f' F, H% `! Y end;
3 S: V; b8 h4 o6 H) `( fend; -- of the method
l3 }$ ?. {# D% q |