/* called by: entrance ctrl of the object 'track'
3 k5 E# G5 E. _*/
5 K1 h8 e! n! h0 M, Y: i4 Cis
: _, M3 H7 k6 [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 J& D: {( _) K* f# l0 Kdo( o9 b- o" G. w% X( \
Lan := rootfolder.Internal.Tools.AOLlanguage;3 K- ?9 K! f4 s B! _4 l# R2 U
if current = @.Destination -- else return6 M. T V$ e; K* f
then
7 Q( I/ @8 c% N$ f @.Destination := void;
2 N# @2 _4 x ^( N2 h if @.occupied then
! n$ F/ p5 _1 ` part := @.cont;
3 Y0 N% i- F, r; q1 Y0 Z& Q/ H2 @* b @.transpOrder := void;
% q. Z1 g5 n/ j1 c6 H4 S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 C, |6 A4 B7 V: t" h; f' W @,root.eventcontroller.simTime);
, U7 C% c" U: Z) l @.HasOrder := false;
. w+ o7 `) m/ _$ p/ W @.DrivingHome := true;
8 ` t6 R+ j- r, H/ L. F2 \ rgManager.tryToStartTransOrder;8 a* o; W% `& z1 h @/ _* F
if @.Destination = void' Q- x5 P1 r. E' j5 F: |: Q
then -- no transport order for vehicle @8 R) Y' A" ?0 R x- u
@.Destination :=1 b! }4 d: G( h' X }
rgManager.nearestFreeStation(@,track.~);
4 M- g, S! o' w) p3 o newDirection(@); % R3 u6 o# o- ~( }9 ^8 i' l, W! H/ R
if @.Destination /= void then
' q" l5 U( Z7 H3 O& _0 ^ @.Destination.NumReservation :=
8 {( @* t% Q% e! B$ m: Q( T @.Destination.NumReservation + 1;& @! e# F3 ?0 B- D$ ~7 j5 Y" H' X
end;0 i3 L* g* m: H( b! s
@.CurrIcon := "drivingHome";7 s/ T, z# B3 U, M' r7 n
@.DrivingHome := true;/ A. C8 I5 ]/ _2 C0 h5 h
end;3 X- x7 D, i1 n |) K% A i9 b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 Q2 Y8 r, ?2 k! f0 U0 }4 E part := @.transpOrder;
% K! X' |- N. K- N% _ part.move(@);-- load part
9 C+ H7 B5 i' }' t6 i @.CurrIcon := "load";
. Y q' ]5 o9 [) @ GlobalDistObj := part.globDestination;9 T4 t, |( \ T: d
assignLObj := rgmanager.rgAssignL;, ^0 ?: ?* g' J8 N4 ^5 M! _
row := assignLObj.getRowNo(GlobalDistObj);
x8 ^" c2 t" ^! x; s& } if Row = -1 then -- since 70
1 i# f4 o% k6 g0 e* J if lan=1 then$ l8 s j: s d9 _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 U' M! E9 |8 m) ? to_str("in der Andockstation: \"",?.~.name,"\""));8 T: [* M" A% c9 F
else
) ]- j# \# T' {6 Z+ l5 D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) K2 P5 z% |, Z to_str("in docking station: \"",?.~.name,"\"")); 6 l# w5 Y' @1 m8 u/ i# m8 L/ ~* s
end;4 b" J x) r4 _$ j; T( ^7 N1 d$ t
else! u) u' m" h: N+ v
@.Destination := assignLObj[1,row];
) N3 r3 _( }8 E5 }3 \- j9 ^ end; , e# @" ~* }" ?$ ^/ e: ]* c, }* i
newDirection(@);
1 h, {* F( Y2 X3 v @.HasOrder := true;3 w" O( i7 `& L& z2 d
end;
; N" z; h7 m/ G3 c' h end;
T0 Z5 Q7 y+ r! l% Hend; -- of the method& a C5 K) R( e
|