/* called by: entrance ctrl of the object 'track'
" d& M+ l% C8 x3 E; T) R5 S*/
# X6 s# w/ k4 Lis; C. b9 |- M1 F9 N9 z7 e9 D4 d
part, GlobalDistObj, assignLObj:object;row,Lan:integer; Y/ d! d' L4 A
do
7 A2 ^' l2 }, p" D6 e! z7 Z( _2 N Lan := rootfolder.Internal.Tools.AOLlanguage;
* H1 a8 Y$ Y8 t9 Z" l if current = @.Destination -- else return
+ T, I: g" y9 ~& _% n1 I$ B S% e+ e3 D then
& t, J+ S+ h& Q+ H4 `! p1 w% k, R$ m @.Destination := void;
% r* b; F! u' ?% f if @.occupied then
1 p8 q& e* p) p+ W2 T% s part := @.cont;) ?7 ?0 d# @# J0 ^) i
@.transpOrder := void;: I" z( Q' l+ G3 f* S! \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" h! c0 U! Y. D) r& U" t& | @,root.eventcontroller.simTime);
" q; O+ B6 u$ x3 b0 A7 J9 P @.HasOrder := false;
" y$ |1 r' j, \3 [# a @.DrivingHome := true;
u, D4 b" C. X0 t; k rgManager.tryToStartTransOrder;6 x! ?+ w8 W9 c2 ~0 D
if @.Destination = void/ m7 L1 |' E% f: S i2 v
then -- no transport order for vehicle @
: X. ~# _9 f: q' m @.Destination :=' d/ B% c/ w( R" Y$ i
rgManager.nearestFreeStation(@,track.~);
! {+ U; Z; o. { ?% R. w% ] newDirection(@);
5 L$ Y) S4 t1 R if @.Destination /= void then
# ]$ V7 K9 y% e; _4 Z @.Destination.NumReservation :=
' b) [& x% P! N @.Destination.NumReservation + 1;% @5 y/ |: z9 f/ i1 U% y! w
end;
' F6 j8 L4 n7 N% {5 D! M/ n @.CurrIcon := "drivingHome";
, f! z0 T# p: T @.DrivingHome := true;
/ n; }# p, u Z# u- S6 h4 a' L end;6 x# u- B7 _/ N3 H+ z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 k3 S+ x+ \8 T, H8 k$ O% e
part := @.transpOrder;6 R% X) t" d8 f) I q3 S' ^2 x f
part.move(@);-- load part, G1 H1 n& C/ F* _' @) ?
@.CurrIcon := "load";
{ |) D8 m" h, k GlobalDistObj := part.globDestination;
+ ]( G. N2 C; D( z s6 C7 a assignLObj := rgmanager.rgAssignL;
1 p) Y/ F C! n row := assignLObj.getRowNo(GlobalDistObj);- P' m1 L6 p" j( j
if Row = -1 then -- since 70
9 L/ G9 L( Z/ h1 Y if lan=1 then
& X# j! U+ K5 ]- f2 Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% c, O- P9 w$ M to_str("in der Andockstation: \"",?.~.name,"\""));
9 c0 _* N0 R6 T, v else' i7 S/ Z5 v* C0 p0 @6 {$ H- P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 A$ W5 a) }) U* s to_str("in docking station: \"",?.~.name,"\""));
# B2 b4 P; \; ]4 A) n5 k3 M end;3 M& d; J0 ]2 j6 d
else
* H) X$ C( ?/ r) f, @ @.Destination := assignLObj[1,row];& i) i: O; a1 ^ u7 I- `9 R! X
end;
0 q) y* g* @. V4 @ newDirection(@);
8 b0 w7 w. i# L% ~6 J% Z V: C @.HasOrder := true;
3 h- m& ^( J: C. i5 B end;
; Y1 R, j% G5 R* M0 K( T3 B& I5 R end;8 R- o; f4 }) V
end; -- of the method) m" n. j( W4 N( q3 j
|