/* called by: entrance ctrl of the object 'track': s( n' }3 J/ v7 ^
*/2 [( N. \+ t1 \
is. K: ~0 p$ o$ C/ f4 G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; m; R( a3 E6 {- \- _
do
" P; ]0 F) n* O/ \4 F# j3 y+ W Lan := rootfolder.Internal.Tools.AOLlanguage;
4 p0 y" m0 y0 g8 s! r if current = @.Destination -- else return
; R8 v# a: m( P U5 k; f4 ` ]7 R then' Y. Z# b* b- |! w& O2 Q
@.Destination := void; ~% k# ^' m; b- B h2 G- t+ i
if @.occupied then
: } z3 K$ ]- T- j3 Z- x4 u, O part := @.cont;3 ~! i' d# Q& z4 h$ q: }
@.transpOrder := void;/ p$ f {4 f1 w( K7 b; u% w8 A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, G- H8 H" H- @/ s9 }8 g/ o( D
@,root.eventcontroller.simTime);
& ^! ^ G+ O" p# e @.HasOrder := false;
1 r( w- F8 _0 ]" r @.DrivingHome := true;
8 z; m8 v6 R/ i1 R; o' C rgManager.tryToStartTransOrder;; H5 v! h6 z' U y7 o2 b" A
if @.Destination = void
/ n5 r+ @: I \8 ]4 x. | then -- no transport order for vehicle @$ [1 L& N0 s4 N. k+ i" Z
@.Destination :=. D/ _5 \9 y# {$ K
rgManager.nearestFreeStation(@,track.~);
$ D& ^& r" d4 `% f newDirection(@);
% p& d/ s! Q6 Y+ |# ?9 A, s( m5 j if @.Destination /= void then
& i& d0 T5 F$ x2 J3 J4 r" ?' _ @.Destination.NumReservation :=8 _( }8 e, o' t1 d' K
@.Destination.NumReservation + 1;
: _' E* ?/ g5 _( x1 P end;
+ G( p j6 g5 @ @.CurrIcon := "drivingHome";& J2 i+ Q. D8 m |3 u# A; D3 r2 V
@.DrivingHome := true;. l7 V& s' L3 ]0 J6 i
end;+ {+ p5 [6 Y/ k9 l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% H2 Q" D- ?- E! Q! p
part := @.transpOrder;
# }3 J: l0 l8 s* g part.move(@);-- load part' z+ |! U4 O; ^3 P6 z2 ?9 e
@.CurrIcon := "load";) m' F, S( ]' T5 t; e8 W1 \2 A
GlobalDistObj := part.globDestination;6 J2 a: Z( w8 X' o4 S" \
assignLObj := rgmanager.rgAssignL;
7 h! i2 q0 v9 z4 @ row := assignLObj.getRowNo(GlobalDistObj);
6 V; {8 H d5 T9 ` if Row = -1 then -- since 70
H4 D4 Z) p+ t2 X9 N if lan=1 then
* E# R+ w) u) G- L' }! b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 c6 R8 d/ h# _- v! l9 ]5 u4 x: ~ to_str("in der Andockstation: \"",?.~.name,"\""));
5 y, q# u' J s) q: R else2 Q" J" S3 p6 S( T5 u2 o3 f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' d" F8 d. }- c% a8 D2 T. Z @ to_str("in docking station: \"",?.~.name,"\""));
8 ^! p) ?' A- m- U" k. a' q end;) E; w) V, r9 ]' a
else) [; [4 s# L: g+ c' z$ w. X
@.Destination := assignLObj[1,row];
( d! j# C5 C" ?/ G& p/ O% q end; 5 q( W+ P+ j( k! _% U' [$ p) I
newDirection(@);
7 C+ J- u' c- U6 w2 F7 y0 r @.HasOrder := true;
8 v8 Q. ?1 x8 h: x$ a# y end;
. u ~+ q' T* _5 B4 k end;
; t9 i' s" ?+ t3 E7 Wend; -- of the method
/ P) @- ` H2 Q |