/* called by: entrance ctrl of the object 'track'
- E) m. y4 B$ _; G+ C*/3 t! i7 ~2 x( h8 Y& Q" C4 z: r6 R
is
- J+ Q1 S/ K" s$ j3 @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; i) G- }& Z0 rdo
8 d5 l; L1 s5 h8 H Lan := rootfolder.Internal.Tools.AOLlanguage;
3 x5 b5 W+ [- }, Y! T if current = @.Destination -- else return1 r) _% a* r) w1 H, a6 N3 D, ^
then& }8 [. g3 s+ x7 l& n" e
@.Destination := void;
4 s; G# z6 e7 F. P9 `5 L if @.occupied then
& l" R3 C; J2 n$ q: s part := @.cont;
' x) B1 E8 E: s2 }4 m @.transpOrder := void;3 w3 v1 Z% J4 q1 Q5 U' n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," Y3 @- z5 M5 F: x5 [* Z
@,root.eventcontroller.simTime);. D& v% Q6 W9 B- y, b" u
@.HasOrder := false;7 h; G. J ?4 F L2 g
@.DrivingHome := true;
2 R3 J" O- t: W" s4 T$ m! v rgManager.tryToStartTransOrder;
) {( z z m9 K9 R3 ~ if @.Destination = void, O9 J N, o% c
then -- no transport order for vehicle @
) e4 L g% u1 s6 f4 X8 M' V @.Destination :=" T; G" k, T3 L3 A- u' y: k" x
rgManager.nearestFreeStation(@,track.~);( L- O, B* _1 P% q- j
newDirection(@);
4 ?; g, g$ ]. d' K" N) D% W# @ if @.Destination /= void then
+ J8 f* K0 X9 f3 d" s- d, C) L0 ^: b @.Destination.NumReservation :=- _2 F, E- E$ L( y
@.Destination.NumReservation + 1;; f6 J" W ?" o$ z( X- }" |( K
end;9 d3 B( _0 i, F( L1 {8 ^6 N
@.CurrIcon := "drivingHome";
) ?) u2 a7 R. h& b8 A" k3 t @.DrivingHome := true;9 U; f/ u+ [; x+ a" G4 G
end;# ^3 ^( [0 k+ z& ?0 S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 b, s. m2 t7 f: b9 @
part := @.transpOrder;; a7 Q/ o0 M' m5 Q6 \
part.move(@);-- load part7 ]$ F0 L2 H5 q) R6 I( Q
@.CurrIcon := "load";
6 o+ y/ C8 S0 Q5 s, v* J' @; j GlobalDistObj := part.globDestination;
' m8 [' t- U" F9 Q assignLObj := rgmanager.rgAssignL;$ z3 k) ^1 t9 Y5 I9 E# W3 t
row := assignLObj.getRowNo(GlobalDistObj);
& {! {5 H1 d6 Q& S if Row = -1 then -- since 70. J9 \$ i$ w' c1 K$ i
if lan=1 then
, \% N! k5 U) }- L( |; [! ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ r5 V" X/ C3 d to_str("in der Andockstation: \"",?.~.name,"\""));. ^6 i. A% Y9 ~& r( S# r0 v
else L6 O! V! U: c; P" M8 x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& T0 V9 f" {/ q/ f. `6 g
to_str("in docking station: \"",?.~.name,"\""));
R. W0 F$ N0 g! U) E9 E. p3 P end;
6 `9 \% k" A; p5 N0 { else
: `3 ^6 X* \7 P0 L' s) T @.Destination := assignLObj[1,row];3 W2 M0 C9 @# u/ q' L! ?1 `: {) p" i
end;
4 j: H4 E& g& ^9 n1 y+ x$ f newDirection(@);9 ^1 [, Y3 z( v) J! p) P
@.HasOrder := true;
8 w/ I/ C$ e2 N# ]! i; Z2 K end;
$ p) D! J. @: n end;
+ A2 A; d. O% I& k, Z" Z, _" Qend; -- of the method% ~- N% Y: J" s9 l3 R
|