/* called by: entrance ctrl of the object 'track'
" H5 y# c% |% [*/7 b3 J; Q' D9 A7 |& Y
is
0 Y$ ]& v$ T# S6 v3 q$ B1 V part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% a: b" Z" R$ a l' Zdo
3 b' r. ~! J$ }, O" o. p$ Z: y7 A Lan := rootfolder.Internal.Tools.AOLlanguage;
4 q# t, p+ {& S+ Z( _1 [9 K/ o if current = @.Destination -- else return
' C7 D* w* d0 N, T0 k4 n then F8 `% p, J( N4 t
@.Destination := void;, K7 \ i0 |. t
if @.occupied then
( l* K+ N( Y, ~5 C. M part := @.cont;$ Z( ]2 x) E8 f
@.transpOrder := void;# L; [% Z/ M0 Y" r- D6 q9 \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; [ N% W! M( I! M
@,root.eventcontroller.simTime);
4 w# H% S& C" m, `" [# | @.HasOrder := false;
! p H7 Y- ^6 i0 r @.DrivingHome := true;
* J* K+ \5 l) k. d" ?7 s2 U; n rgManager.tryToStartTransOrder;
3 u8 l. f9 {$ V+ A( S3 V' k% l# e$ @ if @.Destination = void' T4 ^+ b( N; v# f1 y0 u9 P
then -- no transport order for vehicle @
) D2 i. r4 H4 J7 |: {; ?2 n7 l/ N- _ @.Destination :=1 G2 h9 u/ s. } x' ?
rgManager.nearestFreeStation(@,track.~);
5 U# K$ {# \) i newDirection(@);
9 g2 y$ O% W0 `+ w7 u4 F U) Y. @ if @.Destination /= void then7 y I9 ?7 R1 A7 f
@.Destination.NumReservation :=
4 ]# b8 Q- C) o @.Destination.NumReservation + 1;: U! g) H) r, v) u1 \' `
end;
/ a' E8 v4 a9 c @.CurrIcon := "drivingHome";
- _1 }$ A: d+ t2 G7 a. n @.DrivingHome := true;: J- Y! c; g3 Z. k$ J( f9 Y
end;) ]0 Z: h- }8 x) T n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) u! G2 `+ R8 O6 d) o9 n: ^
part := @.transpOrder;
* h9 @" w( d5 D- k* R3 v* h part.move(@);-- load part
' n" b' w- G6 ~* H% j1 h @.CurrIcon := "load";
1 U8 |( a' q9 Y8 e: A7 J* K4 z% ?4 t( } GlobalDistObj := part.globDestination;9 s5 j/ _; C! P+ {
assignLObj := rgmanager.rgAssignL;
3 _6 E5 p5 }3 w& s' L4 u row := assignLObj.getRowNo(GlobalDistObj);
! P2 h6 D( W, n9 g0 [ if Row = -1 then -- since 70+ B/ k% O3 X% y, W
if lan=1 then
1 u! i( c0 c8 P/ g- `% K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 E$ U+ n0 z* Q# ]5 o to_str("in der Andockstation: \"",?.~.name,"\""));5 J5 U/ o. n6 P8 l6 r
else
) ~" E6 x g% ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( w" k' t/ e* v* g to_str("in docking station: \"",?.~.name,"\"")); % v; s8 z1 f% r! x! C
end;
! G) N% o- C) g1 H5 W3 W else
- `: S# D' S+ w! {" \7 U/ @3 z @.Destination := assignLObj[1,row];
C" t- U7 F7 i) F+ m3 s end;
( x, o5 W& U! Z; ? newDirection(@);5 u; {9 X) O, j/ n& C* s }4 ?
@.HasOrder := true;) T% ~9 O# e" H+ o' F
end;: ^) M: ]( f$ q+ z- u+ n
end;
& M- w9 }9 {) |: C& jend; -- of the method5 g! d: |% w0 M0 P0 k4 ^0 Y
|