/* called by: entrance ctrl of the object 'track'
: Z; y# d; e5 Q! K+ \4 r*/+ p1 z# e1 X2 t5 Z6 k, b |
is
- j0 h/ |) ?" l0 d' @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ E5 `/ V1 u7 g1 h. E. v
do
+ g U3 @8 s# Y/ w6 T+ v Lan := rootfolder.Internal.Tools.AOLlanguage;
4 F9 L. ]5 J& B5 i* V/ H if current = @.Destination -- else return
/ S" U( U( d. v" ]4 u then9 ]7 s/ l; k* _" p
@.Destination := void;
( r, Z3 I9 m7 E8 `- b. E if @.occupied then
+ z# Q# ~8 N: }+ n part := @.cont;+ @' R7 A0 ^! w& F5 k/ i
@.transpOrder := void;
8 C4 @) F0 ?5 ]7 L. `) ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& F) S3 v# P9 @' G2 \
@,root.eventcontroller.simTime);6 d# V4 \1 R# }9 V# ?
@.HasOrder := false;
- ~5 F& `2 K- X3 N @.DrivingHome := true;3 ?( ^# t7 B: R
rgManager.tryToStartTransOrder;4 u% z( S4 q- O9 p8 F$ _
if @.Destination = void
% l$ O6 U& z7 `* q. I0 z( M3 O then -- no transport order for vehicle @2 q) B" O" o& n" @3 t
@.Destination :=1 C# ]2 q1 z! J+ n Q& I. j
rgManager.nearestFreeStation(@,track.~);& S8 P# B6 }( r3 n C( m t
newDirection(@);
8 \& ]& Q* Z3 q if @.Destination /= void then$ n; X, u6 x" M6 B7 J k
@.Destination.NumReservation :=
# I! a, j( V+ p3 Y1 t% m( p @.Destination.NumReservation + 1;4 d! T) u; `' @4 \1 ~
end;
- }3 x0 N% u9 k/ |, m- g @.CurrIcon := "drivingHome";' J, e% e" u% } u( Z
@.DrivingHome := true;
$ Q( R3 r' n/ G( O5 P+ v% o/ | end;
. d# g9 t/ ^6 s) `/ U else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: c: l3 _3 ]# r part := @.transpOrder;5 _" w5 Z& p9 [: v+ U
part.move(@);-- load part$ |+ w" X% }" ], V, I$ m8 O Q% h
@.CurrIcon := "load";
% e! _: w% ?/ D( D GlobalDistObj := part.globDestination; Z7 q! x& E0 Z5 l2 S) o
assignLObj := rgmanager.rgAssignL;/ f3 A5 h% Z' O/ v$ a8 b# m
row := assignLObj.getRowNo(GlobalDistObj);
0 v1 I* e3 G! u9 _+ d: m if Row = -1 then -- since 70# ?" Z4 \2 `/ I5 s( `$ f
if lan=1 then9 H, [: E4 l! z7 X6 Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" Q0 O0 G/ m$ x' g3 l to_str("in der Andockstation: \"",?.~.name,"\""));9 Q+ J! x: \) `. ]9 N2 K6 r2 w# O
else" `2 y5 s+ }8 ^$ O$ u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," {% F5 ]9 ^; |9 d7 j$ C7 F
to_str("in docking station: \"",?.~.name,"\"")); ( ]) a1 k; L8 \1 ]. a
end;
% F$ @8 z. e+ u! P else
/ {' K8 g% D0 m; m8 C @.Destination := assignLObj[1,row];
7 E: i' i* ]3 A end; 1 w4 ^0 I! E/ a4 o
newDirection(@);
# L5 Z! {. h6 Q& a( R5 C @.HasOrder := true;
I( Q0 C- q& F* y# ^0 ] end;% O( D8 M: y2 I( U
end;
2 h) T2 O( z, t" \% J! v) A- m4 Zend; -- of the method
I' B: C0 G# ~4 Y! q; H6 M |