/* called by: entrance ctrl of the object 'track' o# B D3 L! r s7 q1 D; R: l
*/
# Q- Z0 s( E+ t3 E0 @( K3 W/ I; his! d. e' R/ g1 u+ r" X% S8 F1 u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ R, e$ G5 S) N5 Sdo/ P4 T5 B6 I) q3 O) {
Lan := rootfolder.Internal.Tools.AOLlanguage;6 C5 A3 k8 z1 j- d/ i! ?
if current = @.Destination -- else return
! @/ E$ L% M$ P# Y+ G& A then
- ?% u5 z: X; `" ^$ V4 ~; u' w6 Y @.Destination := void;5 A4 ^& c1 z* d
if @.occupied then% q2 @, D8 _$ E# L3 M7 |
part := @.cont;
, a: W1 N# ]( P/ r5 \' k% Y @.transpOrder := void;
5 y7 {2 t6 B7 K. |: ?% k& W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: T) y8 S7 _/ c0 v+ M' Y @,root.eventcontroller.simTime);4 y2 |$ z- t9 V5 w, }( ^* M) i
@.HasOrder := false;5 K, s+ r: p3 X& N" l* N* X& Q
@.DrivingHome := true;
" [6 G1 N; I7 ~5 O$ G0 o# ~4 x: K rgManager.tryToStartTransOrder;
$ N! I& k1 E* _% G if @.Destination = void
: { a( j: C! X1 b+ n then -- no transport order for vehicle @
1 z* Y: K7 p# X8 _ @.Destination :=
7 c& `6 Q3 T# A% u3 h0 @) { rgManager.nearestFreeStation(@,track.~);4 I f2 A9 ~: d- m1 Y+ R! o
newDirection(@); % l$ N( b! Z" N6 _
if @.Destination /= void then
8 B6 q5 T! U- C' j* z @.Destination.NumReservation :=
/ t7 ^5 E. M8 c# f @.Destination.NumReservation + 1;( A' L( H. k$ u5 `! G. `, S
end;
0 R" ], I k- @ @.CurrIcon := "drivingHome";
% R; m/ b C' A S2 J @.DrivingHome := true;
0 `! T( K6 v- s9 f( d$ T( H& I' p end;
, ] L$ w$ f; P. a7 N1 ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 D: z; N; e- h7 \9 o* U part := @.transpOrder;/ n$ _4 G+ Y; d t9 d/ L
part.move(@);-- load part
0 D) d3 c4 x$ }. L- `" a @.CurrIcon := "load";
) A6 [) k: E/ t/ C. M GlobalDistObj := part.globDestination;: [/ ^3 c6 T. Q% f1 {
assignLObj := rgmanager.rgAssignL;& w+ H4 w6 S8 o/ ?
row := assignLObj.getRowNo(GlobalDistObj);" |2 n% Z( D, G6 n8 q
if Row = -1 then -- since 70
, k1 |: K" }! V" s% B if lan=1 then3 p3 }$ K( F* z4 N S1 i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 N/ ]7 K) B: d! K% Q4 \4 E. n to_str("in der Andockstation: \"",?.~.name,"\""));
. `* o, R# G% Q( X else8 x6 o9 u6 k% O
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% u+ ~( r" D0 ~ t: G
to_str("in docking station: \"",?.~.name,"\"")); $ C3 m4 D$ n8 r1 ]5 z- L! B6 p
end;- g5 t9 {0 {# b' G* T! h& K7 {
else
( I) ]5 O. ^8 m* o5 @- N/ o @.Destination := assignLObj[1,row];
+ l: |3 N. J8 l, S2 a9 h end;
3 o2 B! y: I+ |2 F; C/ i" |( d6 x newDirection(@); H' x2 K; |8 p( X6 v2 v& Q, K
@.HasOrder := true;
7 S- l+ t' F* s, x" y end;
; {/ c7 G! a& ^8 t/ D5 h end; E* W" e, ^+ c5 ?
end; -- of the method$ J, u9 q. O8 X. M% M, s- e+ {6 }
|