/* called by: entrance ctrl of the object 'track'
$ r* |8 k4 E( S+ m9 g*/# \$ ~* R+ Z5 h# F& }
is/ z' m9 R7 H1 \ c8 ]$ l) k" Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- p, f) A$ R+ T& ~
do
; y% ]1 I% j9 M$ Q& r* C Lan := rootfolder.Internal.Tools.AOLlanguage;( K/ R3 ~" m0 T: g
if current = @.Destination -- else return- F# ~! s; z& r# g
then
. Q& y; o1 _5 r6 o( k! { @.Destination := void;
' Q3 N7 x, @0 ]6 D2 B if @.occupied then/ b5 F6 P1 P$ W- y
part := @.cont;0 n6 [8 B. p( [3 q: Z L
@.transpOrder := void;
1 m4 B, X) k" m; ]" c. z3 C+ ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% S* q/ w$ A: ]! [+ a9 x& {
@,root.eventcontroller.simTime);
6 A5 l) x8 s% p) m$ t) a @.HasOrder := false;. O6 C& f q8 O. w P% n4 H
@.DrivingHome := true;
, e( r0 ?4 _( w2 O. }/ h+ g rgManager.tryToStartTransOrder;3 J3 U: z8 T4 [) ?4 {
if @.Destination = void
) h m, S3 p# Q% j then -- no transport order for vehicle @+ c3 M1 |/ m5 |; I R( y! \; W
@.Destination :=
& |5 h1 V7 @+ X& P, d1 F rgManager.nearestFreeStation(@,track.~);# Y! I6 ]* x0 c
newDirection(@); ! X5 q# W+ y# m- q @ h0 q
if @.Destination /= void then; a X3 D3 P/ \8 S8 Z: H: K: \
@.Destination.NumReservation :=* {- b7 c& d7 X) z% t4 h
@.Destination.NumReservation + 1;# p- d, v' L+ t
end;( O% N6 U5 F7 V; N( w9 A
@.CurrIcon := "drivingHome";. }4 s3 g- z: ?( F# p
@.DrivingHome := true;
9 M7 @4 _ l% `2 o4 F% K. Y end; `: w T# ?* ]2 Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 u4 S0 ]4 H& N' J) r
part := @.transpOrder;
0 M4 f; B5 u( b7 t' D4 p- [ ?: { part.move(@);-- load part
4 C: o* r9 v- C# V @.CurrIcon := "load";
+ |* C6 }. {8 J- L, F' H. s. |" l GlobalDistObj := part.globDestination; v, _, D! v$ a
assignLObj := rgmanager.rgAssignL;! v, T5 }) C% K
row := assignLObj.getRowNo(GlobalDistObj);8 M! m1 n/ e4 [4 z/ N6 x; G6 l
if Row = -1 then -- since 708 P1 z7 k$ y7 C. N
if lan=1 then* R( K' o7 j6 ], P: p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 T6 z+ Y7 V1 M4 D! Y1 T to_str("in der Andockstation: \"",?.~.name,"\""));+ a8 M- J' A" v9 t. B1 n7 i
else
% ^, E5 K Q/ n0 K7 V# |$ e& j8 u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 u9 L, E* p7 n( |* s
to_str("in docking station: \"",?.~.name,"\"")); + o2 j9 R6 X. Y! }; X0 n
end;- p; m+ [& F/ O/ N8 d9 q
else
$ z1 O3 \7 y2 ]! R! U3 S( z1 z/ q; s3 A @.Destination := assignLObj[1,row];! e/ c+ [9 B# Z
end; " n1 M6 S8 D- s1 `) A- `8 t
newDirection(@);
2 K* H2 S+ u. G' ? @.HasOrder := true;
3 N: n! a9 |5 r( D' Y end;
1 O) v& ^/ t! I3 R7 A& O end;9 `2 L" c2 v9 z, C) u! H
end; -- of the method, K6 x( _1 L5 X, c/ U! B) T
|