/* called by: entrance ctrl of the object 'track'; z) H2 q0 i+ _8 e' f9 z/ n, v$ q/ K
*/. j+ P+ {- d, z4 @" n3 Q! y2 p3 q: a
is+ P( f1 a, W# w" @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# `) D- u( H- P4 m+ |do
' r" U `5 i' } Lan := rootfolder.Internal.Tools.AOLlanguage;. o0 C9 D# b4 V+ W* C+ _2 I4 e5 Y
if current = @.Destination -- else return
" r* x/ u2 c: G! @+ m. ~ then
; Z" M% O5 ]3 j" C! v$ ^+ v7 I @.Destination := void;
" ~1 X6 S$ _4 z if @.occupied then8 M/ e9 o# q& j0 y
part := @.cont;. ?) F- h9 J2 m: s
@.transpOrder := void;
( b+ l9 ^( e' r. w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, |7 D: W \+ ?% G0 Y- N @,root.eventcontroller.simTime);6 {8 b3 U1 t; c4 W# }$ t
@.HasOrder := false;5 x/ M" M9 K) ?9 L, G( s
@.DrivingHome := true;
; `, L g4 B% ^' V rgManager.tryToStartTransOrder;$ }9 J7 J8 v5 X8 z' l& {6 y
if @.Destination = void
5 J7 e+ Q! I t" p then -- no transport order for vehicle @2 x/ _ d8 {; e6 r# t# j" h8 F7 |
@.Destination :=
0 `1 D j% x6 e, t) f5 @2 ` rgManager.nearestFreeStation(@,track.~);
% D( s& h* S1 I5 U newDirection(@);
' z/ ~% ?, r& w( ~; } S! S if @.Destination /= void then5 @5 z# R& q% b! d
@.Destination.NumReservation :=
% o0 W" W3 s. U8 w0 j# k7 r @.Destination.NumReservation + 1;- D6 Q& A: f+ V. C7 b% E5 q+ O
end;; o6 ~" Q2 H( v% ~. t
@.CurrIcon := "drivingHome";$ K) _6 I; H0 D6 w+ x; Y+ J
@.DrivingHome := true;
7 X5 N! p$ X& r2 _& p end;9 \) l5 o4 m& E' y9 x9 w! G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 W' O; e4 x2 e2 v- x4 J- N/ ]3 { part := @.transpOrder;: H6 l2 d6 `5 i! j, D. v
part.move(@);-- load part3 j3 e8 O% w7 J' w, \3 \
@.CurrIcon := "load";
a8 `& p: [7 v* N7 E$ K9 Q; {2 C GlobalDistObj := part.globDestination;
1 c0 @2 a' h1 V6 Q/ w assignLObj := rgmanager.rgAssignL;
6 k7 s8 `. [/ J: o4 [) b& M! \9 W row := assignLObj.getRowNo(GlobalDistObj);" M' _/ A& i' M7 ]: n4 Z ~* g+ m% u
if Row = -1 then -- since 701 _7 F9 I8 l6 X5 s) F8 a& U/ U/ k
if lan=1 then
5 f$ i& U2 Z! m% ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' L2 Y+ {- s/ x
to_str("in der Andockstation: \"",?.~.name,"\""));
: l& \* M: {2 w) H% U! z* K else% ?# x2 e, T. N, G, `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; V7 Z' P# o6 r
to_str("in docking station: \"",?.~.name,"\"")); 5 e" l. I9 P: C
end;8 S1 |, ~! h3 w0 D
else
2 W1 P$ X# _8 |- j @.Destination := assignLObj[1,row];, O0 t8 d- ~5 O, M" S
end; 6 {& I1 y% G2 R: l, K. W R
newDirection(@);1 c# f2 w- B0 v$ O1 o1 _) H! K
@.HasOrder := true;* y( k8 \! V5 M: C# E# n% D9 ?2 ?3 [
end;" t, L; u. P4 ?5 l8 g1 {3 J* G, m
end;
$ Y6 u# X( J* \9 ]/ q0 xend; -- of the method
; E+ U% |6 a% M( _ |