/* called by: entrance ctrl of the object 'track'
1 Y' ? g. v% ?. Q1 O- O$ w# e W& g R*/5 O/ C# E( Z E1 z2 X
is
7 J8 a l* g7 e0 c! R# `# q% K part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 {0 ^' M& ]* ?% O5 n! A
do
4 V& h. I4 ~- B1 s/ X4 P, t Lan := rootfolder.Internal.Tools.AOLlanguage;9 o' x) m" ?7 _; ~- s o+ V
if current = @.Destination -- else return
: C2 F* A0 ~, u5 @! O# B% k then
! d/ a; [4 O2 L8 ` @.Destination := void;" M1 _8 z; b, ^/ o) \
if @.occupied then8 K6 L( j0 O* i3 w/ r
part := @.cont;
3 G. y5 x( K% O$ k8 W5 w% t* c+ } @.transpOrder := void;
% y4 L0 U2 l8 y$ ?) G part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 g- \4 c& m& f& [( X @,root.eventcontroller.simTime);; z$ ^8 }3 R' x" N9 W) Y0 n
@.HasOrder := false;
0 Z( y: Z; U0 M: T( {, U @.DrivingHome := true;
, B7 Q' P7 m ? rgManager.tryToStartTransOrder;; ^9 V& L7 X! [
if @.Destination = void
; V& D8 Q: \) T4 a/ T6 p: z- a then -- no transport order for vehicle @
# P$ f# m! n+ z/ G# J; P1 g0 `" { @.Destination :=
, \# H! ~5 ?2 v: p0 q" N5 N rgManager.nearestFreeStation(@,track.~);
8 r7 e6 J& R) f( H3 d: X newDirection(@);
4 Y' a, g7 L) \0 _& a$ p. b if @.Destination /= void then
* q. R0 ?/ z" o& g9 e2 w @.Destination.NumReservation :=
' G& l/ ^- }& Q @.Destination.NumReservation + 1;% p$ j q' J/ d; M( u# x6 i
end;
. s, a7 x/ Z# k' ?1 J# z @.CurrIcon := "drivingHome";
! p5 K1 b5 ]) W! ~6 B. ~ @.DrivingHome := true;
% g' d$ l. H4 _5 w% k1 V( R end;
; Z7 {- K7 t" G2 S j6 o) A! f else -- the vehicle @ is empty, both vehicle and part are in the same dock station' I: Q$ W, c5 [5 \0 s
part := @.transpOrder;
" [7 S3 h' d* M. u. C" b9 @ part.move(@);-- load part. N( Q& I# `3 v; ?( a
@.CurrIcon := "load";
7 W u' l$ ^, `1 S GlobalDistObj := part.globDestination;% n8 B. f+ Z' E: l6 G
assignLObj := rgmanager.rgAssignL;9 f# [, H1 _) n: h9 R8 e' x" z
row := assignLObj.getRowNo(GlobalDistObj);& v- A1 \' K: { Y _3 S+ r& J9 P
if Row = -1 then -- since 70
; s% }( M2 k" f3 M- I if lan=1 then; i- ]1 ` ^; y6 X: M1 j( [2 _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 h5 d# M0 N9 V+ r7 y* c, r4 A to_str("in der Andockstation: \"",?.~.name,"\""));& J3 H* ^7 `1 C/ _( ?
else
$ }) K2 m+ s1 O/ E5 B) ^ y9 Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 r! f* v' `, G+ p% O! `. x to_str("in docking station: \"",?.~.name,"\"")); . d* s. O& T9 H- _, Z! J/ P5 e
end;# J7 ]" A# m2 n4 M% L f
else5 ~* }+ X8 s1 v
@.Destination := assignLObj[1,row];
) _: y! K3 @1 s1 \9 Z U% i end; , \0 u; o% d0 u! D8 O# L% }
newDirection(@);
5 R0 v# }# s1 i4 ?2 Z+ T @.HasOrder := true;) w- O; C9 Y" y/ |
end;; `- X# ^, x; Z7 N" K0 ?5 s& p
end;& L( Q. |/ B3 J U) J/ q
end; -- of the method# `- K3 r7 m% K" Z, Y8 S
|