/* called by: entrance ctrl of the object 'track'3 {3 p$ g) l* I4 p4 } r
*/1 R' W' l* C0 ?9 d* M8 S K
is
, j+ A) j# p4 h% k+ @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 S P: h6 \/ I* B9 n, n' ^
do
& s4 F$ {9 n) j6 x5 i0 F9 e Lan := rootfolder.Internal.Tools.AOLlanguage;. L' E( _' B' L! f2 p6 ]- ]/ }6 p3 g L
if current = @.Destination -- else return8 o0 y) o# g- w- q; F; l
then
+ J( u! l5 @8 z/ G @.Destination := void;
) {% p! S" }/ c* K. x% u if @.occupied then" w5 O0 M7 D2 z# U# N
part := @.cont;& P/ s# s; P+ k/ A6 _
@.transpOrder := void;
% A [" y; L( X3 P$ ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 V7 o) L& t; Z9 R6 | @,root.eventcontroller.simTime);; y2 p! Z1 a! B
@.HasOrder := false;
2 e# Y5 w) v# R @.DrivingHome := true;
" A- Y4 G' [- e; Y. E( } rgManager.tryToStartTransOrder;
% ?! U: G. C5 }. g, ^7 f/ } if @.Destination = void
8 _% A, o$ n; `$ c y then -- no transport order for vehicle @' i# O1 m% K7 v) w% w% U
@.Destination :=
) Z3 t m7 P$ ^+ `1 \5 B rgManager.nearestFreeStation(@,track.~);+ P& N: P: ?2 [1 o- R% C4 f: ?
newDirection(@);
@$ D4 x) w( X; s1 ^3 G3 x if @.Destination /= void then( b1 J* Y# S+ U( S" K
@.Destination.NumReservation :=
4 S, u" {2 L7 `5 }* o: ^ @.Destination.NumReservation + 1;, w$ z4 Y7 u' T$ h% J
end;
3 s# A9 y# l4 p @.CurrIcon := "drivingHome";( a3 d/ [$ O* B. K1 Z! x
@.DrivingHome := true;2 p: F' i8 d3 l. T
end;
# ~5 |& B# o ~5 H# N/ R; f3 J else -- the vehicle @ is empty, both vehicle and part are in the same dock station. W+ r% f. v; Z# y4 k
part := @.transpOrder;
_& \2 i+ `: s% J) G [* ^ part.move(@);-- load part
# z u+ y% O( ?; Y" H# N. B @.CurrIcon := "load";( l" x' K9 F; b$ g5 z J
GlobalDistObj := part.globDestination;
4 }- v/ o8 s0 y assignLObj := rgmanager.rgAssignL;
* F, V" f) M9 G4 X* T8 c row := assignLObj.getRowNo(GlobalDistObj);
N i0 |6 n) ^8 G6 B/ K if Row = -1 then -- since 70
- z2 N3 e: _- p' Q5 w; v5 } if lan=1 then
. o+ k2 X& @8 ^1 @4 [* C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," n. r( V# _9 y( f& Q1 r; ^
to_str("in der Andockstation: \"",?.~.name,"\""));! a! o7 I6 Q4 E& }& P- n
else
0 q/ E m& q/ b! b P) a0 e# }6 n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 k1 [' U+ Y- d. G* }: v2 \. N. ?
to_str("in docking station: \"",?.~.name,"\"")); ) _8 n; M& e ]- z, C
end;
8 k- B7 d# E6 f! S4 ]7 U$ {. G7 Y, K else5 q+ P/ e$ u6 n% [; h6 y+ n1 _
@.Destination := assignLObj[1,row];4 d) b# Q$ `3 e
end; : B$ Z; |1 ] a; U. h' r( o& y) f
newDirection(@);
( U! U1 b1 m$ x, v @.HasOrder := true;
8 e) `; N8 t: g$ z0 n end;! q; K g$ ?( b; A8 J8 }
end;
8 ~2 R* K% J. q! P& ]. V9 Fend; -- of the method
: L. E8 R6 y( _5 Q- Z7 H |