/* called by: entrance ctrl of the object 'track'
/ \: E3 I; j) e, s' Q- d. y% q3 _*/
% a! c8 t/ k; P7 gis
* s" h+ E7 K$ C4 P part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 C; S0 ~# d9 c9 { |% G! I% [do3 u8 P+ H0 S: X/ t' `
Lan := rootfolder.Internal.Tools.AOLlanguage;
, H/ g. r% J7 Y' q# ], P0 d$ l, A( q if current = @.Destination -- else return: x7 b' |6 b4 L
then( {' y B0 z u6 S
@.Destination := void;3 P1 {: O% g: \" e3 o
if @.occupied then) L" o$ X0 N C+ G& W7 v( ?3 M
part := @.cont;! n/ V, T: p' d8 Z+ T
@.transpOrder := void;" {* P# A( O" G/ m" n* ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 |# N* I0 v) ~0 _+ P @,root.eventcontroller.simTime);0 u& m4 {) D2 I* _, n
@.HasOrder := false;
% E% K! B' b4 A/ F @.DrivingHome := true;2 m* j3 @% g8 z% B' _4 F
rgManager.tryToStartTransOrder;
" W# `2 x( y3 I' B4 } ?9 e if @.Destination = void
6 c" Q7 B! J( p# N1 Z then -- no transport order for vehicle @: `( X/ A7 Z$ Y* n- J
@.Destination :=- @+ k1 f/ h. M4 j4 C" M& p
rgManager.nearestFreeStation(@,track.~);0 f0 u# n- `: I1 {8 V+ i1 r
newDirection(@);
& P- Q( O# ? f. E5 a4 p if @.Destination /= void then
0 l1 h; h; }+ P @.Destination.NumReservation :=' k+ `8 b2 L- i9 u% f0 ~
@.Destination.NumReservation + 1;9 \2 r+ a4 K- k8 {' u" G
end;' Y9 o" q- ^4 |8 \
@.CurrIcon := "drivingHome";
$ h1 S5 x5 e. C% Q l @.DrivingHome := true;$ ~' ]; L1 ]! G0 j
end;
" ~3 z9 o- f! C @0 B1 u else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) T- j" Z2 j6 g( o% C8 O) \ part := @.transpOrder;/ u: j/ C% u& y$ r. | V
part.move(@);-- load part
: Y, F3 f: C8 I& } @.CurrIcon := "load";
2 q$ \! F1 _2 i0 x6 ^ GlobalDistObj := part.globDestination;
/ j0 b' h* ~' k# X assignLObj := rgmanager.rgAssignL;& n+ X. H8 Q# D. t% l
row := assignLObj.getRowNo(GlobalDistObj);1 h7 ^) h' Z, H( L
if Row = -1 then -- since 704 E+ L) c r! H$ x& t3 {
if lan=1 then8 J+ S' v1 r; l3 `% x. U' a/ |
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ L& l/ X6 P( |0 M! N `2 R+ i to_str("in der Andockstation: \"",?.~.name,"\""));6 Z ~: d, `8 a! F- u- Q/ }
else( A6 i8 t( t% {2 W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( W9 {4 E( U/ }8 O5 k C4 W4 Q to_str("in docking station: \"",?.~.name,"\"")); 4 ^+ L4 E" q7 D. Q
end;5 P) Y5 ^+ ^( }5 J
else
# y+ }; m+ D* N8 L @.Destination := assignLObj[1,row];2 v% u! c+ F3 W: Z
end;
7 B' E8 w8 b( k" i; r% ?2 h newDirection(@);
: e# Z) z5 [4 S2 p @.HasOrder := true;
5 J* k8 L& S7 G9 U# g& p g. G. O! O, g end;" T5 Y8 n2 k% T% t1 ^
end;
/ ^* l% J: s3 A. P1 R/ P% Jend; -- of the method
0 B6 X; m! J$ K5 C+ C( F+ v |