/* called by: entrance ctrl of the object 'track'
( O3 ], L7 \* X; w' P# n*/8 w+ F7 L- a/ W2 J# ^
is
: ~8 D; h% {; [. V1 k p part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ \& {# n, y% I$ w- b: c; ]: ?
do' t' l0 h# k3 V( U+ z4 _: }
Lan := rootfolder.Internal.Tools.AOLlanguage;& ?% Y$ T0 |2 J! e6 o
if current = @.Destination -- else return8 j- k! l0 s& c6 \6 y+ Z
then
- i. I7 U) W3 _, W2 I @.Destination := void;+ J+ _9 p' ~6 k0 R1 V0 Y
if @.occupied then V# f3 V% K9 {: }+ e
part := @.cont;
) _2 S0 W' C4 R& N1 k @.transpOrder := void;
1 d+ G6 b; K" n4 F0 H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ ]1 S' x( W" |* }( P* A( t$ P$ Z+ q @,root.eventcontroller.simTime);) P0 T" F2 C0 k7 c2 R- _
@.HasOrder := false;
7 `8 Q8 Y+ I3 s1 p @.DrivingHome := true;
& M/ U7 n8 _& d" E* z9 {# k rgManager.tryToStartTransOrder;$ X& k' @$ }, V# ?4 }7 s( y0 h
if @.Destination = void
" j7 z9 Z( p4 Y8 d% u! p$ Q then -- no transport order for vehicle @2 x8 B) q5 d: E! h7 t
@.Destination :=5 I( X; y. D3 R9 N
rgManager.nearestFreeStation(@,track.~);. K, W" Z5 k/ X5 A1 k5 d; O
newDirection(@); ) d( v `0 O# J
if @.Destination /= void then% A% B4 K' A9 R! B% ~: t
@.Destination.NumReservation :=
% `* t. j2 W3 h& Q @.Destination.NumReservation + 1;
0 f9 L: s0 l, Q+ [( n8 ] end;
. _# ?7 `0 w/ f5 e$ e @.CurrIcon := "drivingHome";
3 ]# }: N$ e8 v( R" U |6 l @.DrivingHome := true;
: H* q8 N! Q" z* r' w0 w end;
" `2 `) ?. t1 b- C/ Q2 V else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! Q5 _+ s3 ^$ j) Y3 d, V# B) j' l part := @.transpOrder;
/ T, Z. a# T$ m+ E7 j& ]) A part.move(@);-- load part: U( p0 G6 c R- F5 p; c
@.CurrIcon := "load";
: I1 x, z0 J/ j GlobalDistObj := part.globDestination;% E0 Y' m8 h; G0 M; d
assignLObj := rgmanager.rgAssignL;
H. r: E0 G) k/ B" W* W row := assignLObj.getRowNo(GlobalDistObj);
1 Y4 h: J1 @; e1 @ if Row = -1 then -- since 706 a1 w1 i3 ]4 Y t& q+ \
if lan=1 then
3 t. U4 K6 e+ J# S. ~" F5 S2 [( k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ t; i: v+ Y M z8 L
to_str("in der Andockstation: \"",?.~.name,"\""));
% e) I& ?% l+ R; f2 |. {3 q) Q+ S# J else
! Z) {; S/ N+ r- C! R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& |( l4 T" k' i$ l- I9 n- d
to_str("in docking station: \"",?.~.name,"\""));
7 v, p) Q8 }, h. W end;! O7 H: O3 u+ K, }( v E! K5 e% a3 O
else
" z) j( w+ e6 k1 k- k @.Destination := assignLObj[1,row]; e4 Y" X0 }6 X/ g! c/ L
end; 6 `- ^6 S8 M& k; ]# }/ }8 M i
newDirection(@);& Y0 M) W+ Z1 f$ f) R9 N
@.HasOrder := true;
: W; ~3 t1 d+ Y end;
( K9 D( P- B- g" W' H; q1 [ end;
8 O9 e4 Y* e4 O( Hend; -- of the method( w C& P4 Y$ z% ?
|