/* called by: entrance ctrl of the object 'track'
5 }4 T6 h" _9 U! e7 ^5 s4 t*/0 |' B2 X) W8 `! I" R
is0 i ~; K+ k& \4 \+ l
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. U# \ m. T) X& ~3 U5 Udo8 O W8 \( h' N% F9 m
Lan := rootfolder.Internal.Tools.AOLlanguage;
, h- Y5 N& Q! z }3 a1 J if current = @.Destination -- else return* j: i% F- L8 c) D; F' p% C6 a
then
% t! u% d9 C U @.Destination := void;
9 J; p% T' x/ W/ Q+ V: { if @.occupied then
" Z' W0 f U. y/ L# C3 R part := @.cont;: G7 h& T3 c/ ~
@.transpOrder := void;
4 h* ^# [5 j( N7 U a3 m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 }; C5 `7 p( u, M$ ~" y' a @,root.eventcontroller.simTime);
9 d- n, d9 W6 f$ J( g: f4 N @.HasOrder := false;8 Q( X1 \$ o* v9 T# h& o5 ], T
@.DrivingHome := true;
( S1 u* q# D' [6 i8 m rgManager.tryToStartTransOrder;
3 G9 n, X4 f. M if @.Destination = void
$ S& g% {1 E( p, f3 C then -- no transport order for vehicle @
4 w; j! a( g: S) D5 x& V @.Destination :=
" S5 O2 S% o9 u2 Q: I8 \ rgManager.nearestFreeStation(@,track.~);
9 |$ a( o' W" c! F) u8 x n5 Y newDirection(@); / |5 _, z8 M6 u0 G2 x$ w
if @.Destination /= void then
9 A L2 ~0 S% o @.Destination.NumReservation :=
( r3 y p2 M5 b2 V- | w) r @.Destination.NumReservation + 1;6 @6 ^, i9 T2 D9 R) V
end;) b5 @6 W+ H! L" q
@.CurrIcon := "drivingHome";* \$ J9 Q% o4 G* k
@.DrivingHome := true;1 G7 Q* [ V" r. W) x5 {* L
end;5 {6 c8 X1 j- B1 x0 b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- V- Z, ^: a1 u& n6 V
part := @.transpOrder;
k9 y1 P6 m1 M0 e" x- z) R part.move(@);-- load part- p: g; J7 n. i
@.CurrIcon := "load";4 e+ j. E1 `/ i- f3 y% | e w j
GlobalDistObj := part.globDestination;! x' l9 Y2 b) W
assignLObj := rgmanager.rgAssignL;
! T) h# B/ t d( z row := assignLObj.getRowNo(GlobalDistObj);
9 l" e+ z' D/ B" h! m if Row = -1 then -- since 700 J- S: A) C% y( z5 v S* x6 T5 b
if lan=1 then
; w* T* o5 I6 C7 E. s" R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! a% q/ E G3 M& t1 ]- S to_str("in der Andockstation: \"",?.~.name,"\""));
' K4 g- k! O& i5 F9 R else7 R S! y% V. q1 g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 |2 a1 K- W" W; _9 P% R: i to_str("in docking station: \"",?.~.name,"\""));
( W) d+ g8 j3 L4 G' } end;9 ]8 z( Z7 {: u. f: J
else
! @4 s+ }. `/ F/ h# c7 ~; h- ~% e1 ?! {( N @.Destination := assignLObj[1,row];. E' @2 g. F& `* U: S
end;
6 f) W: H! O" w) { R newDirection(@);, T! H7 n N: ]0 c
@.HasOrder := true;
6 @8 V2 e0 ~/ X: W( [6 H* c end;) q! i1 P2 s% \9 Y! D
end;
- \0 `( s, O# a: Mend; -- of the method
, X% u) W2 p. `/ R0 H# { |