/* called by: entrance ctrl of the object 'track'" P6 l( `& M5 m% K# f- \
*/
5 n& y! {/ W1 p; Tis
- D9 ?8 ^# T& x J0 g3 w part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 ]; X+ B' D0 C
do
6 K: b n- w' I' P* _ Lan := rootfolder.Internal.Tools.AOLlanguage;
7 F- g; Q' o) e/ E# ?! x3 \: G; } if current = @.Destination -- else return" x! |# z; M6 G; S
then& J& l3 H+ T! d3 k1 j% L
@.Destination := void;
w! J% Z# [7 g5 R" _ if @.occupied then: R# A2 _3 F6 Q4 n3 h7 N/ ]
part := @.cont;
7 E6 h, H; A. O) v, K; s5 C7 i @.transpOrder := void;
6 M% X$ K9 _$ V$ {' S! N7 Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; Q' S3 O& d; j3 N: \# \$ @9 m- M$ A @,root.eventcontroller.simTime);+ ~5 p) t9 R2 w$ t
@.HasOrder := false;. V G1 V; X* Y, U% R( f
@.DrivingHome := true;
! O6 r2 A- q, Y+ h# t# F7 A rgManager.tryToStartTransOrder;
$ z- K, }, H1 @: X7 G$ l if @.Destination = void0 I" [5 V. g4 f" c
then -- no transport order for vehicle @
0 Z: q& x* t- C# Q9 ~$ i& r @.Destination :=5 h% O4 e6 {5 f% V# H- L0 I
rgManager.nearestFreeStation(@,track.~);* d/ y# Q8 F' o3 x
newDirection(@); + q3 I" j! I$ r! t& x$ K+ |
if @.Destination /= void then g" o! Y8 R/ y4 i, n* ]9 |
@.Destination.NumReservation :=' ]- T6 ] r+ r- n6 Q) @* X, j
@.Destination.NumReservation + 1;- b( @6 T+ s- S4 m
end;/ P) s$ y$ q: H8 p( D+ R
@.CurrIcon := "drivingHome";7 p/ y7 [1 L- f$ C/ D5 p# S
@.DrivingHome := true;
. _( y+ o# h0 Z5 Z end;
8 y6 b# s$ f v else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* y6 O; [" \- `% C; u part := @.transpOrder;
4 y: A% V1 j* f, l. x$ {7 A part.move(@);-- load part
, }) ` ~5 {" I1 I) f0 _" c; Q @.CurrIcon := "load";
1 J' i" m; p' K" m; i8 B8 E0 n GlobalDistObj := part.globDestination;# B/ u8 {* l* U. F: I
assignLObj := rgmanager.rgAssignL;
# @2 ^, m2 r' d3 V, x row := assignLObj.getRowNo(GlobalDistObj);! S- c8 o; V7 X4 R& ]* [" c# \' @
if Row = -1 then -- since 70
( m' }( z1 Y) v( D5 ^+ r, C* [7 k' n4 F if lan=1 then
3 Q% H( p& C5 o2 e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& p; w0 }8 m& z; W9 `7 b, y: g4 t) M
to_str("in der Andockstation: \"",?.~.name,"\""));
2 Y+ s+ X! J0 U: u8 | else7 k, v& C6 b* y6 y3 t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 k \; ]# ~6 i; k) l to_str("in docking station: \"",?.~.name,"\""));
0 ?1 E3 E. \& f4 ~# n$ X end;
4 @0 \6 [) Z7 x7 ]0 N% L4 S* | else( z: b2 t+ ]4 y" Y5 ]/ n
@.Destination := assignLObj[1,row];% A/ [, ]1 u. b% b+ w6 U5 A8 B
end; : w, a7 q" o1 k: P2 `
newDirection(@);# d7 [$ _% j& y* d5 F0 e
@.HasOrder := true;5 F+ E. r4 p. B9 I- X o- w- z) G0 ~, Q
end;
- E; J9 a0 F; K8 P end;8 b! c/ O. R" N7 c9 f1 I3 F
end; -- of the method
5 {' H+ k' o+ R; J |