/* called by: entrance ctrl of the object 'track'
) b/ S P# X5 v7 P*/
# G3 c5 h1 E+ f/ I& E# [is
2 p8 k+ ]$ w; r7 f% p- V# `- g part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( o; r0 X+ J3 Ado9 K" u8 d5 @, m! @/ C w+ B' @
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 q2 W8 n4 R! `" D2 M if current = @.Destination -- else return, U2 m: w; ^2 h/ ~/ a' b4 n
then
$ N. u* k" C5 P3 P; f/ A @.Destination := void;% B9 a0 d$ j' m* G' {
if @.occupied then
' w7 C9 q8 S( D5 U$ C part := @.cont;
/ ?* {% v* @* m @.transpOrder := void;
+ n3 W- k* _, R/ o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
P H6 q' x4 \$ ?& |3 L/ u D6 m @,root.eventcontroller.simTime);) M+ L" x S9 M0 D, d1 t
@.HasOrder := false;1 _6 U0 _ |3 e7 A2 o
@.DrivingHome := true;/ ^2 q# [7 @7 p9 q, G: \# \
rgManager.tryToStartTransOrder;
9 M- R. u6 D+ Q; ^/ V( E! A" B! r' d if @.Destination = void
$ w( z1 ^" e8 _0 s: C then -- no transport order for vehicle @
) q# w9 P m* ?2 g3 l( E) B @.Destination :=7 M* x1 @" k# m( i1 @
rgManager.nearestFreeStation(@,track.~);9 w/ J% o& ^" j4 p
newDirection(@); P: F- p8 }3 j
if @.Destination /= void then
8 j* s, a# C# T4 ?& s' ] @.Destination.NumReservation :=, W- E2 G! D5 h2 F- g! L8 i1 [, W
@.Destination.NumReservation + 1;5 z: d/ K. _# v# e
end;7 o p4 e/ H5 q1 e7 n
@.CurrIcon := "drivingHome";
: E+ _/ O) q" N [9 m) a; z8 R1 Z G @.DrivingHome := true;
" Q% P7 M7 @7 I0 f9 ` } end;
; Y! f* R! I4 t7 h I$ a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ Q9 o6 t. @" y. c part := @.transpOrder;& C* L. v' l$ u! L6 `; C
part.move(@);-- load part/ N' S- X2 [8 X6 j2 q
@.CurrIcon := "load";( O) `! Z/ O" }, H! I
GlobalDistObj := part.globDestination;9 Q E- w( c& B7 i, L& x
assignLObj := rgmanager.rgAssignL;
2 z) _# B9 |' h row := assignLObj.getRowNo(GlobalDistObj);
* S/ l! Q9 g N+ e9 y( J if Row = -1 then -- since 70# B5 L0 z$ H* s. I* f8 S
if lan=1 then6 k1 |4 M+ Q4 r' I8 _( f5 u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) S8 e" C8 y- Q* | a8 c to_str("in der Andockstation: \"",?.~.name,"\""));. | A- _. t- y2 o! ~
else0 N0 o0 O2 v& \* a' E4 U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
M% q1 I' ?6 t0 }& G4 B to_str("in docking station: \"",?.~.name,"\"")); 8 o4 ~! r0 l5 X3 v
end;
% v5 L, w1 b$ o; T4 { else* ]( d+ q8 [5 h9 a0 \0 G% d
@.Destination := assignLObj[1,row];4 c, q k1 F9 ?$ E9 w0 r
end;
8 E T1 J- F+ H/ x2 }& A3 f$ Q newDirection(@);
9 l& a: _9 g2 c" P! x @.HasOrder := true;* W9 ]4 a$ K0 t
end;
% s5 Y! `- u& l1 R end;8 @! y% x, Z) a! P4 \
end; -- of the method5 k0 p" m0 Z6 B! r& @+ D
|