/* called by: entrance ctrl of the object 'track'
1 [1 z, q( \7 j, {& t8 a# @3 y- S*/8 U3 H; k: Y+ A# z* R+ h( H# v/ C
is
; T$ \6 ?. O/ h1 V part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# O; Y0 z# \3 U- ndo! M4 y! D( u5 z" k) W
Lan := rootfolder.Internal.Tools.AOLlanguage;
' {7 M: Z* Y, p1 I if current = @.Destination -- else return( J0 @/ u! N: i! v$ T! O g
then' }! i _- e; \
@.Destination := void;
! L6 v9 ^* F' }, Y: X if @.occupied then
1 T x' E$ u, {, y part := @.cont;: |5 W# d2 M1 M6 w6 E( r) {
@.transpOrder := void;
7 T4 {0 b9 Y. a& Q d1 v7 x/ K( s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& ~ @7 P+ V+ ^6 L( o9 c
@,root.eventcontroller.simTime);. S7 L# s; W- K. M2 Y8 W+ J3 J
@.HasOrder := false;
& u0 C9 s& B) i0 r' b @.DrivingHome := true;- T- i$ g% _6 r6 z$ x, A
rgManager.tryToStartTransOrder; d1 @, F2 W/ k$ s) @( }
if @.Destination = void3 j( j% D0 R4 w& Y& [
then -- no transport order for vehicle @
7 R! W. K) M. v @.Destination :=7 e7 m, X, ~; W" \) R) p$ E8 m! z
rgManager.nearestFreeStation(@,track.~);: L& m2 A O1 g
newDirection(@); ! l% }, S6 _9 m
if @.Destination /= void then, q" {) I& _$ m9 K9 g1 P
@.Destination.NumReservation :=
% [& O# v9 k8 O" O2 P5 A, p9 T @.Destination.NumReservation + 1;
) Y( \( }2 J; z3 M end;$ m x6 L$ u: l2 p! O
@.CurrIcon := "drivingHome";
: |! u+ u5 z2 m, b/ [ @.DrivingHome := true;
& f, T! \1 P% }3 U7 d+ Y7 Z end;
" Y5 T# Z( r4 b! H" b0 o$ [% } else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 X* }+ H$ b9 b# a part := @.transpOrder;
0 U5 E8 { Y- [# r0 Z& v0 ~ part.move(@);-- load part
' C+ L$ v J' j3 p. i v @.CurrIcon := "load";" |6 K" a& ~: ]2 S5 x8 U0 w
GlobalDistObj := part.globDestination;' [1 d( ]% n4 z: l. Q- J7 \) k
assignLObj := rgmanager.rgAssignL;# Y X( `! ~! Q+ i
row := assignLObj.getRowNo(GlobalDistObj);4 j; v( |! \7 P, x% W: @$ X
if Row = -1 then -- since 70 S/ l1 |7 j! m1 |( T2 Z
if lan=1 then
3 K/ {9 w/ x! s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ _; J* B; v, ^' f6 s, E; ?# ]8 _* ]- |
to_str("in der Andockstation: \"",?.~.name,"\""));
2 ]( C% r$ z" V! V- ]2 p else
+ R( b1 P* h, N; W! i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 c; l! Z: J( n4 C4 K to_str("in docking station: \"",?.~.name,"\""));
8 F* P- F5 W2 m4 X4 _ end;
5 h' h1 U% S7 w2 z0 F8 q$ K6 d( R else
" j. K- k% {0 f3 t @.Destination := assignLObj[1,row];; @& h# b! L7 x& c
end; $ a u2 V6 |9 p+ T- G7 R6 g' f" h
newDirection(@);: R8 j7 L- ~0 i6 {& w" I N
@.HasOrder := true;
' G0 ?* K) v3 T1 Y6 D( P; m1 i0 } end;, e( v* N) w, A5 X N
end;6 E% l k! y$ f$ f
end; -- of the method
2 B- V# G+ Z, b V3 w& k |