/* called by: entrance ctrl of the object 'track'0 P/ R& Q; A& R' H
*/7 J. w8 E3 G! }
is
0 f$ m7 A4 E$ _ O! x part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 N. W/ P3 d1 u7 g) @7 _# D$ Zdo
6 |/ e8 D; p- E* R3 D Lan := rootfolder.Internal.Tools.AOLlanguage;
+ o/ {4 w* F5 {4 y% ^' C, \ if current = @.Destination -- else return
* i* J* g" E5 Y/ V, m8 U6 B then
# E* U' u% v0 L0 q! H; K$ ] @.Destination := void;9 w$ B2 `$ ^; @
if @.occupied then6 U; l2 x! m! N: q' A$ @
part := @.cont;- @* g& b+ ^' M. z
@.transpOrder := void;
7 H4 p1 r+ E/ E: w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- O) q& [4 `: v% z
@,root.eventcontroller.simTime);) q1 L* ]% ?" D+ t7 v6 c
@.HasOrder := false;8 x( ^; H, q% Y9 T
@.DrivingHome := true;
+ q6 ?. B* B- Z/ u, p# z rgManager.tryToStartTransOrder;
" A& S, n# T1 p/ U4 L if @.Destination = void
2 l+ |# I2 Q" b& P' {( Z1 b then -- no transport order for vehicle @9 S3 D# V2 m0 q3 ^6 W( ~
@.Destination :=
" x8 t. f9 i0 P# a5 I | rgManager.nearestFreeStation(@,track.~);
; `5 Z. q0 c. Z3 Z( v- [* a2 l newDirection(@);
. O- K9 d3 ~/ B1 k4 c( m- [2 @ if @.Destination /= void then. N. O% V/ X; Z7 G, [) }+ t( } }2 o
@.Destination.NumReservation :=# R }$ ]+ V3 J; ~
@.Destination.NumReservation + 1; x8 m |8 J9 j. B$ Y7 q$ x$ C T3 A
end;# m) [ ^3 C* m t+ g2 E5 y
@.CurrIcon := "drivingHome";( o- M: I% B* l8 N3 d- f9 p$ A/ r
@.DrivingHome := true;
9 @6 S3 ]0 ^3 x; L0 m5 q: n J end;
J) N7 \7 Q6 @, g else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 B1 Q, T+ D) h: E" A5 s part := @.transpOrder;
" M6 f, `3 n; ]& }2 H6 P" J part.move(@);-- load part j2 }1 b; k! s
@.CurrIcon := "load";
: z0 n6 N' G3 a$ Y' u; A8 G: @ GlobalDistObj := part.globDestination;: [/ a3 {: Q0 i2 Y! W3 A
assignLObj := rgmanager.rgAssignL;
, V" ?9 F) u1 J1 ^2 Y& h3 K, J row := assignLObj.getRowNo(GlobalDistObj);* _: C. ?( u) h/ J- N; m; B# J1 j
if Row = -1 then -- since 707 Y" D- ?* C( V, j' C
if lan=1 then9 T. J+ T+ p$ D- B! {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 ?/ N8 P4 p5 `6 Q1 a7 r- u# g
to_str("in der Andockstation: \"",?.~.name,"\""));
' V" X! B0 |* z, O. T$ A/ Z5 c K else
5 _* B6 `0 ~/ E$ D! r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 J. I" L4 n9 B$ u9 p' I
to_str("in docking station: \"",?.~.name,"\""));
2 ~( p! F3 }( z; { end;
$ P; e1 ^/ E; j/ K6 {( Q else4 T7 }& q4 p+ g5 h" ]* i: }: |
@.Destination := assignLObj[1,row];
9 ] R% ?2 k& O/ e4 v8 p0 ^/ z% P9 B end; % Y' [( n$ w! I: N9 V
newDirection(@);1 b) l+ C& L/ I
@.HasOrder := true;$ Z5 a* h9 m3 |( i) W' p
end;3 V$ Z8 F/ }# \
end;! b" v6 ]* {( z
end; -- of the method& s g) }- h/ z
|