/* called by: entrance ctrl of the object 'track' l5 p5 ^4 \6 H7 p
*/
7 Y# X0 O# b3 l5 T7 q5 T, Bis
2 \0 F1 O3 J2 h& a part, GlobalDistObj, assignLObj:object;row,Lan:integer;, R4 y# l( z0 O) R2 Q
do
- t1 m! i8 |7 a9 D, A# S# J Lan := rootfolder.Internal.Tools.AOLlanguage;, \* C6 e5 H% B. N- i6 D; y l7 g
if current = @.Destination -- else return
! G* r- ]; H4 [1 o; q then
$ o4 w7 Z# R: D" y @.Destination := void;3 G Y- A9 f. Q) e9 s
if @.occupied then
0 i8 ? z3 {; {/ K. ^& m. I part := @.cont;
+ {! b, v0 m# b" Q* } @.transpOrder := void; U" E# @ A2 u6 H' @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! F7 s* g& V. t @,root.eventcontroller.simTime);; P3 G0 l) M" Q6 A& F' w; d
@.HasOrder := false;2 W8 C# {! q# t* [& \2 g% |
@.DrivingHome := true;* [4 q* |% z: _
rgManager.tryToStartTransOrder;! c. D- x. b- Q$ `; W4 Z( z
if @.Destination = void
" Y9 ^( l& W8 i+ f then -- no transport order for vehicle @! r6 E' R4 S4 o8 A- t
@.Destination :=
* Z, N7 e+ i4 }+ [ rgManager.nearestFreeStation(@,track.~);
: w& g% H9 H/ Z. k2 ^: ]/ t- z; N newDirection(@);
7 x* B" r/ j5 i2 p- I3 P if @.Destination /= void then3 c1 x- p8 i: ^- r3 x# _- [ {, G
@.Destination.NumReservation :=
5 m" Z1 u7 U% l6 f: I @.Destination.NumReservation + 1;
& F$ c6 _2 b+ m* t end;' j2 U+ B/ g6 D& c* k" {) O
@.CurrIcon := "drivingHome";
a4 v% N4 ?: @; ` @.DrivingHome := true;
% f: z/ E) a: R# c# g. P4 ? end;
; ^0 @% O7 y2 T) X( X1 H0 j else -- the vehicle @ is empty, both vehicle and part are in the same dock station \% c) h- E# C" m$ n9 ~" i
part := @.transpOrder;
# A3 u" {; f, F5 e, C5 V% ^ part.move(@);-- load part8 R& l7 K3 l1 b6 O R
@.CurrIcon := "load";
9 e( z4 z, `; }2 S* U0 E GlobalDistObj := part.globDestination;% y: E) Z+ t7 D0 V0 W: o
assignLObj := rgmanager.rgAssignL;# R4 ]- Y: S z9 S+ x" p$ y9 O+ A
row := assignLObj.getRowNo(GlobalDistObj);
: f3 J8 h- K% Z- ^ if Row = -1 then -- since 70- U/ h7 Q, Z1 }" Y
if lan=1 then1 S* j; j, s0 f$ q) K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, g( T9 J8 M2 L" \1 ^1 [
to_str("in der Andockstation: \"",?.~.name,"\""));
4 N2 J) n1 |+ j8 Q( x else
! w ] O2 J( ]0 ?/ A: j& d2 V" B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ e# z* r4 f+ O8 u2 @ to_str("in docking station: \"",?.~.name,"\"")); 7 U7 Q. ~/ o u3 B8 L
end;
# N- R* C7 I' C9 c) i else- ~7 `; n9 V' S7 X6 Y1 F
@.Destination := assignLObj[1,row];
G( z8 I! J1 o' X! ^* p- E# F7 F; X end;
- i0 P0 a( q3 A- } newDirection(@);6 S+ B$ n9 v; K+ V" W3 a
@.HasOrder := true;$ l6 ^; L3 b8 K2 A ^
end;
5 l! ]. I8 ~# I. u; q$ x end;% f' V& l, ]4 Z. r4 u/ B W2 u
end; -- of the method9 `/ k2 r' u; s7 f! {
|