/* called by: entrance ctrl of the object 'track'" W. e7 I/ {! {- p" _4 }
*/
{/ h, ?* D2 {2 T, F2 a0 A9 l# Lis" J% S9 g$ f8 y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 w- _3 Y& V" p. C+ _8 { Z
do
% J0 Q9 T! Q! D( k+ M Lan := rootfolder.Internal.Tools.AOLlanguage;
1 }3 U; o+ `1 s if current = @.Destination -- else return* j# Y' _/ o1 _
then
7 w7 ^; k1 F7 k8 J3 u" Q9 X @.Destination := void;+ D8 Z( i$ D" I6 j, w1 A7 U4 `7 o
if @.occupied then% Q3 U, L( o8 H K3 f$ Q
part := @.cont;; R9 z& _: A& Y" z3 N. V
@.transpOrder := void;
2 Q r5 Q4 j: i# G9 H6 J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 `0 A5 C& D- E* q* n
@,root.eventcontroller.simTime);/ J- u2 K& w& C8 t( k
@.HasOrder := false;
4 K4 w6 w2 s2 a4 O4 B @.DrivingHome := true;
7 S- q9 T0 F2 O) @) i1 P$ O, k rgManager.tryToStartTransOrder;
! Y7 P1 I7 G" ?0 d% b if @.Destination = void$ b! S% H( E9 T, I! R% H. B8 p& I# ~
then -- no transport order for vehicle @- z1 ]) t# g# @+ r n3 b" k
@.Destination :=
8 s7 j9 Q2 d! F8 m7 t6 v, M: X rgManager.nearestFreeStation(@,track.~);
$ B9 j) F2 D& E3 z newDirection(@);
+ F, e: S, j' @ if @.Destination /= void then. s7 ?- z! T% \7 E0 ~3 R
@.Destination.NumReservation :=, x) m" |5 S" v" M& R `. n0 D
@.Destination.NumReservation + 1;8 g" d6 s( }" p; J4 A! p& O
end;
7 @# q4 [# T/ t3 s" B1 P @.CurrIcon := "drivingHome";
& a3 P* \/ b7 O @.DrivingHome := true;
9 x* e! j& W5 s ]( B/ a) Q' j# u J end;
# w5 e: F& A# Z( B( K4 h else -- the vehicle @ is empty, both vehicle and part are in the same dock station' g- Q/ M# }% x6 A' h
part := @.transpOrder;+ t/ C% X. Y' o. A
part.move(@);-- load part
% M: u9 g( W+ A. h @.CurrIcon := "load";2 P& f7 I0 ?8 [! ]" t
GlobalDistObj := part.globDestination;; k; p9 v( @/ b* @
assignLObj := rgmanager.rgAssignL;
- P/ p( \4 l5 m row := assignLObj.getRowNo(GlobalDistObj);
$ s" p+ A& h3 y+ H- ?0 a if Row = -1 then -- since 70) O: `. c- S9 \
if lan=1 then: J% y! r' s7 E; s) h1 T" \- z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 u5 _5 t' w& @$ Z" P, v3 e, R
to_str("in der Andockstation: \"",?.~.name,"\""));
6 m d/ ^$ N A) z% [2 B$ j else m+ v; J) a: e7 k) F8 B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; ~9 l3 K9 X6 G ~% x* m$ b
to_str("in docking station: \"",?.~.name,"\"")); 1 c0 l$ }; U( g/ s, X
end;( G0 w/ ]2 ^! H$ V
else
7 Q! }2 R! Y" a8 |" b$ F. [ @.Destination := assignLObj[1,row];
1 r. K# T! J. O/ \8 o M/ I1 | end;
, \( E: ~9 w- T* _$ i newDirection(@);
" w0 E0 Y0 I( o2 \1 C @.HasOrder := true;3 ]% u, d# [4 C& I2 o; Y' H
end;
* a1 q2 P+ Q2 I. I8 g! w$ X+ v1 Z end;
4 i$ M1 k- T; R5 e# vend; -- of the method
: b J. {& c+ d* B" q2 O$ f |