/* called by: entrance ctrl of the object 'track'
( N: w& J# X: O*/; ~1 b# Z, k9 ~" C1 h; t
is0 F% B0 a C' X' Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 z5 D; b. j/ S4 t( ~ }do
( O' `+ ]8 o1 j' F% q" F# _9 b Lan := rootfolder.Internal.Tools.AOLlanguage;
& w8 p6 N; R( C) ]# N1 E0 T2 S if current = @.Destination -- else return
6 \9 F. ]( ~2 X0 ?' M# ]& A then9 Z& R: K8 [" ]# n, H
@.Destination := void;$ z1 w3 _! a: j( |% Q+ S3 }
if @.occupied then
4 a9 V0 t3 H2 r; g& ` e' ? part := @.cont;
8 Y( [2 ]/ l# H! i; d6 q( j @.transpOrder := void;1 k- B, S7 P% N* n! O/ i. i$ s6 r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% q+ g+ K8 @' I- _
@,root.eventcontroller.simTime);
; i; T4 k( l `0 A) d @.HasOrder := false;6 a5 [" q3 N9 ]+ C2 @2 m
@.DrivingHome := true;6 t% k. R* C4 T
rgManager.tryToStartTransOrder;
/ g O- {! z6 H k if @.Destination = void
) _# F$ ?/ y3 f6 n! v then -- no transport order for vehicle @: S. k1 `* O' o; K9 ]
@.Destination :=
5 V4 x; Y5 Y; j' T9 O rgManager.nearestFreeStation(@,track.~);* R% T* _7 q) O$ \
newDirection(@); 8 V r, t! T# n% D+ i
if @.Destination /= void then% ?" v+ J5 p' m$ f/ B
@.Destination.NumReservation :=
' W! X% ?& \+ P* y: J @.Destination.NumReservation + 1;" u: p& j N5 b* e
end;
4 j |$ U5 K+ r; H: t @.CurrIcon := "drivingHome";* l' z/ D' e2 f8 l
@.DrivingHome := true;
5 G5 S& I: Q' U6 f' n/ b5 } end;3 a) n7 Q0 x F5 P+ i- p0 z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, A- [1 c( Q* @* Z part := @.transpOrder;7 B( E$ W* @9 t% _9 B- S
part.move(@);-- load part' ^- r: \& H3 Y# r% z/ [
@.CurrIcon := "load";
f0 F# M& Z( ? C+ j- I: B/ z GlobalDistObj := part.globDestination;
0 a; k4 `8 n8 N) ~" \' s assignLObj := rgmanager.rgAssignL;
: X$ a* K/ v! e/ A0 u0 K" A* `' q row := assignLObj.getRowNo(GlobalDistObj);
1 d7 t+ b- D' o T* u5 ^ if Row = -1 then -- since 70
; A/ R! ]; L) b4 N# d, z; E if lan=1 then
y5 b1 R" K2 x: y- v# S6 g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 n' O z) @6 Y4 J/ `! s4 a to_str("in der Andockstation: \"",?.~.name,"\""));
! J. E o6 n. N7 h else/ }$ O$ x) S3 m3 c: ]2 m' _# i# y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' O, E# o3 M/ e+ S# c/ r5 ~% M: b to_str("in docking station: \"",?.~.name,"\""));
( N& q7 f3 K) Z( T2 |# P* k, L end;( F0 {8 I( Q) Q( S( e0 k: T" m3 ]
else
) l5 q2 g; N' ?* W+ K K( _+ R @.Destination := assignLObj[1,row];5 ~ d! H7 P- q. u- n/ S2 G
end; ) Z% }. q& v# X7 G: Z
newDirection(@);
' \2 V8 D! {7 f# D, M! z @.HasOrder := true;
1 ~5 t& H$ j' a6 c end;: g# @( n0 v6 ~; K, u
end;
- \/ b: G' E. Y3 A( n% S0 [0 | x* A mend; -- of the method$ ?6 |. O5 n$ ~0 O V. R6 h( Y
|