/* called by: entrance ctrl of the object 'track'2 U/ n- S* B4 g4 c: E" T; P2 f
*/
( F$ ~4 x6 W# i5 i$ b$ ]. cis
* H7 {& F" m! w. ~" f part, GlobalDistObj, assignLObj:object;row,Lan:integer;: R5 |; G4 k5 ^9 y' Q H# e
do9 m! C* h3 }* F: ^
Lan := rootfolder.Internal.Tools.AOLlanguage;( W9 E& {+ R# G* x
if current = @.Destination -- else return
& v: l7 P& c7 ^+ Z then
; `4 `& \9 ]+ T. W# Q* t @.Destination := void;
4 u8 N* W0 Z0 _: N9 { if @.occupied then
3 Y2 [3 q& ~. s9 Z; T' `8 `+ ` part := @.cont; p+ v, L, U, E9 l" a6 ?. c% o
@.transpOrder := void;
% j4 }: ?/ x% ]7 R7 {+ L/ O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) P4 ?' W" |8 Z! Q4 X& s3 a* } @,root.eventcontroller.simTime);/ h) V5 y: _) o; h
@.HasOrder := false;
0 F1 R6 V% p) Z8 Q( P' G4 s% M @.DrivingHome := true;
) E- T9 N. T3 o# X: w, n rgManager.tryToStartTransOrder;
3 H1 n$ z9 z' c0 J/ ~& m1 u if @.Destination = void2 H; k' a7 `% O3 P. a5 G
then -- no transport order for vehicle @( Y# h8 m& f8 n
@.Destination :=
, l2 z9 E/ z' @4 x' N rgManager.nearestFreeStation(@,track.~);
8 h9 T1 V( T& _. S# F! l newDirection(@); ; x' W, y; r1 Z$ r9 K9 J0 b
if @.Destination /= void then
2 Q; U& O' T( ~$ e, z, F" g @.Destination.NumReservation :=* h- b0 D6 V7 `) W9 a, r
@.Destination.NumReservation + 1;9 H0 \; o0 X+ }: V$ h
end;: A5 o4 a0 E' c6 P5 @& m7 V; N
@.CurrIcon := "drivingHome";$ L# E& F' M2 g- h
@.DrivingHome := true;
1 {8 d, E& z+ I F$ `( H7 j end;
& w; |6 B" c# Z9 Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ U3 B3 j" u" ~6 z) g/ _ part := @.transpOrder;( P) P4 G& [% \% E
part.move(@);-- load part
) Z1 j$ r% r, g2 i$ G6 q9 G @.CurrIcon := "load";* l$ A5 I- f, P4 _
GlobalDistObj := part.globDestination;
9 R, J5 ^% Z+ `/ _" q, ^ assignLObj := rgmanager.rgAssignL;
0 u% P3 ^; P" B7 x5 e' X row := assignLObj.getRowNo(GlobalDistObj);
$ k5 a% B( ?" R* K V8 A if Row = -1 then -- since 70
9 q' \8 ~) i% Q5 X8 u% N if lan=1 then
$ P6 {' U H1 R% c) D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( ^) c7 u9 `. D* X- V1 a+ M' G
to_str("in der Andockstation: \"",?.~.name,"\""));
, }9 g8 V2 k4 T# R5 G% O else
: e, a" o+ m$ A( Q; Y5 n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 T5 k6 Z/ k4 _0 R) N8 O" H* | to_str("in docking station: \"",?.~.name,"\"")); + y2 u( o! e% J% @: Z1 Z" W
end;
# f- m: t% V8 I% t* v5 V1 y3 p& y else
3 v. A& }' T+ @8 N$ T% v- C @.Destination := assignLObj[1,row];
9 b% k0 C+ q ?$ g, t5 g/ x end;
8 ^2 f( C& p: z9 i7 `# n4 g newDirection(@);
' P6 c6 ]1 a7 r& S* w- _: F @.HasOrder := true;
$ f" D! L- V0 I( u- Z+ ` end; G1 A' g5 ^# u/ z% V. D" I
end;* u, y: `! K# u/ J) N# X2 l
end; -- of the method
3 _9 e/ D" s; M* j& ?3 }# X; @: N% z9 a |