/* called by: entrance ctrl of the object 'track'5 P7 J4 K4 H7 a3 P V5 \' f6 U. M7 B
*/
+ V7 P( Q1 f" \0 qis
l8 C( M9 q7 u0 [ ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 n$ {( b( N% A4 u, Y3 G* w& wdo
: a1 J0 E& ]1 l6 p0 ~ Lan := rootfolder.Internal.Tools.AOLlanguage;1 h# b! \- C9 y. N
if current = @.Destination -- else return
& h! w7 d& J% Q( t* c then) k+ Z( {& E2 T! N- l; h% l! |
@.Destination := void;
. T+ s+ ?3 o J, \% ^) x7 e) X, y2 W if @.occupied then
7 l6 P% Q6 o; V part := @.cont;2 @ y( N: L! f- V# u
@.transpOrder := void;
) I( ^ I5 g8 O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ L2 F% C# d) _* ~" c' {: y @,root.eventcontroller.simTime);
! ^' W4 Y, x( i5 | @.HasOrder := false;2 l$ s/ j) A1 O4 g( G! T
@.DrivingHome := true;
2 r+ D! y) {3 c9 U# f1 q" H- m rgManager.tryToStartTransOrder;
+ E. u# u [ \5 r if @.Destination = void
" G1 d+ L- J0 ~, J) u$ m then -- no transport order for vehicle @0 ~7 y; K* }4 W% \/ b% n) r
@.Destination :=
3 o/ l& L+ @& W+ G+ X8 j9 G% C rgManager.nearestFreeStation(@,track.~);8 x J- P2 s$ h: |, E
newDirection(@);
- E6 w s+ n u) q if @.Destination /= void then
) z$ F- z. R/ C& S5 A: r* I1 ^ @.Destination.NumReservation :=
( A8 G- o8 F4 p' Z% | @.Destination.NumReservation + 1;6 O1 U s7 x' I( b' u1 J
end;
/ J, Z- l5 l1 ]0 \; K @.CurrIcon := "drivingHome";
2 Z* U: {) J" f; u1 W @.DrivingHome := true;* e6 t+ @" F# v2 B4 ~
end;
- s' i$ w" T3 e8 J8 S else -- the vehicle @ is empty, both vehicle and part are in the same dock station" c' ^5 B3 ]. N" \( N
part := @.transpOrder;+ H K# t6 ^" h0 b( {; F& Y6 _, y
part.move(@);-- load part
: K7 s; ]2 J0 j4 o1 E2 J8 a I% u @.CurrIcon := "load";
% Q9 P: W+ n/ [. S0 M. x GlobalDistObj := part.globDestination;
- S, o+ ~/ Y5 V, R( j; x assignLObj := rgmanager.rgAssignL;" N6 U( B. o# Z x" y( ~5 Q
row := assignLObj.getRowNo(GlobalDistObj);. p9 C( ^9 c3 Z0 K2 t
if Row = -1 then -- since 70
0 ~; ?, ]% f0 G) c if lan=1 then
: p- Z( w2 W% V. O2 [& I9 n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 k' U ?" Z" z0 Y: v1 O! H& r8 m to_str("in der Andockstation: \"",?.~.name,"\""));
6 f7 f: f* y1 u. N. k6 ` else
3 i$ \: C2 r" c' W8 x/ h7 c3 M6 D4 Z f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) F7 w' w/ V- a. \2 M9 G: N to_str("in docking station: \"",?.~.name,"\""));
}: W( H1 H- A/ x. j! c, D/ a% ?% c" E end;
8 ^( i+ {) e3 k/ l" x else
2 U+ A9 T/ W% N& b @.Destination := assignLObj[1,row];" [" ~1 d, `$ X
end; 0 C# S5 |- g0 F- Q% R1 G# L! }8 V
newDirection(@);
9 f( Y4 X( m% X- f# y @.HasOrder := true;
1 O" ~8 V0 u' a+ L end;/ L. [1 n! [* a/ K H; F; |+ e: z/ D) V
end;+ d \' c! N+ I) ~2 y
end; -- of the method0 k% b9 t6 @) ~0 d
|