/* called by: entrance ctrl of the object 'track'
4 d+ N8 d' {) _ Y1 C$ n*/
3 _' P" b& o9 W; R% ris
6 X& w) P1 ^; v+ K; k part, GlobalDistObj, assignLObj:object;row,Lan:integer;* R& M" _( ~+ Y5 y4 O. c9 a& I& `! X
do; U5 h* J% n8 O S% C9 [
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 z4 }9 w, o% G* Z8 k' s. @2 _ if current = @.Destination -- else return
0 U& i$ c" ^- t" o6 k then5 R1 R4 X& i# @/ x3 G
@.Destination := void;, t- L' t, P8 b* b e
if @.occupied then
+ n- @4 E' g% ?( {; `! ~ part := @.cont;
8 R8 M$ b" A2 g6 i1 e @.transpOrder := void;6 o0 r" U. \/ }; J3 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 W) }% `8 `( z @,root.eventcontroller.simTime);
- |9 J( F2 A& U- h @.HasOrder := false;
4 q" A; l. O/ D9 A( Z# V& X @.DrivingHome := true;
# A' a! e) [6 I. a$ h/ P7 O rgManager.tryToStartTransOrder;
- P6 b) W1 o P! }6 U if @.Destination = void; Y* ~. L# M" h, s5 D' m/ \
then -- no transport order for vehicle @1 ^* E+ r9 M) Y% f
@.Destination :=
9 g# m2 z4 r" R3 \ rgManager.nearestFreeStation(@,track.~);
6 d4 \3 v5 X2 m# \& v5 w2 x newDirection(@);
) R+ i; C5 c7 o% V7 z6 T) t4 ~ if @.Destination /= void then" m% D1 X4 H, r" I- S. v$ Q5 P
@.Destination.NumReservation :=
0 F5 i0 b" ~4 \/ X1 f1 Y- y! x% ] @.Destination.NumReservation + 1;3 V6 [/ s+ S& J6 ]" u
end;
0 M9 b. Y9 H0 x! S9 a- p, n @.CurrIcon := "drivingHome";8 q6 g0 H( u( O
@.DrivingHome := true;
4 r% F) p3 Q" p; G0 @ end;( M, u/ m& C# c9 P" [- T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 j, D3 o8 c6 `8 b! G0 D
part := @.transpOrder;
; v [: Q b; x8 D8 W part.move(@);-- load part) R. X5 j4 u2 A- [4 ]7 p/ M
@.CurrIcon := "load";4 N! O% `! j P# P. j! a" a+ H1 v( B
GlobalDistObj := part.globDestination;
, }# \4 f) D. B* o" l2 I1 k9 S assignLObj := rgmanager.rgAssignL;
3 d! @* g& ]# v& ~( k row := assignLObj.getRowNo(GlobalDistObj);
* y% k: X' z, n: u7 L6 A if Row = -1 then -- since 70
) G; e) w- c, v if lan=1 then/ X; Y8 y1 B. ], q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 c* b! G m+ g {9 c! i7 f, t z to_str("in der Andockstation: \"",?.~.name,"\""));/ H6 q) C& Q) A/ H+ r, \ G
else
1 E; }/ }4 a' s) Q. t/ c: W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 w9 m; v; M( v2 _* L2 ] to_str("in docking station: \"",?.~.name,"\"")); ' j+ b; A* j' C8 ~
end;
) ^0 f4 e" A+ i/ P else
. R' v! N% U& V; A# j2 g, m' ^ @.Destination := assignLObj[1,row];
7 z, d0 N" }3 J! B7 v( ?0 h end;
- r) A; k9 i O% I5 J8 h1 y newDirection(@);
4 l$ }. E3 H3 ]- o @.HasOrder := true;, H4 r( l/ h" ?2 Q! v+ n* |, O
end;
. S# [% ?) g) \8 m! E3 v+ m- ~ end;
/ }4 W U+ E% h0 i7 dend; -- of the method" F3 P, U! O" b& C" C9 w
|