/* called by: entrance ctrl of the object 'track'5 }. L L9 E9 a# {8 H, ^2 m
*/$ U! v) l+ U% h
is
/ j, y7 T/ T4 e. ?, P, Y4 m9 P part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 M! u, ] ~' sdo7 O6 j" i0 x9 D0 ]
Lan := rootfolder.Internal.Tools.AOLlanguage;
. O- w. Y; g& X2 W2 J if current = @.Destination -- else return
$ T. Z1 S$ i6 L5 } then
' n& T& X1 j6 Q7 i8 h; M7 b3 q2 S9 g @.Destination := void;
- g* P6 ^7 Z; x& O( F0 @6 F if @.occupied then3 q Z4 ]( M( a& T8 d7 b
part := @.cont;4 ~; z% p$ ?- I; f) F, G
@.transpOrder := void;* E8 _5 f$ B) u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& A& q4 J! ]9 \' ]/ U @,root.eventcontroller.simTime);
& T- B, I! ]- A0 X$ Q, V" D2 J @.HasOrder := false;
; O! [" ]5 N! u9 I& l2 o; O5 H @.DrivingHome := true;
3 _5 ?+ v' O: Q! {/ F rgManager.tryToStartTransOrder;
( [& j( J9 }* Z3 x9 I if @.Destination = void
W4 A5 |+ U* h) u% j1 ~ then -- no transport order for vehicle @
) W2 {5 a6 K0 D @.Destination :=
2 t7 {2 W+ b) }! F& h# N rgManager.nearestFreeStation(@,track.~);
! v: h D8 \, F1 K- m$ `8 C6 [ newDirection(@);
8 N. L6 f4 I" s if @.Destination /= void then
0 P* S1 |/ T9 N3 ]6 Y4 W, `$ l% e @.Destination.NumReservation :=
& D. r! I$ h: R& ?; C7 | @.Destination.NumReservation + 1;( J5 e+ {; M) c
end;
& Q( M2 r" m9 L2 A! A: e1 [8 V' U @.CurrIcon := "drivingHome";) f2 E$ W, U5 Y9 f
@.DrivingHome := true;3 X# q/ G0 \7 |2 D; L4 `" a+ q! }
end;% I$ U: J& z: o5 k! i6 L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 O# V' ?/ S# L7 G2 m9 v. { D1 { part := @.transpOrder;
. ]6 S* N- K1 i( i4 m9 {$ \ part.move(@);-- load part. k# E# m; T2 m& I
@.CurrIcon := "load";
5 T. W+ Q% K% v* V; n GlobalDistObj := part.globDestination;
6 L1 e! i! [5 y4 w, m# t5 f) n assignLObj := rgmanager.rgAssignL;( l) W& [4 j8 f" b
row := assignLObj.getRowNo(GlobalDistObj);" r4 E2 t: n6 K: W' @
if Row = -1 then -- since 70
7 [% N/ j) O1 g- p. i# I if lan=1 then
7 b4 J9 a1 a9 J% H/ D% e& e) A* W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: y0 r' L9 Z( o, D7 _ to_str("in der Andockstation: \"",?.~.name,"\""));
+ ~4 k( O, O+ I# P7 j$ ` else! b$ C. V0 _* Y l d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) E' Q( ~. K8 b# E! U to_str("in docking station: \"",?.~.name,"\"")); ; O* R3 G' s* k
end;
3 L" H3 J- u6 O4 n& ~$ Y' R8 W else
8 d+ ~$ e; ?+ a9 ~; }0 F/ n9 O @.Destination := assignLObj[1,row];
0 U" q9 T3 M8 V, v end;
# P! N, C( r0 t% X0 f q newDirection(@);
7 C$ b, b% U3 L @.HasOrder := true;
5 x a$ Q- r5 Z# f* ^% U( Y end;
5 C ^+ k9 c6 [- K: C end;7 w& M( p+ ~, l+ c' P
end; -- of the method$ j* }- r5 w+ }) c D4 W
|