/* called by: entrance ctrl of the object 'track'
( W# {+ H/ X9 F4 f*/
3 ?' }8 N3 N) P* N! P* |is
0 d& z" @# G5 y6 D$ e3 O. P$ U# M part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" l* e- e/ I& Hdo) E ?; y; ^' ~
Lan := rootfolder.Internal.Tools.AOLlanguage;8 R6 F' F+ n) @) Y/ Q# a6 i6 o
if current = @.Destination -- else return
/ s1 t4 v6 R) w1 C( X: Z then
' z$ I7 Z& u; S3 M @.Destination := void;
6 w, W' w$ }' D4 | if @.occupied then2 R, J& [% T. S8 A% ~1 T( u) U* M
part := @.cont;
, E7 F6 R3 ^+ [2 F0 Z8 i7 | @.transpOrder := void;. Y3 P6 \% }" M: z, H8 y; c( L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 s3 @" [! v5 W2 m; l) n @,root.eventcontroller.simTime);
l% k9 O: c4 R: K. P9 k5 @0 _ @.HasOrder := false; r3 ~2 P, U5 \* l! i) b
@.DrivingHome := true;
5 e7 ? v& f; E1 V rgManager.tryToStartTransOrder;% M+ B; X) Y5 q9 @( G0 i. q
if @.Destination = void+ k( v# p2 S+ N' W" I+ \/ x
then -- no transport order for vehicle @' F. S3 Y7 K5 E3 h
@.Destination :=
9 y/ }1 x/ a1 h rgManager.nearestFreeStation(@,track.~);, d: g$ @# @- w/ Q) w- K1 p
newDirection(@);
: q0 f$ G! ~1 m6 i if @.Destination /= void then1 y% g- L* t8 ?; }+ ~+ g
@.Destination.NumReservation :=
' H9 [. p8 ~ [, j: | @.Destination.NumReservation + 1;
4 x! A: V/ U5 W& Y1 ^ end;
- S2 q# P2 Y4 w. N% v* q/ f' W r' s @.CurrIcon := "drivingHome";
# y$ ~/ d1 p7 P/ o0 b& v/ D3 {9 Y; \ @.DrivingHome := true;: x9 E" ~% }: k- q; z% S
end;( ]" w* S% R1 \9 n h1 Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ _0 _! j# }& P7 n) K part := @.transpOrder;
- o3 t4 L: [5 _' h5 ?1 S. S. g part.move(@);-- load part; L k' a, @$ ?' Q* M# [" U& \
@.CurrIcon := "load";
s8 J; [) Y. m$ J1 v3 a" ]4 ] GlobalDistObj := part.globDestination;
' D- ^7 S% ]9 w; ^6 H, ^3 U8 ] assignLObj := rgmanager.rgAssignL;( F1 v1 M: n/ s" m$ |; f
row := assignLObj.getRowNo(GlobalDistObj); J8 C1 C/ J5 N a% A* i- N
if Row = -1 then -- since 70& F5 ~5 n0 R& {, Z! H
if lan=1 then
/ z0 i) U- i- ^ S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* G( J3 N) G1 G* h- Q. U- X- h
to_str("in der Andockstation: \"",?.~.name,"\""));8 M6 {0 Y7 X. l: n7 B- a7 U: W" f
else
5 M0 ]0 ]+ B& f% W8 V" O: U promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% Y. w( m: R! ]- ^! a3 | to_str("in docking station: \"",?.~.name,"\"")); ( k" p& j0 Z4 d
end;* y5 J* q+ H1 i2 V0 ^0 p" H
else8 N4 c% \/ {7 W: l- U
@.Destination := assignLObj[1,row];
3 S0 V3 s2 }( }+ Y$ O+ u end; ) {2 V* T5 M( j9 J
newDirection(@);
, _ Y$ C# Z' x, {3 l' z7 m @.HasOrder := true;, `/ ^+ f3 i0 s# [# {
end;
- k4 V" p1 x0 C/ f! b7 ? end;5 |6 l( {% J+ b/ j N
end; -- of the method: |" r9 w s, S. g/ x8 ^ O
|