/* called by: entrance ctrl of the object 'track'+ D( R$ i1 B2 o1 C* C# f* V5 c
*/
6 _& [5 u9 h8 A# E' t5 P2 w$ Tis; M7 P) U# N* Q L; Z6 v# C: q+ g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* y1 e+ I" L4 T1 G8 D
do
9 x3 A$ L+ N( L6 v1 }5 x Lan := rootfolder.Internal.Tools.AOLlanguage;
1 \: a7 N7 ?; C/ q* [. e$ M* v if current = @.Destination -- else return
! J2 t1 a% Q1 C) k then0 h6 U8 n3 t r8 l
@.Destination := void;/ x- E7 V9 L7 ]2 I L
if @.occupied then
9 ~9 [4 m4 u6 A+ p D" n part := @.cont;: \ j/ o3 d' [" b2 Q6 ~
@.transpOrder := void;
; ^( T3 c7 D" c0 r* ]5 b1 w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 {3 h& J \7 V% R: ?
@,root.eventcontroller.simTime);) B6 w |1 `6 h( A% D: g
@.HasOrder := false;; i0 C6 C7 F1 z+ d: }$ O! Z5 `
@.DrivingHome := true;
% B2 \% s& N2 J* d rgManager.tryToStartTransOrder;* C, r$ y5 E. c
if @.Destination = void
, x, [0 `# m& w+ X) J. B then -- no transport order for vehicle @2 r M: u9 `1 f# F7 t6 x7 P' V* {
@.Destination :=8 N: v$ m' n+ F, ]* ~
rgManager.nearestFreeStation(@,track.~);* b5 `1 m/ M) m. L) j
newDirection(@); * Q* M' N! C2 K* f/ y, c" L
if @.Destination /= void then* O* N! p1 W/ L z/ t
@.Destination.NumReservation :=
5 X, K1 N9 l' K( m( Q/ u \ @.Destination.NumReservation + 1;) ~1 a3 t6 h5 @4 I: y
end;( _; v5 ?% \4 s+ _. y
@.CurrIcon := "drivingHome";
" x4 s' u; Z; S* \1 [) e! _. Z5 m" a @.DrivingHome := true;- w( H' }" T8 V; f I
end;
( F6 b' l/ @$ {. x4 w else -- the vehicle @ is empty, both vehicle and part are in the same dock station! n0 Q: q. y! M, B% h
part := @.transpOrder;. \& {4 A, P: z1 ?2 L
part.move(@);-- load part+ k. g* F1 \) G" x3 y
@.CurrIcon := "load";* s* V$ O2 b* E! b$ ` Y" ^) K7 `
GlobalDistObj := part.globDestination;
0 l- }8 P( G' ?3 [7 \9 Q& A3 ?; } assignLObj := rgmanager.rgAssignL;# ~3 ?+ ?$ h2 v
row := assignLObj.getRowNo(GlobalDistObj);; r6 i) H7 \. b$ S
if Row = -1 then -- since 70
) y( w0 G" I$ j J+ `$ |) J if lan=1 then$ \! j. D+ ]( h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 y7 u- A( o# w; J" ^ ^
to_str("in der Andockstation: \"",?.~.name,"\""));" L% I5 K' U# y' r
else0 \8 V" j4 Z3 y) w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 `& m7 X5 @% K3 H( T
to_str("in docking station: \"",?.~.name,"\""));
; r4 Q K+ h$ E end;
* D* e. M# O b$ O else
; F8 W, @# s0 { D @.Destination := assignLObj[1,row];- j) R5 S9 ]% @" I' P
end; , i) w4 C+ b4 g8 \
newDirection(@);
; w" {7 s' {! z @.HasOrder := true;( q/ ^& ]# r i- v7 {
end;: d* n2 \! b: ]' @. U
end;
' L6 q' `6 S. C3 {end; -- of the method) p! K5 K' n1 s% P; o+ {' q
|