/* called by: entrance ctrl of the object 'track'
# |5 u5 F- n0 C# `+ e( |*/
" Z! [3 [6 r4 g$ _4 ~" e9 d/ Ois
9 {7 L6 ^! M$ ?9 w: R/ e: d2 {& H% V part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 k- g, S8 v# I0 p3 m3 D- gdo* |. _( M9 K4 Z5 A3 H9 f! H0 T
Lan := rootfolder.Internal.Tools.AOLlanguage;( A; c0 d) n% F+ s
if current = @.Destination -- else return- A( k9 M, @8 Y7 {
then
( a& w) T+ l9 ]2 T4 C% \% d1 ] @.Destination := void;- w8 t: ?0 b$ [2 X/ c, V
if @.occupied then
% Q7 J6 j$ t* Y* I. @ part := @.cont;
: W' ^5 N) P% a+ y/ Q @.transpOrder := void;
1 k$ D* Z8 [, b$ v: y- s# R7 F' [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 q7 J5 t$ G! |6 I* b& n
@,root.eventcontroller.simTime);
/ M6 q" N) Y T3 n @.HasOrder := false;, g) U9 a. T T) c+ Q$ E0 z- T9 H$ R
@.DrivingHome := true;6 ^9 K3 C$ _' o3 o' j: H1 l, q
rgManager.tryToStartTransOrder;
7 X" i' C3 [7 ]! G if @.Destination = void: M) A/ f, Z7 ]: \0 X
then -- no transport order for vehicle @9 o; ?% b5 J! n- B
@.Destination :=# W, k3 D$ i! k2 P$ D/ \5 S7 ?! d
rgManager.nearestFreeStation(@,track.~);
% _8 ]' B% b' |0 g& J0 r newDirection(@); - `, _6 h& n! W/ A
if @.Destination /= void then
5 Z8 X- v* s3 w$ }& C @.Destination.NumReservation :=
4 M0 _, e+ U6 g8 N! a3 W @.Destination.NumReservation + 1;( Y, h2 }. X2 e5 V/ d5 H$ [
end;
0 j8 ?# |& M4 S) [5 K5 \: U @.CurrIcon := "drivingHome";
+ ]9 z6 `! b* C+ D @.DrivingHome := true;( U C" x5 e8 ~4 c3 h6 @
end;
5 j5 L( J9 I2 L {7 Q) o else -- the vehicle @ is empty, both vehicle and part are in the same dock station e- y* K% c; d! ?5 O" F) m
part := @.transpOrder;
; Y; T0 F9 ]4 O8 |% [% K! s" ?( T' b part.move(@);-- load part
/ @" k7 t- f$ I9 K3 J/ }. Q @.CurrIcon := "load";
/ } E8 j t" _& n" ^ GlobalDistObj := part.globDestination;) I$ E2 U( s- U. `
assignLObj := rgmanager.rgAssignL;3 v \5 U1 }1 d; B
row := assignLObj.getRowNo(GlobalDistObj);
1 S' u& l$ {: H# D$ X9 H- \ if Row = -1 then -- since 70
3 k( y. j: G' a# S5 u2 n& o. J if lan=1 then' _7 _2 \9 F. K# ?- Y: E& z' H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( ?1 ] u- p, A/ h1 C( p: \
to_str("in der Andockstation: \"",?.~.name,"\""));
+ o# w5 `: F# A6 G3 X else
6 K4 [, A+ K2 f+ ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) F" N# ~0 p1 c" x5 G2 R to_str("in docking station: \"",?.~.name,"\""));
+ j7 e' s7 m' l) k, B8 p6 f" p: z end;" p6 ]1 L# {( p; Q
else
" U# x2 u- \ G7 T. K5 R @.Destination := assignLObj[1,row];4 N2 a( n# V( Y9 k
end; 1 C, {( s ^/ u5 K/ f# F8 D
newDirection(@);& q) D0 ^( l# ^ @& \) D) ~3 M
@.HasOrder := true;
% s1 k3 d; F6 O# J+ p* n, [0 a end; Q% F8 |0 n: K8 j
end;
2 `( [+ E6 X! N; t. ]0 u0 }, Uend; -- of the method
$ }$ k$ C1 f# B. T5 l, x* z |