/* called by: entrance ctrl of the object 'track'6 u% r. c' }" I! F* Q( C3 U
*/$ A1 o6 x6 N, H% S
is$ J" s0 A. W1 }0 T U4 s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ K6 B( i4 ?7 P xdo- j7 N2 p) z6 |
Lan := rootfolder.Internal.Tools.AOLlanguage;0 p; K2 b2 O/ Y5 W
if current = @.Destination -- else return
p+ q4 B7 m2 u( I4 n/ M then
5 a) X6 X+ [8 q0 I3 m @.Destination := void;
4 k6 F( i% E; m2 ]8 ? if @.occupied then: u" f; T+ p( ?3 E0 r# X# m& l8 \
part := @.cont;
- y* V5 W3 V* z# m0 K! ] @.transpOrder := void;
' Z. ~" R; P4 p# p0 f6 D H; v part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 w4 F, N; C7 k; a2 e3 t
@,root.eventcontroller.simTime);& C9 h4 \* T5 Q. `/ R! m% J3 z, W
@.HasOrder := false;
" {) }: X1 ]; T+ w4 V& x6 N @.DrivingHome := true;/ I9 [9 u$ \; \& M% b7 W
rgManager.tryToStartTransOrder;
* b6 n: ~9 _0 u) I0 k if @.Destination = void8 k" F% @8 k0 j4 b- B3 r$ w
then -- no transport order for vehicle @- J/ E& M2 A* r' V: D
@.Destination :=
; L: i) ]. z% @) u rgManager.nearestFreeStation(@,track.~);
# ^# v) l% q4 L( }# f1 G newDirection(@); 7 Y0 g) n$ u! ~& i* b
if @.Destination /= void then
# R3 A# R6 y5 g6 I @.Destination.NumReservation :=
4 l1 {# K. w; E* R* U& ^) q @.Destination.NumReservation + 1;
3 |% B& h9 O5 n8 M2 }6 {' k end;
, o) d; U8 z( j @.CurrIcon := "drivingHome";
3 ~4 F4 z* z/ @% F @.DrivingHome := true;" T) j q( _& t; [$ C! s$ ^
end;8 I7 _" m' N* Q1 [* k8 y- |/ y( F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' H( f5 f& E2 N2 {9 p2 L part := @.transpOrder;( ?/ O, ?6 E% n( A5 C$ y* d
part.move(@);-- load part
0 U0 z: p+ W# ^0 r, M3 {$ Z @.CurrIcon := "load";
- s. ]1 P5 \9 E; O; h GlobalDistObj := part.globDestination;
. c! ?) b: r) j+ c# Y assignLObj := rgmanager.rgAssignL;
) ?) p* o9 v/ L1 P; x row := assignLObj.getRowNo(GlobalDistObj); ? i. w8 r7 Z5 }; D# \
if Row = -1 then -- since 70
; X7 w& C4 B1 Y1 X6 Q if lan=1 then
# n1 X) ~: o9 D( r; ~- D4 u% N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 x( u. h" T4 u5 z' y& A+ D
to_str("in der Andockstation: \"",?.~.name,"\""));9 x9 {: I# f P' L) R' Y# C# A# y
else5 J% C( G2 Y) Q2 N8 z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- \# x0 [2 b+ Q1 q" ?2 i: B9 A to_str("in docking station: \"",?.~.name,"\""));
. v) s% b- a9 n! }) B) W end;
# ] K5 H% S. `, n0 k9 L else
" S9 b7 q" b- D( v* i: e& Q" B6 m& M @.Destination := assignLObj[1,row];+ t; `1 |4 c9 |6 k$ b c; e
end;
2 T( }1 l5 ]7 a" _, K3 } newDirection(@);
* w, K; s# W/ Z8 y3 _4 g @.HasOrder := true;
! Q2 f2 k) l) M1 x end;
$ J, D7 Y: \6 w end;
, W5 d9 v- `. t( L5 x! Q Nend; -- of the method; J9 R2 c& o4 g
|