/* called by: entrance ctrl of the object 'track'
% M4 P( r: _/ r*/
8 @# J$ F# \) |/ q6 G' }4 iis
" N. f5 H" x: H part, GlobalDistObj, assignLObj:object;row,Lan:integer;* K% o4 X% @, k K# }
do
5 [1 H" } n9 U, S$ z Lan := rootfolder.Internal.Tools.AOLlanguage;
7 s( [* [+ z- B if current = @.Destination -- else return
! T, A( P9 I4 @$ u# i then
. D3 j1 X& S# M7 j6 K: y7 o7 P% S @.Destination := void;- [! e3 j _: d5 @ _4 r) M
if @.occupied then
: B7 Z8 p% J. c part := @.cont;2 m! A7 Y2 N7 I4 k/ K0 e: J3 C' J& x
@.transpOrder := void;
4 E' h3 p+ {0 s6 V6 T. K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* S/ e3 }/ v0 V# ~5 ^
@,root.eventcontroller.simTime);/ u2 y# L2 r: M
@.HasOrder := false;: `$ z. j* G9 `. ?1 Y2 ~
@.DrivingHome := true;5 n- j3 g- n. J" H9 a
rgManager.tryToStartTransOrder;0 @. p M3 H3 [. Q- |
if @.Destination = void
) s+ w/ ~9 H r6 Y& \ then -- no transport order for vehicle @
* y" F3 t/ Q- L! t) X8 C) O* H @.Destination :=
, r- `4 C: q @% J. d$ C7 |- |) g rgManager.nearestFreeStation(@,track.~);
2 E7 M% k1 Q0 h) O- ]$ A* a# Y newDirection(@);
( H$ V9 s9 _* i6 c) y" n if @.Destination /= void then
7 q5 T) J5 E8 G. b3 f @.Destination.NumReservation :=
' X+ o9 v R' s( ] @.Destination.NumReservation + 1;& e+ W" y( r+ }: J
end;
2 [0 v$ D* C* o, Z8 z1 l. C @.CurrIcon := "drivingHome";6 s4 N x+ Q* j& b$ `
@.DrivingHome := true;
7 J( \/ X3 i! V end;+ a( l/ j! k2 v5 m+ }% u) g' F) s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' O# Q& F# ^) c
part := @.transpOrder;
! O# a+ d1 i7 \. B& n" q! c0 Y0 b part.move(@);-- load part
& z; ~: a& M7 u6 m& u! Z: T/ f @.CurrIcon := "load";9 c" @( }& M4 B+ ]( o
GlobalDistObj := part.globDestination;- @3 o; J9 V5 v2 r$ y
assignLObj := rgmanager.rgAssignL;
# Z! \3 P6 U7 Y row := assignLObj.getRowNo(GlobalDistObj);
9 S$ L$ x2 P7 _! S$ } if Row = -1 then -- since 70+ M! ^' r3 R0 |3 G# X
if lan=1 then
3 [, I1 p, H5 A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 \+ k* o* R- r* n: A- [7 ^
to_str("in der Andockstation: \"",?.~.name,"\""));
$ A2 ^& v- N5 K' D, N9 U else
' C0 ^5 |) w4 i+ U* C( v% R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
W( n8 k5 [7 a8 j to_str("in docking station: \"",?.~.name,"\"")); 2 h- M! G5 x" }
end;
4 R' T# v& k, h. Z' [! m else) \! B& ]1 S6 n0 H y9 D
@.Destination := assignLObj[1,row];
9 n) t$ x# B. C end;
+ [9 `/ u% h( x# j: | ^4 G newDirection(@);
% Q* a0 ]# [$ g! g @.HasOrder := true;
6 N, Z" V+ g1 e) n6 J end;& M( ~" T V/ v. p0 _, G' |
end;
|6 X+ ]. T+ ?! ~end; -- of the method1 O$ B1 v( U+ f- ^
|