/* called by: entrance ctrl of the object 'track'
$ n) |3 ~# T; h2 b*/# t) p4 g. d! H$ }$ v6 c
is( `5 U; i6 \& t+ v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; \9 A! @. p/ N% d3 z6 |' Z" M
do
a/ v- n; h O: O% f, c2 V1 G, F Lan := rootfolder.Internal.Tools.AOLlanguage; w+ O9 ?) D( b) P u5 P
if current = @.Destination -- else return: A5 i- g, s5 |2 t
then" N9 |$ p& U; }7 y5 V& R
@.Destination := void;& [3 Y6 W9 Q5 n* v
if @.occupied then. U. ~ G& e, s2 {1 E. v
part := @.cont;, g3 v" G9 X8 c) O" E6 c
@.transpOrder := void;
: Q/ Y; M a( t- k3 V$ x7 H5 }0 ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: L W, S9 U% F! j3 W @,root.eventcontroller.simTime);
# @5 h O& m) I# t9 T9 D# a7 }$ c @.HasOrder := false;, B8 o$ ?0 A1 l% B; a) C
@.DrivingHome := true;
2 a+ ?! k( a1 _, P1 X" C8 T2 x rgManager.tryToStartTransOrder;9 k$ u0 Y/ J9 P2 I
if @.Destination = void
* y/ E: z( c9 O- S3 P) l; M7 X then -- no transport order for vehicle @- D( _5 k: k* D. M @, T
@.Destination :=
9 A) L& {% u, _% k! V rgManager.nearestFreeStation(@,track.~);+ T& r" q/ c: A9 m# u
newDirection(@);
% X& R+ L+ {+ k; i3 o if @.Destination /= void then6 d( H6 v9 e1 y. g6 D; q! R
@.Destination.NumReservation :=0 q4 c. Y0 i+ m8 T
@.Destination.NumReservation + 1;/ M1 |! h: I+ ~* d: A( ]1 P9 H
end; E8 n7 m7 `4 m6 }. c
@.CurrIcon := "drivingHome";
* N, k2 m. h0 S. [8 K/ K( v+ e @.DrivingHome := true;) R% G6 M [$ {8 {& g
end;
& y* F9 H: N% M' ~: I else -- the vehicle @ is empty, both vehicle and part are in the same dock station* x% }: N4 y k b
part := @.transpOrder;( x# b& y* D$ c# r+ i1 W# \
part.move(@);-- load part
* F# n5 {" j! B+ p, `7 G8 J @.CurrIcon := "load";
- G5 s; n8 T: q) E* ? GlobalDistObj := part.globDestination;
" t& N8 U: f* f r3 L9 M( _. h% O assignLObj := rgmanager.rgAssignL;
9 s) y8 j: @9 w# ^ row := assignLObj.getRowNo(GlobalDistObj);: H, f$ m J6 U; s+ W. f1 [1 ?
if Row = -1 then -- since 70# X% a7 V) U: X6 C% W6 D" j6 P c
if lan=1 then
2 \. R; t7 w1 C0 w4 \" G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! o# M1 Q' h1 V# o @4 l
to_str("in der Andockstation: \"",?.~.name,"\""));1 A* b$ [, U! ^$ E: U" x
else
0 D* J: {5 a8 u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' T% @$ e, S* c" m- t7 p7 Y
to_str("in docking station: \"",?.~.name,"\"")); % V1 v; W& ?# i9 A7 `
end;
% X8 S6 o8 Z8 A# e9 u& } else
& H+ \5 L, q) }' n @.Destination := assignLObj[1,row]; z% R' T2 Q1 z9 n- Q9 T
end;
* [; b! F( G! O newDirection(@);9 a4 b5 |; U: ]# {8 F& x
@.HasOrder := true;) a* \' d8 Y4 f9 o
end;! g7 _7 ~8 i8 \* q
end;. D$ U; V& \/ t6 @6 ~, S; g
end; -- of the method$ Y) z' G% ^8 K( W1 L/ R7 G; }
|