/* called by: entrance ctrl of the object 'track'+ ?# n( z2 o2 }& P1 v; X( k
*/# c4 i3 S7 B- r
is
2 m6 F* W; i/ l9 k$ Y5 R part, GlobalDistObj, assignLObj:object;row,Lan:integer;% ]. H$ N' K# ~% O1 {1 y
do
& j0 f9 N8 k: n a8 H# h; ] Lan := rootfolder.Internal.Tools.AOLlanguage;
; c& I. I8 w6 H+ a! h if current = @.Destination -- else return
' `* D! W, H( T, `7 a then
+ m" Z/ h R1 x6 k @.Destination := void;
: _( L9 O9 L+ F6 g if @.occupied then
2 V; U. U1 s/ i' v8 H9 a( k part := @.cont;
6 i% N0 G2 |& ~: w$ Z @.transpOrder := void;" S# N& M O& S! H1 y- A# Y6 [* T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( a. {% g$ u8 M" b
@,root.eventcontroller.simTime);+ L3 m- N, e( N/ D# y/ ?1 `% d
@.HasOrder := false;8 b& X3 b8 w( C9 q7 U# @
@.DrivingHome := true;
3 a5 r: ]+ S. r p9 Q' R; B3 B rgManager.tryToStartTransOrder;+ \7 @6 Y1 y& O% x/ [$ q6 q% O
if @.Destination = void
6 H1 {" B% ^0 K then -- no transport order for vehicle @
% x8 @4 H# e* `$ h( ] @.Destination :=3 ?# X9 o0 B, B1 E' q
rgManager.nearestFreeStation(@,track.~);
; [0 q- C( y5 ~ newDirection(@);
7 z" ]2 {5 I+ G, I( t2 M% I6 b" _ if @.Destination /= void then. Z1 A* W: g. e2 w
@.Destination.NumReservation :=' x: _3 w" Q. _' g
@.Destination.NumReservation + 1;
" T. g2 z$ i3 ~+ n, e. u( a, i" s, p end;
, s' ^& m3 ` ^0 y. R @.CurrIcon := "drivingHome";6 C; o7 ~" I c4 V$ `
@.DrivingHome := true;
r" ]5 d5 m, l: ~* _1 l% `- ~6 r1 T end;
1 P$ E9 f/ r" }7 k6 F else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. k3 V2 S$ O) T) u( h( ~2 | part := @.transpOrder;
' T( I0 u8 {. S5 i" Q part.move(@);-- load part
( k: w0 R/ v; l! ^- D @.CurrIcon := "load";( ]! n3 Q) Z6 O: {+ a
GlobalDistObj := part.globDestination;
& a4 C! r2 h( B1 G r. W ?6 k assignLObj := rgmanager.rgAssignL;( w/ Q/ t+ _3 J# `3 L! c+ j# e
row := assignLObj.getRowNo(GlobalDistObj);2 I+ e' t8 E+ ^( Y( B# H( U
if Row = -1 then -- since 70) g9 q2 h1 z7 r. B9 ^, ~: g! o, Q
if lan=1 then0 c* W8 H3 r3 O/ k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) o, j: o& f. ]7 i
to_str("in der Andockstation: \"",?.~.name,"\""));
' m. X% E$ z' z2 r/ E. v0 ?: Y5 h else$ f+ N* i" U) M7 X) u. u ?# n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 p& c$ b% Q: M/ v* f& A4 @ to_str("in docking station: \"",?.~.name,"\""));
0 m: y* b7 A# ~0 U/ B, q# Q end;
0 X5 U& O* D. w6 b0 s else
2 W7 h: ~1 m" D; O+ v @.Destination := assignLObj[1,row];% r! |) @7 @. i4 p# j% |& f' P
end; R7 R: e% e! D+ P2 ~
newDirection(@);
6 m; a( s' l3 _! p) f# ], ` @.HasOrder := true;) M# h$ ~- |% v, _
end;
7 L3 c. H, `7 m5 ] s end;
! F; D' D" {9 ~% T6 y' wend; -- of the method
, |5 s8 x- L$ J+ X; L |