/* called by: entrance ctrl of the object 'track', u+ E! p8 w2 _; i: c1 \+ }0 \" q5 _
*/! u3 |9 b; w- L6 o8 T& }3 n" n3 h
is
0 H* q. E& a- _" R% F part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ k g* v' g+ o+ Z7 ?" Q; Cdo
7 m$ s+ t: W; X$ P" L8 P6 l1 G3 d0 x; m Lan := rootfolder.Internal.Tools.AOLlanguage;# r3 H6 l: E! C' R+ M
if current = @.Destination -- else return3 V- Q3 L, W4 E
then6 N' E' V2 |, T. ~* b
@.Destination := void;
8 y, N) ?% D1 g$ L, b if @.occupied then/ j$ C' @8 } ^
part := @.cont;
' s4 m2 |3 @9 P9 I5 i) N0 ] @.transpOrder := void;
" U3 {# E$ O9 l$ S3 b# | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- e- q* h: U5 }4 D1 p6 Q# z8 w7 Y @,root.eventcontroller.simTime);( W4 q! B0 B b- G9 ]
@.HasOrder := false;
2 x1 ?, v" @! U; ?. g. b% [ @.DrivingHome := true;
+ X ~. c. W! Y! A% I rgManager.tryToStartTransOrder;
1 Q7 _. H: G6 P) x; R if @.Destination = void
. }% u8 a' |7 \" } then -- no transport order for vehicle @$ y5 F" N2 z1 D+ r) m! R
@.Destination :=
5 G# x- L9 v3 H2 s. b" P rgManager.nearestFreeStation(@,track.~);
! C6 d9 j% ^, L( s newDirection(@); ! _2 j- ^5 U1 K+ a
if @.Destination /= void then
' {* i, R2 k* Y, ] @.Destination.NumReservation :=! U) @* l/ G) ^+ y$ q( [9 S
@.Destination.NumReservation + 1;
# d2 m! W& ?' U: r u) [* w* N end;
- D1 S: P- {4 w @.CurrIcon := "drivingHome";% z5 ?0 H( z; W( t' Q5 S `3 s
@.DrivingHome := true;+ p3 z1 S) B, w
end;
6 P' u6 x$ V3 H/ { else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ b; }' f1 U; [6 \. O part := @.transpOrder;
) X% W9 S) V% l \ part.move(@);-- load part
$ Z/ b. Z- c% l; H5 P @.CurrIcon := "load";
' [1 A- w5 r2 b9 `0 g GlobalDistObj := part.globDestination;9 K/ r7 b- B: {# ^) p+ ^ W
assignLObj := rgmanager.rgAssignL;
$ v# M8 _; Y/ {2 t) m2 @ row := assignLObj.getRowNo(GlobalDistObj);9 Y8 m) e+ e/ J5 D
if Row = -1 then -- since 702 C3 P) Y4 f# y3 B/ J+ r
if lan=1 then
1 L8 w; m, r: ^$ J+ R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: x1 M7 P& H$ h! x
to_str("in der Andockstation: \"",?.~.name,"\""));
: P3 g) i1 L( I else
% Y" E- l9 c$ z; d2 K- J1 w3 f% P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ M3 C- E3 A( n to_str("in docking station: \"",?.~.name,"\""));
+ k1 {: F$ k' m/ N: H( |7 G. w end;
- D8 }4 Q* I( W2 I) G) b else2 _- o+ u3 V, z. z- v( t* e3 g
@.Destination := assignLObj[1,row];& r7 N& M( Z1 @& n# q, W% x
end; : k: T* l9 r6 y g: h! c
newDirection(@);8 I* \) Y5 I# F' r
@.HasOrder := true;
" \1 q+ D: Z( @! u end;
' h6 a, w1 U5 `) W. v# A7 r9 D, t end;: F8 L4 o* u8 \' G$ x+ h* R
end; -- of the method" s: R$ Y, H& O8 L* t9 ^ g
|