/* called by: entrance ctrl of the object 'track'
* c3 H8 c6 \- o3 k*/
( U h2 S. ~, S* S$ t% Mis; _- u1 W. l! Q/ }1 _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& m1 q/ B7 }9 k& A# `3 O
do) {- t: x2 {$ v
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 G0 r3 ~! b- o if current = @.Destination -- else return7 s- f' O/ r3 l7 k
then: I0 i' Q* l+ K& M2 Q i
@.Destination := void;
2 d0 n* M; z5 r% H+ _( {, q4 k4 n if @.occupied then0 m. e6 V# T6 c+ t' ^' K
part := @.cont;* f+ |2 u F4 \$ n5 v- w3 \
@.transpOrder := void;8 m0 d v: p+ F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* n- t5 n& c, C; G1 d @,root.eventcontroller.simTime);+ v+ ~. m' D B! Y
@.HasOrder := false;0 k- h, j& Z/ }
@.DrivingHome := true;
w: U( v5 A4 D rgManager.tryToStartTransOrder;
+ \2 _9 l: H1 T4 H' `0 I9 L& k% r: k if @.Destination = void5 ~9 Q% h' x1 b2 k
then -- no transport order for vehicle @* W) ] ~" _" H
@.Destination :=9 Q" b0 t2 U m9 U+ h) F
rgManager.nearestFreeStation(@,track.~);5 o/ g& ?! s- }/ U% h
newDirection(@); ) ~( Y( D v6 Z+ t K4 T
if @.Destination /= void then
) y4 f; [3 m, H. U9 t3 V @.Destination.NumReservation :=
j: \; B( P$ S" h @.Destination.NumReservation + 1;
5 U% ?$ J! f4 R- { end;: s8 @- z, ]$ i$ ~; \( I$ v
@.CurrIcon := "drivingHome";
; F( F0 p' B4 D$ z) Z2 e$ n @.DrivingHome := true;9 F. ^# z! n4 |- q$ A
end;
& P( s4 ~5 K' |, c) P else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 ^5 z) A! Z1 m% |4 e, N
part := @.transpOrder; ?$ T o1 d$ W1 f
part.move(@);-- load part
. V; u; G. _& e# t5 U @.CurrIcon := "load";
w: A3 F" i. p6 ?! }# b GlobalDistObj := part.globDestination;
$ D1 |% l- ~" ]6 c7 h' T# h; [ assignLObj := rgmanager.rgAssignL;
. \* i9 @5 [) H( f. i% d row := assignLObj.getRowNo(GlobalDistObj);
0 h# H4 r% x2 D, c if Row = -1 then -- since 70+ f- c1 O/ i7 V; b+ c) H* `5 Y
if lan=1 then' |- x9 E1 g5 [/ _- e0 s3 ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. \7 `' K. `! _1 j/ o5 x to_str("in der Andockstation: \"",?.~.name,"\""));/ H* \, [. j) c- J" R* \6 D
else
' r) ~) _3 X. t3 X+ e. | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( w2 P, u; k7 H. c, r to_str("in docking station: \"",?.~.name,"\""));
5 q8 q& R" N7 m5 P1 E# I end;
: \" v e% k1 E( p1 n' H else, P5 X3 l4 e5 ]% X, p2 T. m
@.Destination := assignLObj[1,row];- D# S. S( X7 n3 N' ?" z
end;
4 I+ u1 l8 G: S3 O newDirection(@);4 d. x' E' n7 z, E# t* t A
@.HasOrder := true;4 Q& i4 ?2 }; u6 }0 C
end;
" w( a) R# X% [, R. ^! O! H% n end; s7 x& S9 g. z# e
end; -- of the method, f* h# A9 Z& T
|