/* called by: entrance ctrl of the object 'track'+ J" }- R6 k% d0 \ s4 m
*/& V/ t0 d7 D% s! h+ u
is
: F! a" ]( }5 r part, GlobalDistObj, assignLObj:object;row,Lan:integer; c0 m- n# \; H& z- z. S
do' s# n; U$ x; v. F5 d/ M, j
Lan := rootfolder.Internal.Tools.AOLlanguage;+ {9 C6 K. Z. g1 G' l( d9 E! o
if current = @.Destination -- else return8 h7 e2 _& C1 Q- r8 @
then
1 q( {+ w* Q+ B @.Destination := void;; G& A$ s9 ] I8 _
if @.occupied then% t j# O. Y2 u: p
part := @.cont;
' L/ f* `+ n2 K/ s+ G" C. e @.transpOrder := void;/ j; r% P) g" N" y" J$ c6 Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ \5 l8 z9 f9 D- L7 f4 K; }/ @) k# b @,root.eventcontroller.simTime);8 Z, q" |/ K j% ]9 Y3 g% q
@.HasOrder := false;
- j6 c; ]" b9 Y* J+ _. T$ X7 L- |/ u @.DrivingHome := true;! H( o+ p& w- N' G' s+ Z& L9 @
rgManager.tryToStartTransOrder;: {1 V/ c3 ~( w* ]1 c" n7 v+ Z% _) X
if @.Destination = void3 P4 o9 b' C9 A( J& J
then -- no transport order for vehicle @
3 l! S* s' n% S, n n- k& |. _ @.Destination :=
1 `( O5 ^0 k4 u rgManager.nearestFreeStation(@,track.~);8 k) y# l% H+ k+ V: Q
newDirection(@); 7 g" d% d* U/ Q. \# H( k9 n/ a
if @.Destination /= void then
/ u* w& {" _: E; B) U4 W a @.Destination.NumReservation :=0 ?* r7 q1 i* j+ f6 T9 d0 ^4 d; u
@.Destination.NumReservation + 1;3 m, d1 {3 e! Z: y4 f# }+ b: j# A" D
end;
2 p* j" {% N0 |; o+ ^ @.CurrIcon := "drivingHome";
0 j7 X' ~8 }, G5 U V+ h3 [6 D0 t @.DrivingHome := true;
; r! e9 r9 m+ ^& w" K, P$ N; D: u end;
- `; i+ U5 Q/ k$ e4 O5 ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 f- ?4 ~: e; _9 x1 J part := @.transpOrder;
% `! I) O+ \7 @ part.move(@);-- load part. w$ l" b9 h# [# V) e
@.CurrIcon := "load"; {# S4 u! y5 S
GlobalDistObj := part.globDestination;$ x8 @/ j9 {- z7 w. W3 u" x- Y- L
assignLObj := rgmanager.rgAssignL;7 `/ R) ]5 j1 i' U9 O& n4 h
row := assignLObj.getRowNo(GlobalDistObj);
8 C' w1 m& Z7 u/ a! K if Row = -1 then -- since 70! L* c7 J% `4 z9 s$ m- U& W* d
if lan=1 then
/ j9 h, A X6 L; M0 F( Z- S! c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' Y6 P6 k3 m8 R- f. G
to_str("in der Andockstation: \"",?.~.name,"\""));" L( N: u; A4 v) A# o% I
else
. a$ V; k" N: Z" }6 R3 y8 p promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. i- d3 ]- L8 r1 ?0 X) R+ _ to_str("in docking station: \"",?.~.name,"\"")); - a9 g. [' n h% z- J1 F; j
end;1 w6 [, n5 c4 o! i. P
else
u) A W" x" c1 R2 _ @.Destination := assignLObj[1,row];
) x0 Q5 |' B+ r end;
; I' k+ F; y; [9 Q W" a" q# K newDirection(@);
! c, n8 M! F! y) S# m4 v4 T' v @.HasOrder := true;
, s& s8 A- g& O3 h% E% } ^8 P end;0 r5 Q3 h: ^0 u3 ?( X: L5 V
end;
: a6 J" K, l+ ^3 V; U/ i3 ]: vend; -- of the method/ q, c( F' w M' a
|