/* called by: entrance ctrl of the object 'track'
% @8 g. d6 E: S1 `! _* W*/
+ K( \, x1 t$ X! {1 i$ O$ V. [is8 X9 t' f( C1 M' C" B' Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' ~( w! H; W$ K
do
$ S: N1 |# _4 l3 A$ j Lan := rootfolder.Internal.Tools.AOLlanguage;, ^8 h( d$ `3 M/ P: I+ \
if current = @.Destination -- else return$ |6 c- K1 j& A0 d
then) _! d/ b3 @* } f0 c1 w
@.Destination := void;
) j/ k1 A. b4 H2 T- k if @.occupied then
( E/ q, A! t2 J/ z& q: J4 K3 P R& V part := @.cont;8 C5 s. l* K7 `* f0 z8 @9 G6 T7 G) O
@.transpOrder := void;
7 R% u" Y5 d. Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. s1 Q+ ?: [# B- R, t1 m
@,root.eventcontroller.simTime);+ W4 O( o) d) I' M2 L. u- I
@.HasOrder := false;3 `2 `, B% W# \5 Y% N f
@.DrivingHome := true;
0 K& G6 X4 t u* P rgManager.tryToStartTransOrder;
# x) @, A) m) Z2 i( d8 U% s if @.Destination = void
/ ^3 e" Z$ } C! V ]$ G) P% H then -- no transport order for vehicle @
/ \9 M# y, A8 D9 Z7 C; y$ k' z- V3 N @.Destination :=/ [) K8 r/ z1 Q/ u3 [
rgManager.nearestFreeStation(@,track.~);$ s7 p. Y# G' E) t8 S1 @
newDirection(@);
/ L G6 g5 x. ?7 [5 [ if @.Destination /= void then
; _$ i6 I+ p0 Y6 a B0 j: h @.Destination.NumReservation :=
& G5 _$ z, Q4 \ @.Destination.NumReservation + 1;2 z2 |" G& b1 A
end;/ W, R, ^% `5 o! ?* W) I6 ~
@.CurrIcon := "drivingHome";
( S, C5 n' u! t& Q% w @.DrivingHome := true;
/ X7 g5 `; j( N- U8 P end;% d7 z. x- s0 ~6 ]$ j( N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* _9 t# Z& x; e" v" K6 w part := @.transpOrder;) B0 {2 j) X3 b1 p0 J: Z( T2 Y; h
part.move(@);-- load part; X' w1 p) ~, b% ^6 l6 ]9 q# H/ J9 P
@.CurrIcon := "load";4 _1 O! S+ A/ S) N) Y
GlobalDistObj := part.globDestination;1 p8 F$ Y9 {9 e4 W" m4 A/ X
assignLObj := rgmanager.rgAssignL;9 L; B7 `, t/ m V$ k; o5 i. ?
row := assignLObj.getRowNo(GlobalDistObj);
3 m: L; v# @! i if Row = -1 then -- since 70- y9 l0 _' a6 O: F5 I- O, V
if lan=1 then
/ i. j- Z( U$ C) d3 B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- b# b& K. P r; F E }- \
to_str("in der Andockstation: \"",?.~.name,"\""));
' u2 B+ [ ?/ L: e) @ else
4 }% v7 T3 \# d2 |3 h/ } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. m8 v: P! D3 _1 b$ Z/ C to_str("in docking station: \"",?.~.name,"\"")); # i3 ^, y$ A9 }* ~# z) u5 h
end;
# l' O# v) V" n0 i! f4 K& `! `- ? else
C& E7 A& D# ~0 v5 y4 A( F @.Destination := assignLObj[1,row];8 ~( L P/ T. q" ^3 A
end;
! _6 X$ G$ C% p& v; B7 q newDirection(@);4 v3 r7 K7 x+ Y: g% I) J
@.HasOrder := true; r3 @& s7 r' W0 Z5 R: H
end;
9 {+ j, r. o3 K7 V3 }3 ] end;8 l& J" o% s. J4 k9 e# Q X( M' O
end; -- of the method
$ J, b: \/ _2 E' h. i# Y, }- D: w; ~ H6 B |