/* called by: entrance ctrl of the object 'track'' V2 p5 w4 N" J3 n3 z
*/' W' k+ `/ n0 T7 { A
is# k T" t/ }3 }. `8 _1 b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" h4 c7 p! S2 n3 K) udo
$ L9 Z& `: N; Z Lan := rootfolder.Internal.Tools.AOLlanguage;
0 @7 P. N& g( R if current = @.Destination -- else return1 P. |8 \5 t: F h; M' G( z% D
then: v* {( Y! C4 I
@.Destination := void;9 C$ | Q; r& I* t9 @, H! X$ J1 X
if @.occupied then
8 q6 @$ O6 k6 u j part := @.cont;
3 Z0 v" k3 k& r. J @.transpOrder := void;, t: z! q3 V7 n. a ?5 D3 Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& N5 `6 s6 N" ` x; G" h @,root.eventcontroller.simTime);6 U) d0 u$ Y- T2 M3 t( n
@.HasOrder := false;0 g1 w1 E) J# o+ |# P
@.DrivingHome := true;
( V1 H5 }' {/ J* n( M rgManager.tryToStartTransOrder;$ A) g$ x" @- s/ K$ r/ u( F
if @.Destination = void
: b0 n0 H4 b* P: I0 s# n, s$ R then -- no transport order for vehicle @2 F C3 U0 ~' B0 b3 n
@.Destination :=$ K; m0 I1 S6 L+ H3 m
rgManager.nearestFreeStation(@,track.~);" g: B& O1 _( \% x! F
newDirection(@);
5 `* F4 p1 M* [1 N if @.Destination /= void then0 ]$ J5 B8 p7 Z
@.Destination.NumReservation :=; i, t6 |2 x) A
@.Destination.NumReservation + 1;+ |& {% G+ r% v9 Y
end;! b6 J/ w0 z$ X! J
@.CurrIcon := "drivingHome";
4 X8 l, c' j) b' [& Y; e) x @.DrivingHome := true;; {1 W Z+ C& e) z, O
end;/ Y" G$ ?5 c5 I7 l5 o; f
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" m* C1 \0 n' m5 P+ m) \
part := @.transpOrder;* J0 B$ I. m/ H+ U
part.move(@);-- load part
5 W% O, N2 k9 s# b, u @.CurrIcon := "load";* B4 G) S& ]: i y* v, y
GlobalDistObj := part.globDestination;. q* G' i& V2 [3 v
assignLObj := rgmanager.rgAssignL;
* G! o! J3 \9 r7 |) p. ] row := assignLObj.getRowNo(GlobalDistObj);7 S- u' u2 B* c- b9 {- \
if Row = -1 then -- since 702 U$ f/ i9 r4 c' R5 t
if lan=1 then6 U* J1 d* S" Z8 O5 X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ ^' q1 e: o( v# e( T% ^ to_str("in der Andockstation: \"",?.~.name,"\""));
9 L! a* {+ j: |" _ l else. B3 [5 ?& W* I- g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
~- _6 ~- y4 |! D7 } to_str("in docking station: \"",?.~.name,"\"")); / u8 O7 s) x3 c( o. n
end;
+ f1 ^( g A' H# k) v else
6 _ w* s' `) s7 I* P% u3 [2 l* | @.Destination := assignLObj[1,row];
/ a) B: w0 E4 r" t: _ end;
/ e5 B/ @* {9 ?, y$ s newDirection(@);0 @' j8 ?( R; D; y: R
@.HasOrder := true;2 h3 l* T/ R5 \4 p ^
end;" P8 u0 Q) ~. H+ Q4 S; n
end;
! c* D/ J$ b5 X' n2 B3 U+ T. eend; -- of the method# z$ \5 w+ \, N* G; s
|