/* called by: entrance ctrl of the object 'track'
( `+ g9 h a) b0 ~*/
6 d# t1 t; k6 Zis1 X0 V$ D! P, H) k& ]- A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; g5 ~# q7 j- {9 T0 Z
do
0 k) k2 U U; o& Z% p Lan := rootfolder.Internal.Tools.AOLlanguage;
3 @/ g O5 a/ o+ L if current = @.Destination -- else return
$ E# R p% {, E: ? then$ K: e" a% A# k
@.Destination := void;
+ T( f+ p _1 N( x if @.occupied then1 K- _( ?5 f$ _6 V% o4 L1 \& ^5 p
part := @.cont;6 A% p/ A8 Y$ J' l6 F5 [
@.transpOrder := void;
_* o6 H+ r# ]* _1 K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ v# j7 o9 C3 Y$ J+ q. h$ \ @,root.eventcontroller.simTime);
* v( f# L8 N; }7 ?" } @.HasOrder := false;0 W+ j2 B0 b0 u; v3 _( b
@.DrivingHome := true;( X% z l3 o3 O6 a( b z- W
rgManager.tryToStartTransOrder;
+ l8 W, c7 e( J, ]+ P$ A: m" D if @.Destination = void
" @+ j* F# O$ W# @. R$ g6 `8 ^5 E% W then -- no transport order for vehicle @
1 j3 X1 o, r8 L3 n @.Destination :=
( n [3 c7 D* x9 S( Y, q; ^ rgManager.nearestFreeStation(@,track.~);7 y' D/ w8 B+ A
newDirection(@);
. S9 j8 E2 V$ N0 y1 ~+ S* Z if @.Destination /= void then7 t9 ?. Z' U" [7 S S
@.Destination.NumReservation :=
+ G6 S3 `5 I) o1 r3 y @.Destination.NumReservation + 1;
0 U6 I7 h0 q" `# G3 a& K end;. G5 V+ l) _& s4 G- f
@.CurrIcon := "drivingHome";
6 L/ P* `( R* H @.DrivingHome := true;
$ |# R) W+ e; w9 b" {% g end;
z; |* z) c, T0 e) B; B else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: i0 r9 `# ~# y: t- P part := @.transpOrder;
6 N. C' I& D6 D3 m4 Y* ^ part.move(@);-- load part
+ Y) J) v, w+ m5 l, r! [ @.CurrIcon := "load";9 W. q% L" E6 B0 V- X5 u+ _
GlobalDistObj := part.globDestination;
* o" Z. A; `7 E, J assignLObj := rgmanager.rgAssignL;
% L. A |4 R* b# C6 n row := assignLObj.getRowNo(GlobalDistObj);
2 E( h" x8 S$ b if Row = -1 then -- since 700 ?( ?" K- a2 f9 v7 B" U! X
if lan=1 then
/ U4 P2 {# O! O& w" S1 L9 ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 ]* U9 P+ V/ }" P# [: V& g* F6 K
to_str("in der Andockstation: \"",?.~.name,"\""));
- z" a" U' \3 t, H1 ]! H1 {- x else2 `" R) J: Z: j$ v1 ]1 U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 |- o- v9 }0 o7 X: K4 S) s6 t to_str("in docking station: \"",?.~.name,"\"")); ; `: K. | c g( C% ?/ q( e9 W
end;7 E. r. Y( l8 e
else( K/ X9 V! s5 W8 X
@.Destination := assignLObj[1,row];
0 S3 N! @3 T$ l. V7 w: b end; 4 N5 k, c1 S8 X
newDirection(@);+ g) \" Q3 C% ~( X3 u
@.HasOrder := true;
" I& i6 P6 m* @- s7 | end;7 C5 h) j! T K' ?
end;. |' X1 v: t& V5 Z
end; -- of the method
8 A5 h6 ~. m2 y5 I |