/* called by: entrance ctrl of the object 'track'
9 O) ]& p( g! H) K. i0 B3 j*/. k( \8 u" @6 F& O. t2 ^
is
5 i7 s' [: g& M1 j2 V% e2 G part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) K. V' s0 t* X6 \2 n# p8 ado) s$ ?. M5 X+ ^! g6 [( T* Y. s. Q6 F
Lan := rootfolder.Internal.Tools.AOLlanguage;
* H; y0 J% V5 U# M7 w if current = @.Destination -- else return4 H- h! H# b- N8 g
then
4 M* @7 G4 V+ z" x1 { @.Destination := void;& B/ f3 i, d+ h* ^5 [
if @.occupied then% I1 Q8 p1 _- t, w
part := @.cont;
. G0 A& r e2 x8 h) Q @.transpOrder := void;! F8 N; K- C& W" d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% D, N0 R+ I& ]# \3 M0 V1 V @,root.eventcontroller.simTime);
" I: X i( T# l @.HasOrder := false;3 X, d; n* M5 V w/ @* I+ T# A
@.DrivingHome := true;
5 ]/ l9 B, f( j7 U+ P ~) V rgManager.tryToStartTransOrder;* M$ j, n" }& ]% {
if @.Destination = void
* j; e( H3 Q% E5 F6 v- D then -- no transport order for vehicle @
; v9 C3 @6 T G/ z7 V+ h @.Destination :=
% O5 c- E8 x6 |9 T/ r' ~ rgManager.nearestFreeStation(@,track.~);
# X |& ?7 M3 }$ X, F newDirection(@);
. ^% g+ P! y7 F2 ]/ C( ~ if @.Destination /= void then2 v, Y& ~4 _3 x+ a
@.Destination.NumReservation :=
/ ]. ~+ I& C l P' }( X6 J @.Destination.NumReservation + 1;! i- I: i; A2 U2 R ], V; t
end;
- b/ s/ n, ` W( e, s2 ?: f; X0 a3 a5 r @.CurrIcon := "drivingHome";" c, v; m5 t, d6 I$ P r+ Z0 O
@.DrivingHome := true;
' p {2 B+ L3 y5 }" ^6 s! Y, v end;& a5 T" z4 V. w0 C M0 q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ }: W# `' G, [$ w6 P9 B8 d part := @.transpOrder;
+ Y7 g' i: e7 n# h* ~5 K part.move(@);-- load part
& j6 U3 x4 i5 ]5 W' h; F @.CurrIcon := "load";
9 a5 g* ]! P8 b, _ GlobalDistObj := part.globDestination;1 c2 ~. ^ W( C6 O8 W+ \, }" c. q
assignLObj := rgmanager.rgAssignL;
6 @" m7 X; @* i. ^3 D8 Q0 x row := assignLObj.getRowNo(GlobalDistObj);
) H9 P: a3 c* V if Row = -1 then -- since 70
' i) m& }3 r% X T+ r if lan=1 then K4 \" X6 C k9 g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," V. E0 L6 [7 W. ^$ U, q. @* C: g6 E
to_str("in der Andockstation: \"",?.~.name,"\""));) b/ P: h8 u; w* [) M
else+ A/ @# M, F/ ?0 y2 }( k, ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) T2 E, ], ^/ O$ _# ~, W
to_str("in docking station: \"",?.~.name,"\""));
% b6 x% m# [% Z6 l1 C/ }3 i2 o2 S end;( n+ Y! t: A: ?, s f
else9 r; U& i2 @% t3 i
@.Destination := assignLObj[1,row];
' \$ B6 [" i6 j" N" @! F$ b( d, S end; ; W' x. t/ P) `: ~8 N, ?: h5 i
newDirection(@);+ q8 m9 G; Q% ]9 P
@.HasOrder := true;" t8 ]" @9 O* U) P( E& P% r
end;
& |( y4 y- c% E3 ]7 \* i2 U end;
: Z2 ]3 j0 ~. E8 S' M3 Iend; -- of the method; k4 |: D" I' h' ?7 Q# P/ w4 n
|