/* called by: entrance ctrl of the object 'track'$ l* a, x& i1 V/ i
*/
! S& S) N- V* \- ?is) z- S A9 H. E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( v+ g' |5 k3 z. _$ I6 Qdo
3 E! F# H+ t: `- p1 w% `0 J Lan := rootfolder.Internal.Tools.AOLlanguage;
4 F1 t3 [+ A. K) a% U2 @ Z if current = @.Destination -- else return
% F: _( B c9 m1 ]4 p- p H8 H' p then: t( q, G9 x* x. O% d# B& q
@.Destination := void;* t2 s: N; w0 E
if @.occupied then
7 ^3 e" F, J7 _+ {* Y part := @.cont;' o5 W. |! Z) R \7 _
@.transpOrder := void;7 j1 Z: F2 T+ o0 H: ^$ Y% H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 z5 m; |; V0 r' |7 \ @,root.eventcontroller.simTime);
t! L1 a5 o* V9 B! D. v0 @ @.HasOrder := false;3 t, {. I0 s' }: x6 ]. S
@.DrivingHome := true;7 a8 b$ c5 t3 r
rgManager.tryToStartTransOrder;
; `4 Z4 ]$ }" k if @.Destination = void
3 q# Z, }- W. W& h- a* F' s then -- no transport order for vehicle @
3 ^4 A+ Z) R" A @.Destination :=
# A, d, B" n+ h( S rgManager.nearestFreeStation(@,track.~);
2 i4 S4 N# a6 H8 q$ B H; z newDirection(@); 4 ?" [! H- C& g* F" W+ n L
if @.Destination /= void then
, g/ |. g, Y' F @.Destination.NumReservation :=& ~& F& Z5 A9 {
@.Destination.NumReservation + 1;
- q( z ~' E# `) D$ j( ~& d end;
. v3 [& O \ j3 R* m" l @.CurrIcon := "drivingHome";0 X9 A3 n9 ~: q8 S- t
@.DrivingHome := true;
2 M W' s; U I end;8 {' S, B/ K" y9 H! y# J( d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 q5 n2 p) F1 G, [5 w
part := @.transpOrder;/ M8 j# Y* ~! Q \9 V' `" p7 D
part.move(@);-- load part
$ g) A' E7 Y6 J# K" g' O7 G @.CurrIcon := "load";7 b# V8 X/ q6 U0 ~: {+ v4 A% o5 a* y
GlobalDistObj := part.globDestination;
8 w; l1 D( }8 V/ D z assignLObj := rgmanager.rgAssignL;( h# p, g" e' S9 k8 u, f5 P7 T
row := assignLObj.getRowNo(GlobalDistObj);
3 k4 b4 Q2 ` f) I- z; i if Row = -1 then -- since 700 n" r7 O5 ~6 p. N0 P, r- h* `
if lan=1 then5 s/ b/ \- |; ?% C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 n/ M" l8 x& U, k! V! D
to_str("in der Andockstation: \"",?.~.name,"\""));1 J5 ]+ }% T3 h+ s0 o) g6 u
else4 N W/ |+ x' l$ k# q0 T) E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. [4 i/ ~$ O3 T! ]: u to_str("in docking station: \"",?.~.name,"\"")); 6 L6 I m0 Z6 s
end;$ {- Q, C" U7 R/ P! v
else
4 L- p" [/ Y/ u& m @.Destination := assignLObj[1,row];
; n6 K5 ?5 {3 l7 t* v- C" { end; 5 d0 j$ Y+ d& s$ s; ^: L, G6 X, c
newDirection(@);
/ P4 c. s- c) k @.HasOrder := true;3 S! ~' W" s3 h5 z9 R
end;
6 F5 d3 r8 W" B end;
: `& q, S+ {5 q; |end; -- of the method1 q! W5 O1 u- a
|