/* called by: entrance ctrl of the object 'track'
( @; `) w6 n& [' \& W5 k" p*/
/ u6 c) ?; _! o* tis
% P( e+ ?8 D! M: z part, GlobalDistObj, assignLObj:object;row,Lan:integer;' P% H$ J6 S: ?! k: e1 a# Z
do
3 j! E# y' K6 L+ v Lan := rootfolder.Internal.Tools.AOLlanguage;: n; ~$ V# k+ ^* m+ |, b$ ]0 B
if current = @.Destination -- else return
+ O3 Z& E3 s. o( b2 H9 c then
( F/ g4 B. ?5 u" f% v. m- g/ v @.Destination := void;
( R8 B" p o) Y2 s3 _ W& p if @.occupied then$ n% @+ K$ ~7 {# h3 ^# p2 x: E6 S
part := @.cont;& J. ^# l, r# g& z; W; O3 o
@.transpOrder := void;
. a: I3 [6 l& E! Q8 S/ D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ P8 `* J4 X) i% f/ C8 c0 w @,root.eventcontroller.simTime);
3 u- o4 F, A2 H9 B @.HasOrder := false;* ]7 ]- K" ~* J3 i, o
@.DrivingHome := true;
5 |3 A' c" E+ s' e8 _( _1 K rgManager.tryToStartTransOrder;
; ]. v* t$ C" \3 Q6 f& ~, E0 s9 L if @.Destination = void4 H6 l5 }$ G8 D
then -- no transport order for vehicle @
: E4 Y4 c7 V! {0 _6 H* T: W6 j @.Destination :=
+ F* r: o) T/ `- j2 ] rgManager.nearestFreeStation(@,track.~);- u$ I5 H7 S- m7 `3 S) h
newDirection(@); $ h) ^7 J) a, Y( s$ {2 Y
if @.Destination /= void then! l2 d$ g2 e; O
@.Destination.NumReservation :=
* F* ^9 ~/ [3 f5 N/ g8 V/ [ @.Destination.NumReservation + 1;
) c; r9 P9 \4 S+ P8 f6 { end;
! l$ d6 x* E- V/ _ @.CurrIcon := "drivingHome";
- Q" G& }6 m: c6 e' @ @.DrivingHome := true;9 ? H6 Z6 k- C0 t% @
end;6 M d+ {* X4 W" p& i4 O$ ^: B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 e8 h) A( }$ L: j8 _
part := @.transpOrder;
. j) V+ ?7 K8 i. N# J% O9 R' N& n part.move(@);-- load part N7 X& A8 [+ d$ g+ C
@.CurrIcon := "load";
: O# ^% f( q& J8 d: n3 T GlobalDistObj := part.globDestination;
( P/ y* H$ |* ^8 \& `8 S o assignLObj := rgmanager.rgAssignL;: I* z+ a( z2 o. P' n
row := assignLObj.getRowNo(GlobalDistObj);
# U2 C$ K2 T4 t$ n8 S if Row = -1 then -- since 70
# m& c3 x% G) V( e8 A if lan=1 then
0 I5 W8 g% z6 F) U$ K4 b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ B+ B/ | y4 J9 {$ Q2 Y1 G
to_str("in der Andockstation: \"",?.~.name,"\""));
( o4 z m5 c5 C& F0 _! s5 a else
' o; v5 u4 w' s3 Z) E% S7 j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' u: H* r' u% l g2 s& B
to_str("in docking station: \"",?.~.name,"\""));
( l/ }5 y- N; _! T( q% X0 j! A end;
0 O- d- T, {. O: r9 Q5 j else5 I: J; }2 G) ?* I7 Q
@.Destination := assignLObj[1,row];9 p2 k6 F, V; H P) Q" i
end;
! h9 r8 ^; n; {; G newDirection(@);
# s4 w5 B* O1 q/ f @.HasOrder := true;
) }; K5 ^; ~( y9 E5 ?! Y end;: E |$ r* C0 \" ^- f+ x
end;- H. U6 R; @" A, U; W' O1 F
end; -- of the method
( j( b# C) f+ v# w/ a! C7 Z |