/* called by: entrance ctrl of the object 'track'
( T. b7 t; _: r*/
/ N5 t( v0 g" `6 Yis9 F2 T) e4 ?" a/ o- o, ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 K/ @3 m" D4 ]; z! F& c8 a
do
2 g2 z9 r0 X0 \) t1 }* K7 e Lan := rootfolder.Internal.Tools.AOLlanguage;
5 J) Y( N! Z2 p h2 Y- k2 [ if current = @.Destination -- else return% K; R" s8 _8 A% e
then* [0 r! o. d: p/ F) w5 b
@.Destination := void;
8 U1 R2 y8 f. g* q; u) m) F7 Z if @.occupied then
( {; i5 O, p. l1 n5 L- U# @* {) m- o part := @.cont;
$ b1 m; g: H b: A- K8 g1 c% Z- V, t @.transpOrder := void;
0 {+ l+ I) H1 R4 K( e6 W$ y/ J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 n$ }: D5 r% P6 _1 f$ e/ Q @,root.eventcontroller.simTime);
3 W8 w4 F0 [2 s- @ s$ [2 @* j0 t3 ` @.HasOrder := false;
1 t% T# v8 n! a @.DrivingHome := true;
, C; S- G; x6 k8 x3 ?7 n( T rgManager.tryToStartTransOrder;3 p2 w3 o$ @9 e8 `% Y
if @.Destination = void t2 f" G& h: d8 J
then -- no transport order for vehicle @: o$ V3 h& Z H- [& j ?
@.Destination :=
$ @4 h' @: o I+ u rgManager.nearestFreeStation(@,track.~);
, u8 s6 {; @$ _- f newDirection(@);
5 e$ g' e% l- H0 c if @.Destination /= void then+ L7 R# Z9 y! u. ?$ m( {
@.Destination.NumReservation :=. S: t, J7 g3 h& {+ m
@.Destination.NumReservation + 1;
* Y" W# F1 j J6 H U' P7 d" [ end;3 ^1 w6 h4 O% R
@.CurrIcon := "drivingHome";
0 D% o2 L2 g( v8 U) c @.DrivingHome := true;
* `& Z J7 w5 u8 G" d: J, t# O end;% Y1 I/ B8 N6 l1 }% s4 ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; Q- v# A& V$ l) H, a% i: Y4 X part := @.transpOrder;
/ d; ]% k- [& E) F part.move(@);-- load part
+ G# s7 I- V2 ~5 f2 a @.CurrIcon := "load";6 b5 A: ?3 z( }' Z1 a; n
GlobalDistObj := part.globDestination;
; s$ r5 S9 \/ J$ l! J/ e assignLObj := rgmanager.rgAssignL;0 t9 |! F& ^5 y, }! Z% l
row := assignLObj.getRowNo(GlobalDistObj);
9 c( G* c; \2 W# ?( N( M# g5 z if Row = -1 then -- since 70
6 \5 a6 \0 j" Y% e' A9 ] if lan=1 then
9 W7 @# e9 P: U1 F- E! g H& ?3 M$ U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 A8 i+ P8 w8 J to_str("in der Andockstation: \"",?.~.name,"\""));. c0 d) K& H( o5 _/ a7 \
else9 v. D' b. D4 i; z% n% _! A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' \: e7 j& O. w J( V# |
to_str("in docking station: \"",?.~.name,"\"")); ! R/ [$ n9 Z( {9 s; w
end;9 Y: e7 r8 k8 m6 Y. p; Z% P
else2 T0 x h `. u- b2 z; T6 ], R
@.Destination := assignLObj[1,row];
4 X2 |; d8 \" Y/ U7 N: A% \ end; 6 j- J1 x8 O, a. T
newDirection(@);
8 b+ B( }3 t' X5 @; {7 g @.HasOrder := true;
8 z, F$ F5 g; \4 b0 B; X end;
9 J4 C1 P4 R# c# a# t7 k { end;
5 B2 Q& L$ E2 Bend; -- of the method
7 N$ }, J) L- v. a+ N |