/* called by: entrance ctrl of the object 'track'/ S V+ G: X$ D2 U
*/
# s* h" K& A( D3 V( gis
) p9 A: ?, Z# K$ c3 N( K+ b part, GlobalDistObj, assignLObj:object;row,Lan:integer;( W* Y) T" K- z& F9 {2 ]
do1 S1 `+ w5 c3 S' y2 n
Lan := rootfolder.Internal.Tools.AOLlanguage;
% O! z8 q- B6 R }& j if current = @.Destination -- else return
, `3 t9 [3 E! @( {' Z then C G' Y% G- K' O0 z9 {, y
@.Destination := void;
, o; ^' z) B: z8 H [+ _ if @.occupied then
1 A i1 |. y0 `2 w part := @.cont;4 `3 }/ T' ^3 B' A8 m
@.transpOrder := void;7 p$ n0 @- _2 W; ]) P2 r/ b+ m Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* S9 _4 ?9 P2 C
@,root.eventcontroller.simTime);7 V! E% ] {. J& r0 |4 b
@.HasOrder := false;( f( C$ |) b8 L( r h
@.DrivingHome := true;
$ s' F( c) @1 V$ x+ ^1 Z' w rgManager.tryToStartTransOrder;+ ~7 }& g1 _/ P0 S* t0 U
if @.Destination = void& i& g# h& N2 O3 J/ j5 P% ?8 _% K) d
then -- no transport order for vehicle @
: l$ b, e$ Q% H# j$ x @.Destination :=. c) f; F1 i2 P
rgManager.nearestFreeStation(@,track.~);6 Y, z4 u1 Q9 s. q+ `1 \9 M
newDirection(@);
0 h& j3 a/ S+ c if @.Destination /= void then
! G! W: F! g# T @.Destination.NumReservation :=$ y- U: Y R* _
@.Destination.NumReservation + 1;
2 U9 I: R/ U/ [3 \$ M end;
& W6 }7 M2 K* y0 ~# A( A) ? @.CurrIcon := "drivingHome";2 ^; F% ^: s; k& H; f; q
@.DrivingHome := true;3 F. a; E+ G& Y# x5 ?
end;
, q' D3 ~" y# d! v9 N else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 }- z9 m0 J- }9 }
part := @.transpOrder;
0 t% r$ t% w& @ part.move(@);-- load part
( _' ]3 p; q, s/ G6 {/ D @.CurrIcon := "load";/ M' M5 _" W) x2 d# Y! c
GlobalDistObj := part.globDestination;
' z7 H$ e9 `4 g% y assignLObj := rgmanager.rgAssignL;
! S/ h) V% X6 {/ W$ U6 M row := assignLObj.getRowNo(GlobalDistObj);1 I0 n9 P7 i2 R4 o& j
if Row = -1 then -- since 70
; \6 W, G, J# ]% V, c7 n/ q if lan=1 then5 T# C9 t) v3 u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ S6 a, l; Q+ ~0 ` V
to_str("in der Andockstation: \"",?.~.name,"\""));
6 ~; I8 ^+ W, \4 j6 w else
5 n- T8 h) F/ m3 s; [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& Z5 f6 m) u. x7 @) l6 R to_str("in docking station: \"",?.~.name,"\"")); 3 k- |+ s7 w1 d- O: q
end;" L8 y* e3 Q& a6 f' h
else
0 h( G2 o$ S0 {2 ] @.Destination := assignLObj[1,row];5 w% F4 u* K5 f8 i6 X* H1 H' a: o/ }
end;
; \# W- W( W9 Y# q newDirection(@);! g- M+ c% P( g1 I3 h' U
@.HasOrder := true;
+ g3 \3 Q" b+ k6 V$ n* w end;& X3 Y( b8 k8 _: t' A# |, @* p: u
end;; }" T; B5 W7 Y( @: `
end; -- of the method
' Q6 e8 ^) O4 @0 Z |