/* called by: entrance ctrl of the object 'track'
8 U& }, N: P& K, c+ Y* {% @- ?, y*/' B8 M4 ~+ r+ ]! J
is
6 d! b, W) _0 O* _3 V& m" a part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ @ l& Y" X) x4 p
do4 r! e2 z& O$ A I* v
Lan := rootfolder.Internal.Tools.AOLlanguage;
* z: h/ T! W0 z0 [7 C if current = @.Destination -- else return* Z9 \! Y5 |4 N% P
then- p! O( T6 Z+ [3 U3 {5 B
@.Destination := void;
9 @! P! i' l1 c7 Y1 G% F if @.occupied then
3 P3 P7 H1 v, f; P7 N4 x- a f part := @.cont;
2 }; i9 ?& J9 [ @.transpOrder := void;
. c/ O; v [% S) y# q* T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# I5 {* C: u0 \+ l' ]
@,root.eventcontroller.simTime);1 I6 |" Z3 u: V8 C0 G& r: L6 ]1 J
@.HasOrder := false;
, ?. p* _ f- `. v2 A! V @.DrivingHome := true;
; j% m" [* V1 Q8 d3 v rgManager.tryToStartTransOrder;
/ a. C0 r( a; D; \; b5 x if @.Destination = void, J5 U7 k9 Q+ |4 g/ J6 @9 p
then -- no transport order for vehicle @' E) X7 ^9 J; d) |
@.Destination :=
+ W" y0 J$ n4 b rgManager.nearestFreeStation(@,track.~);/ @/ K; A9 q3 r& {
newDirection(@); 6 }- d; g ]8 k# o! f1 U
if @.Destination /= void then
5 A# n$ q" ?3 R+ x; j4 S! U t @.Destination.NumReservation :=: |' Z7 Y- I8 H" n, d# p6 f3 Z
@.Destination.NumReservation + 1;$ Z, [2 m; s; T% b; L$ d7 w: O
end;
( m* U3 ^; ]5 L @.CurrIcon := "drivingHome";# {& G4 U. R- A, g; E8 ?
@.DrivingHome := true;) ^2 g- ~# P7 D9 I. L" e0 G
end;
( H. B6 I, V/ g* E/ R) n else -- the vehicle @ is empty, both vehicle and part are in the same dock station: n" k) ?% m# {* r3 L. l9 c& {
part := @.transpOrder;
! {8 E/ Y# a8 a part.move(@);-- load part
7 K4 k7 A: V; U- S) u. M @.CurrIcon := "load";0 x, i8 v5 X1 C% \" ?4 X5 {6 O
GlobalDistObj := part.globDestination;
6 @9 M/ |0 b! x assignLObj := rgmanager.rgAssignL;
0 @& ^8 [7 z- F0 a row := assignLObj.getRowNo(GlobalDistObj);& F2 ?, R* w+ U! m r% ^! Q
if Row = -1 then -- since 70+ @1 t3 U& O l# d& j* M
if lan=1 then
! U( f0 I/ P. R& I9 }+ D$ n* \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- G7 t2 N9 y5 I" O p( E" C) M1 k- Y to_str("in der Andockstation: \"",?.~.name,"\""));* \1 w. l0 L* Z# z5 b% k1 h1 V
else6 Y- r$ }- u( k! _5 V2 A# }3 k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 u! p% o4 _; u. { to_str("in docking station: \"",?.~.name,"\"")); 0 p" T6 E& j7 a+ h S0 r
end;
; S- ^# U0 O G6 A0 h! K! w else c0 T" ~5 P5 c# ~* D' K
@.Destination := assignLObj[1,row];
6 c, j( e2 d& e9 Z end;
O9 L. Y; p. Q& V. k newDirection(@);- c0 T, ]6 B6 i9 e7 n( B" _# F5 h
@.HasOrder := true;
$ Z! K, {2 x8 t9 w end;* i3 ]( d; z( J+ U6 Q6 X* @
end; j4 w T2 V1 @8 l* u f
end; -- of the method; E9 q+ o D% A' u% b
|