/* called by: entrance ctrl of the object 'track'" d) C# b& Q6 d4 M y
*// t9 G. u3 y1 f: [+ `4 @
is7 e) }7 F: u B- M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) \! b- p' V8 Q. W
do
: x1 r1 q8 G+ E! v7 D/ ^) E Lan := rootfolder.Internal.Tools.AOLlanguage;% I8 s3 @- r# u1 y3 d0 F
if current = @.Destination -- else return+ Y' k/ Z$ r) c- b& L& X* o q
then: c. Z4 [9 T$ Q. }- B& K4 C! I, A
@.Destination := void;0 U- b6 O! A4 d: x
if @.occupied then) @2 S$ G1 w, y1 r" D) i
part := @.cont;
E T% q1 X9 v1 E8 P' ` x5 R @.transpOrder := void;
3 S" X8 U8 C; D5 [& s* h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 @0 x) _1 J7 T* W( K/ t9 |
@,root.eventcontroller.simTime);
2 }; B5 `* v; h! d8 l @.HasOrder := false;
! U2 ^* R( V' |( N2 a& { @.DrivingHome := true;' E- B! `0 p/ V" N
rgManager.tryToStartTransOrder;
4 Y* M" w4 W2 V1 f7 J2 i if @.Destination = void
) v3 p E* q. p0 f: B9 D then -- no transport order for vehicle @" S! ~% M3 e3 c: D6 H+ `0 D
@.Destination := a+ Z5 x* M* o. a5 J
rgManager.nearestFreeStation(@,track.~);) c% \& Q8 N& Y. m9 j: e2 n* k
newDirection(@);
( Q2 I- P' X( q( y if @.Destination /= void then
( X4 W! E) z9 [8 H1 g+ f# q @.Destination.NumReservation :=
7 r- Z. K2 c- _0 s @.Destination.NumReservation + 1;
) o+ x0 l3 q3 v" d/ [; S end;% V) }- [' Y: p( D7 d* P" \
@.CurrIcon := "drivingHome";: A) d f: |/ `; u* z
@.DrivingHome := true;. q( E J w0 I! G! d
end;. ~& {+ S% @0 w0 e( F$ t4 v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# i. \, i g" Q+ [2 A part := @.transpOrder;
/ U4 m% |' N$ A7 { part.move(@);-- load part3 j4 R) ]0 @/ W$ ]8 Z7 F
@.CurrIcon := "load";
3 S5 q( b0 n& }& k8 H1 C GlobalDistObj := part.globDestination;6 J; o# X/ _' o
assignLObj := rgmanager.rgAssignL;
' _/ n" p0 C, m% I row := assignLObj.getRowNo(GlobalDistObj);- f8 Q/ X0 v- V: e# Y
if Row = -1 then -- since 70
3 K/ ]$ v1 g' n: E6 [. T if lan=1 then" D' Y$ b* \' G, k" V2 Q- l5 a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& Q- t3 t' r5 X: [6 | p
to_str("in der Andockstation: \"",?.~.name,"\""));- o9 t4 a; f% k6 C: V3 v1 F3 _( I
else
/ C( G# v/ E2 m5 @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 ~5 i: s6 {/ {8 a. { to_str("in docking station: \"",?.~.name,"\"")); . h- E6 J# T. p7 Y- k' n+ s- d
end;# n; H$ N% b$ d1 e4 S0 w. n+ h' K/ J8 V
else. s7 J: F% ]3 Y. x; ]* a
@.Destination := assignLObj[1,row];
6 r) ?( n- J0 Y& X6 Q" o end; 5 }& \* Y* z \- r" R
newDirection(@);
6 S+ Y) L7 x& y& t) w' y @.HasOrder := true;
; Y0 o1 j; ^& j( Q7 A- v. C5 P end;
6 i8 O3 ]( j: S+ f5 @4 V end;
0 C2 m3 @$ f+ v/ P- hend; -- of the method
$ ?& s8 @# Z- E# Y* b |