/* called by: entrance ctrl of the object 'track'
# H# }% k- `+ D5 _*/
" ]( q. c1 N7 B# qis: k& A: |: Y6 w8 N X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) Z% U7 e* h. T. V
do
* T7 A7 W5 q0 z' Y9 K+ ^: `3 ?, C Lan := rootfolder.Internal.Tools.AOLlanguage;
2 B. o! T- h) `. s: U0 g if current = @.Destination -- else return# R( W/ R. a. ^6 x9 W* Q
then# V- D% `8 _ k
@.Destination := void;# T! N6 e' r8 R/ E$ j
if @.occupied then
. i5 D7 X6 ~& x part := @.cont;
/ ^5 \' u2 G- E0 e, E @.transpOrder := void;
9 C9 J: ] b2 s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* n6 A, t. g9 N# q+ P- I: a' ]# ^
@,root.eventcontroller.simTime);, j2 L- I/ L) |. i5 Y4 S9 |" M6 }
@.HasOrder := false;
' X Q3 d D1 |; V" P; {7 W& J( h @.DrivingHome := true;$ r- i1 X! h5 Z! Y" g3 r
rgManager.tryToStartTransOrder;
3 W9 v: M+ u: {! y6 s, G2 o0 C if @.Destination = void
& w8 _8 ^7 F6 E8 u, E# n then -- no transport order for vehicle @
1 |6 y! c* x' e; r a0 z% y& J @.Destination :=7 D- _0 v u/ |8 L! W) i& B
rgManager.nearestFreeStation(@,track.~);. h! M; E9 s9 A3 a+ Q1 C( d ^
newDirection(@); 7 p: A: I2 h$ ^8 ^4 I
if @.Destination /= void then( W0 s. J3 Y/ p9 y- n
@.Destination.NumReservation :=! Y$ O* T0 q2 y
@.Destination.NumReservation + 1;" t' _3 K" L) p- u% I0 s
end;4 k: w }6 U; A( g" Q) D
@.CurrIcon := "drivingHome";
7 @0 A. D$ T' b J @.DrivingHome := true;; }7 c! l/ L( P( y+ e0 T2 i- N1 N
end;' ?: w5 x4 L- c3 t+ R0 m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ t3 G0 f; i- C part := @.transpOrder;' Y! z H3 t1 o# \% X
part.move(@);-- load part
0 Q0 F" ?$ E2 B" g @.CurrIcon := "load";
/ u# T+ x; k# j; G GlobalDistObj := part.globDestination;+ f' i+ F$ v+ d6 p
assignLObj := rgmanager.rgAssignL;4 b; [' U5 l T' d, o* W
row := assignLObj.getRowNo(GlobalDistObj);3 C! X+ R, d$ o' \5 ~: @ R
if Row = -1 then -- since 70
; f* K0 m0 H0 \. {/ c i3 G if lan=1 then% k" X; H* J0 P, S- t: u( e6 j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 |) M/ o+ A9 G/ ^ s
to_str("in der Andockstation: \"",?.~.name,"\""));' w( `4 O- T& X/ \
else9 G; r i- k& t$ T6 U( H& K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. o8 X' b' Q' q" H' v to_str("in docking station: \"",?.~.name,"\"")); * ~, ]9 M9 Q3 ]
end;+ a/ g0 A# L# m- O+ K
else. b4 f1 v8 j e' E* H) b- d+ v8 E
@.Destination := assignLObj[1,row];- E B# o9 X' I8 J* B. @
end; : X) y" x* W# z5 D X& n( x! W
newDirection(@);
# D; ]& S0 D& C- V @.HasOrder := true;( j2 ~, ^8 N o% T1 P4 D( t& ~
end;
# d' i; ^5 V: D& {: G end;3 ^; b, s; [, k4 c
end; -- of the method
1 {2 P3 K7 i. u |