/* called by: entrance ctrl of the object 'track'0 U7 U! N! g' j6 M J
*/
$ @1 @, Y6 x5 ?is
5 S% w4 a4 }( n! R0 c# I part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ }. z% M. K, S1 I' G' i
do% e+ |: u4 W% o4 J
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 H0 b6 q1 A- I, ] if current = @.Destination -- else return
4 I1 ^6 y1 F$ K then9 _" r+ {7 H6 ?* M1 I, _
@.Destination := void;
# V1 {$ V- A. j, Q, [ if @.occupied then
2 a% e- H+ w. A; w+ _ part := @.cont; q; j* t8 _, s) c( W( j. |
@.transpOrder := void;, ~; {) ^4 f$ z6 ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; d/ T" p' F9 } M9 n2 ^# E @,root.eventcontroller.simTime);
& A- B' n$ F9 g" n+ l9 r @.HasOrder := false;6 m# O0 y# f* ]9 ^) i$ [
@.DrivingHome := true;
& q. Z8 ?0 k- @# o! V% ? rgManager.tryToStartTransOrder;* |0 `+ X G7 O' X0 u$ }% M0 Y* S
if @.Destination = void
* W' n$ N: f4 z+ C$ G$ L then -- no transport order for vehicle @
7 p4 y$ G3 R4 o0 E @.Destination :=3 L H4 }/ i1 k9 z% d
rgManager.nearestFreeStation(@,track.~); Q! p: B0 Q4 q
newDirection(@); ; ]/ _# h; ^' v1 \6 i
if @.Destination /= void then
/ _' C; _- _$ C( d @.Destination.NumReservation :=
/ X" ^9 w; ~0 [* `2 W4 Y& i @.Destination.NumReservation + 1;, c8 Q* h. E3 r* g
end;
: W! n( v# D& l2 ^/ | @.CurrIcon := "drivingHome";
( e! O1 t/ ~4 { M% `% N6 ~3 i @.DrivingHome := true;
% a& h8 l {9 A4 w end;
, x# B" R7 s4 p+ R; a else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 U2 s- c; X/ Y% V% T" M
part := @.transpOrder;
/ z, ^( N5 ~$ l! h4 @ part.move(@);-- load part
) Y I, J0 l/ r" P4 o5 w& T# p @.CurrIcon := "load";
' ` Q3 e9 g% s. W GlobalDistObj := part.globDestination;
, m& _1 A- {! c2 s# c- x5 q, N1 q assignLObj := rgmanager.rgAssignL;
3 S2 X; k# ~! e0 w' Z4 C row := assignLObj.getRowNo(GlobalDistObj);
( \7 I' g- H8 U2 l$ [ if Row = -1 then -- since 70! z% K: i& c7 r9 u
if lan=1 then( c2 K7 L% |; B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% i2 {$ H* f- a
to_str("in der Andockstation: \"",?.~.name,"\""));! d6 S/ _7 Y, X! ]$ y
else
. J u" L4 n( J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- ^' C) G: [0 N7 L* i6 I) W- ^
to_str("in docking station: \"",?.~.name,"\"")); 2 `% J$ ?4 Z' z; H, Z# n
end;
5 N, Z S+ d" l0 b" X# m0 o# l else* d" B5 A6 a: j0 i- a
@.Destination := assignLObj[1,row];
8 A! @# T3 ]9 o) Q4 H3 b; { end;
1 |( t$ \' A/ g& ~6 y3 m9 A P newDirection(@);
4 ]3 j+ H' p$ ]/ }" V1 `- n @.HasOrder := true; Y/ b7 C& H' w9 Z+ c5 r
end;
- M3 t% i# X7 F6 ~4 [ end;" W6 _9 y/ [) c4 m' e# n: x
end; -- of the method
7 r& c. W. |" B- c; B) T |