/* called by: entrance ctrl of the object 'track'
6 H2 c, H. h. w5 m*/$ R( p; J0 ^5 A+ h
is
$ k# E0 s. B/ u2 T+ g- t2 }0 e part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 `3 O' y0 j# u6 R/ d
do
# \4 C2 n1 ?+ I6 F) C Lan := rootfolder.Internal.Tools.AOLlanguage; `/ I* h2 e c7 U
if current = @.Destination -- else return- S- X, ~: l4 U7 @) M
then B' W% u9 a" F1 `
@.Destination := void;/ R2 F% E \, i$ j
if @.occupied then! C9 e. ^9 `- O$ t* q, Q
part := @.cont;- @7 U# k: p9 q% v" @
@.transpOrder := void;
3 f$ E" ^3 b" R6 [3 z3 {, s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* V( T" N ?' m% r @,root.eventcontroller.simTime);
1 K4 {* R+ X5 W9 U @.HasOrder := false;
0 m- X1 E( l3 i4 m5 | @.DrivingHome := true;; E% ]* W d+ O) t1 o- q
rgManager.tryToStartTransOrder;" {+ x9 V8 g1 b1 s8 X1 @# M
if @.Destination = void P& i! b/ ?; J @% J2 ]" ^6 ^
then -- no transport order for vehicle @
: _! \. L* w. S; J9 z, @ @.Destination :=6 v( b* I9 ^: p& j( p1 E1 L5 j
rgManager.nearestFreeStation(@,track.~);
w2 ?1 P; i9 e% u newDirection(@);
7 v* b7 S% b4 `4 l- X7 a- [; q8 o if @.Destination /= void then- m. Z; R$ A H# J: K |
@.Destination.NumReservation :=
# t9 {- O$ Y) A3 D7 y @.Destination.NumReservation + 1;% ~! `. [4 {" j* [
end;
- W- Q6 _7 y4 `# }! b @.CurrIcon := "drivingHome";. D2 b) q3 o7 d7 y/ X
@.DrivingHome := true;
9 I* j! V* ^9 r7 L. D$ I end;7 B$ I) c6 f3 v- P2 ~$ H8 |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' ]% k ]& V3 s" C$ a part := @.transpOrder;
2 B6 V. ~! n" a6 X6 N part.move(@);-- load part1 X' o2 c. j# q. P
@.CurrIcon := "load";1 W# u. d, b, T: A( k3 N
GlobalDistObj := part.globDestination;7 C/ k7 Y; j8 |0 i
assignLObj := rgmanager.rgAssignL;. u K) H' s0 R) w6 \
row := assignLObj.getRowNo(GlobalDistObj);4 T! L( M9 e$ ?5 f6 o( O
if Row = -1 then -- since 70
]7 E$ A+ `* m if lan=1 then( k' N& X: {, s! T. ~8 l
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 F+ W. V# l5 f* m* V; F! Q/ w# ~( q
to_str("in der Andockstation: \"",?.~.name,"\""));
0 [6 R1 \" [, Z+ ] else
% W6 Q0 ]6 S* I' r X9 W1 F& @* D+ I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 F8 M/ x0 g! [. T- j* [
to_str("in docking station: \"",?.~.name,"\""));
* L9 ^) B3 F- @# B4 \, V' | end;* C; @) t4 h+ E
else+ D$ v- m% M4 t/ Q: c( S' ^
@.Destination := assignLObj[1,row];0 z% c) Q7 d5 E. t" R8 e
end;
7 ~! j# ]4 Y* g/ z# ], G, e" S newDirection(@);0 n S& M, h6 O# x) q3 g
@.HasOrder := true;# a# ?/ a) x7 L; R- l
end; O! E" p6 d5 {, Q
end;7 {& x8 [# C# F5 s. C) A- A& d F. i% d
end; -- of the method
; F0 n8 Y0 G9 C |