/* called by: entrance ctrl of the object 'track'+ r& n2 \4 _5 J% V3 Q7 R$ @1 @
*/
5 A0 l; S/ b. o; [' Iis- g$ t5 G2 q$ J7 p/ a! x! U, j. k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ C B! m' h; b- R/ ~( E0 u% x+ t0 O
do% J0 h3 W" C' ?
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ i8 w/ ~) }' |! u% V0 p if current = @.Destination -- else return
# S" s9 b$ m: o1 X then
9 y' H: i5 i. w- ^" j @.Destination := void;! r+ ]- f% E. h( t2 |1 W$ J- _
if @.occupied then- L' D! n I, `- e2 H: {" {( w# s
part := @.cont;# b4 {; B, o. B! B
@.transpOrder := void;
4 n5 R9 ]& s1 b0 |* v# h7 a; `3 \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% r' n" Y, B* @8 X9 ~$ i- Q; b
@,root.eventcontroller.simTime);
7 [9 g K r. n E' b/ A3 r; Z @.HasOrder := false;
5 M# P, X- S/ i5 ?/ ? @.DrivingHome := true;8 k" U, N+ v, h& M
rgManager.tryToStartTransOrder;! m, N% N" ~ m/ r$ t, d
if @.Destination = void
% C# h0 b- f( m2 N then -- no transport order for vehicle @; n4 b2 M# S R+ J: Z$ E
@.Destination :=$ c2 o5 r8 ^% C1 w
rgManager.nearestFreeStation(@,track.~);2 i1 d$ o% ], T5 {4 k+ i
newDirection(@);
7 Z" m0 p! W$ n if @.Destination /= void then
. H* r+ Y1 N4 o @.Destination.NumReservation :=/ a, S7 q8 K4 ^ v) n3 i
@.Destination.NumReservation + 1;: a0 {/ O" d3 s$ Z
end;
! o' W/ J9 l" N) w; Z$ R, c @.CurrIcon := "drivingHome";( W3 w Q* f9 M" F
@.DrivingHome := true;+ Y& B2 [- w2 m; t0 e, }! b
end;
) \3 X& @& N- X3 H4 r6 e else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 E' `$ b" N7 ]: j/ m; T
part := @.transpOrder;
0 j, K8 C9 O- S) w part.move(@);-- load part
. [* A( H; g( g @.CurrIcon := "load";* l6 y0 a P' W7 R
GlobalDistObj := part.globDestination;
6 _- P- X+ F# ]& f- G- x8 C assignLObj := rgmanager.rgAssignL;
/ f* `8 f3 n1 b' a; d$ E$ T row := assignLObj.getRowNo(GlobalDistObj);; C M" E! s# q2 f, |/ d# W
if Row = -1 then -- since 70
8 W6 d6 `1 c1 f3 q. [$ { if lan=1 then
3 h9 ]9 Y* _$ ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," }0 R' n6 _" D0 b2 _
to_str("in der Andockstation: \"",?.~.name,"\""));
' L8 w% N. `5 h* J7 r else# s9 ?: N6 |( _" q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* c& q$ j* k0 D6 k) \ to_str("in docking station: \"",?.~.name,"\"")); 7 f' A. l% z' K; s* P' s) I
end;
% P8 l9 i! a5 I W else
( z5 K# m: K' l @.Destination := assignLObj[1,row];
9 g" i! O% q+ O end;
9 b7 C- u4 c$ M0 h/ Q newDirection(@);
! T) Y) L9 z( j0 e. h @.HasOrder := true;: R. G0 p5 s+ U: x
end;
, x7 ?8 P# _ i- l u end;, D% B3 T$ k9 n9 Z8 V' k ~
end; -- of the method" m. z9 e! k. {& {; H9 a4 @% `
|