/* called by: entrance ctrl of the object 'track'( z- n! a2 T8 Y/ ^) r
*/* U! U' M9 }4 G0 \. n
is5 B; [1 O5 V2 E7 x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ v% b' e( V' O2 v l0 ^, w, S
do, M9 s1 w- i. ]7 M! {8 f
Lan := rootfolder.Internal.Tools.AOLlanguage;8 S! F' J6 m; W4 R; I, q
if current = @.Destination -- else return0 K2 m4 E- v4 R* l A! P
then
. u9 m: M$ E7 S, Z* y" \( f; ] @.Destination := void;
/ o9 `" t4 {* `: i V& S' V if @.occupied then
# u3 \5 V* P: r; z part := @.cont;
# V; T6 P! }5 M5 @" | @.transpOrder := void;( z, }, q% | v- a( [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# q/ r- l7 t2 E- C }7 K' w" _3 M
@,root.eventcontroller.simTime);# Z) B0 F% D5 E3 \
@.HasOrder := false;: n! U+ J3 _4 e% V5 p! p# q6 s
@.DrivingHome := true;
P4 J0 O* i( u3 x rgManager.tryToStartTransOrder;$ c& X! M* \: d' J
if @.Destination = void3 q p* x& a/ J$ {
then -- no transport order for vehicle @
5 Y6 [8 r' @: N5 [ @.Destination :=
+ Y; p ^" {( L rgManager.nearestFreeStation(@,track.~);6 G0 z" o* [9 i
newDirection(@); 9 j; o1 M8 r3 O9 {: ~
if @.Destination /= void then: ~4 e* T7 A' W) I" M# @& K- S
@.Destination.NumReservation :=
5 A& x- b" V, |# m' U1 N$ G6 s @.Destination.NumReservation + 1;
4 W' `- e( ?- S. O' O' w! D0 {2 m% u end;
) @3 h# x, I9 b7 ?4 P @.CurrIcon := "drivingHome";$ b% I7 g+ F7 d8 b' J- f- `
@.DrivingHome := true;, q" S q; z3 i0 i9 F
end;
7 D' t% U" X0 t1 a8 X1 c' M4 [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station( \4 e+ q) g, C) B4 v0 Y
part := @.transpOrder;
3 Z$ E* ?. t8 e5 r: {9 Q7 ` part.move(@);-- load part
' a3 ]7 F' I: u8 I @.CurrIcon := "load";
; ^5 [" W* k3 | GlobalDistObj := part.globDestination;
8 {. |4 F, k( d( Z8 w6 S assignLObj := rgmanager.rgAssignL;2 Y1 O3 T5 x B: D* h% P! a
row := assignLObj.getRowNo(GlobalDistObj);
; I+ D f0 A# O! o T if Row = -1 then -- since 70
; S9 z2 B, V1 X! V0 f/ u if lan=1 then$ Y* [% p$ e. u% p A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* \# s' H! ^& z4 Y5 M to_str("in der Andockstation: \"",?.~.name,"\""));* @& R2 F( h+ h- R" }! ?$ [& B7 ?/ A
else
- {8 }8 {" ]1 k( Y' ]/ R6 X) _: } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% N1 C! g6 y: F- B/ _
to_str("in docking station: \"",?.~.name,"\"")); 8 e" F2 J( A" f, N. n
end;/ K1 \9 u) ]& E1 A2 j! i: Q0 c
else
- ^0 j% w( L) ~7 [9 E9 Y7 l3 x @.Destination := assignLObj[1,row];3 E( p% |) o+ j
end;
/ G2 e2 s' Z1 T) T( C ] newDirection(@);
% T c8 l; g4 I# y4 N& e! Q @.HasOrder := true;5 A- M$ A7 a$ s4 ^1 s
end;
6 p7 h' p7 g; D end;
8 f8 C& y- g9 L" h8 P& Xend; -- of the method; J w7 W$ `8 s3 x
|