/* called by: entrance ctrl of the object 'track'
) c3 j N+ k, }9 ~6 o/ Q3 Q*/
% {3 T" W- m* m6 w& n1 Mis( p) }( K0 n+ e% }- h" F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ ^5 \7 W5 j# i0 A9 d5 g. P5 D' `do3 N# R0 q. n8 |2 Z$ j/ M* L
Lan := rootfolder.Internal.Tools.AOLlanguage;
' s8 S/ U% H9 v& c4 I/ O if current = @.Destination -- else return8 n& }$ [2 ?. }! s) C* g( n4 m
then
. |0 P. O1 V1 }3 a% q9 D% X @.Destination := void;* @3 O: W! Y# J8 q* R+ t
if @.occupied then, n9 q$ x5 G- v7 c2 U) A% X& `
part := @.cont;
, |! H4 K8 q; E. N* c5 Q5 H @.transpOrder := void;
3 r" m' t$ G' `( H' {. c4 _5 w9 I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ d4 R: Z2 W3 U3 H1 } @,root.eventcontroller.simTime);
! _% L- Q$ r1 `+ a# a T( B8 O @.HasOrder := false;4 i) j* n" R0 x; l6 K @6 P7 @0 n, }
@.DrivingHome := true;
+ p+ j5 J d) c+ ?4 \ rgManager.tryToStartTransOrder;
& ]* \0 w2 `2 I' ~* A if @.Destination = void5 Z2 ^; f: V" i3 G6 c+ E
then -- no transport order for vehicle @
; t7 _ [$ w# f$ d% D @.Destination :=. t: d+ W: M, ~# j* |0 p9 D3 _
rgManager.nearestFreeStation(@,track.~);
6 n z# [7 {' q& x- v newDirection(@); * R0 [) G2 ?" O& i8 q! ~
if @.Destination /= void then1 }0 }) b2 |$ f: i. A7 M
@.Destination.NumReservation :=
* J4 y1 A6 g8 }4 E @.Destination.NumReservation + 1;; E% d" c5 j7 l# k# `& Y
end;
/ l, B* H5 Y# b8 h, b @.CurrIcon := "drivingHome";. k8 ~ F7 G' W$ I
@.DrivingHome := true;
7 \1 C, l. a2 X2 `+ T1 _2 T end;
6 g4 M- Y1 N, T6 F else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( L; ^% l ?$ Z$ Q1 L9 m% I8 M part := @.transpOrder;
8 O( M0 j: @# G part.move(@);-- load part& [8 z4 W( K5 a8 [. W8 p) T
@.CurrIcon := "load";
' Z1 l5 y& x( ^2 |! \, d GlobalDistObj := part.globDestination;8 E( F- \4 Y K) W9 H+ ~
assignLObj := rgmanager.rgAssignL;
% n" w/ B6 L F* i row := assignLObj.getRowNo(GlobalDistObj);
. L$ Q* ]8 l, s, j( L, I# R if Row = -1 then -- since 704 S5 ~/ m: w4 C6 o5 \ R
if lan=1 then. M8 e1 q% o, ]/ t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 @) H# [# a9 V
to_str("in der Andockstation: \"",?.~.name,"\""));- t! x) F" y+ _7 v- ` A* ` C
else
# H( R' Z% `) \9 _4 o4 ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 g. A/ e0 `1 M; X to_str("in docking station: \"",?.~.name,"\""));
/ R: Q$ S( ^: o0 m& p7 k end;
/ D( ]6 K' Q3 s( R9 ^) ]6 I else
5 F& p% t5 I. i) R @.Destination := assignLObj[1,row]; o* a2 W1 y3 {+ F& Z" ?- R
end; , F/ V! Y: L( i5 h
newDirection(@);- l+ h) ~, O$ L f9 t
@.HasOrder := true;% x( v1 \2 c& Y- p$ ^" Q& f
end;1 r3 p0 p4 j; t5 Y7 c
end;7 S1 O& o$ R# Q- z, h; R
end; -- of the method* v- q+ B$ q( y$ W8 _- O
|