/* called by: entrance ctrl of the object 'track'
( B: i$ G7 R3 j+ `# ~8 y*/
& P+ Q5 q9 t& A. [3 i/ Y6 Zis5 j9 A& N7 @3 J1 p# w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. ^7 C! M' ~3 m- bdo' ?" ]( f% Y* J% h0 C+ P
Lan := rootfolder.Internal.Tools.AOLlanguage;5 a2 m/ z7 N6 H& m8 b1 _7 Y
if current = @.Destination -- else return
/ \3 W" p- w2 W8 `: U& K" l then) ^7 \: ?$ \0 {. W N
@.Destination := void;
' U+ Z* O4 p5 c9 B" H& `* Y Y if @.occupied then
f) ?- M! `& [4 {" W part := @.cont;( M) x' e e- j4 Y
@.transpOrder := void;
8 G0 w; x: |/ r- _5 \9 U Y- g, J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- p8 `. @) @$ I0 B* T9 d* f0 J9 w2 v: e @,root.eventcontroller.simTime);
/ q5 j+ M2 k3 X7 R @.HasOrder := false;: t" d5 U) E# f9 N% _ o8 H8 l
@.DrivingHome := true;
4 t/ w/ y/ ^; E' Z' B) Y" G" [ rgManager.tryToStartTransOrder;( S, m0 o# X1 Q/ V$ d# Q- j
if @.Destination = void
& \" |( q) ]1 ]' A2 L. S) z then -- no transport order for vehicle @
+ R V8 e# C9 U& Q! r, d/ a @.Destination :=5 K! I1 c. `+ [# V( c: I, m) F
rgManager.nearestFreeStation(@,track.~);
5 t" ~& ?, N0 y- ]7 Z newDirection(@); 9 {9 r7 T, T2 {: }, _) R
if @.Destination /= void then
: p3 X: A" x r# l. j5 @ @.Destination.NumReservation :=
! `) _. I. o3 D0 t& O. G) M; N @.Destination.NumReservation + 1;
& j4 [2 A0 f6 n" r end;: o* P% W& R+ M8 D' Q4 i0 R: U
@.CurrIcon := "drivingHome";% K4 [* Z; f8 M2 `1 T
@.DrivingHome := true;6 W& j: u" J% C+ }' S
end;
& h2 |) s- g' ~1 C! C+ ]+ G else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ y/ Y: u' i, K: \3 E1 V4 M# f5 j. E part := @.transpOrder;
; K2 W- t" q7 Z5 A part.move(@);-- load part- V( ~7 v3 f- i. X, T
@.CurrIcon := "load";7 | }, K$ E) Y9 g: ~
GlobalDistObj := part.globDestination;
2 e( ^% }/ F1 H5 n$ t5 v$ U5 Q) h! g assignLObj := rgmanager.rgAssignL;; u3 Y$ j* D1 [: t& [+ Z; B+ o' H# ?
row := assignLObj.getRowNo(GlobalDistObj);
- f- `; ~, C. o; U( m, _6 M" g7 I6 ~ if Row = -1 then -- since 70/ [ L5 k- x$ o: u, M+ _& u+ t
if lan=1 then/ m% R5 `8 c5 c. f# i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; W2 Q J7 z" ^7 }5 N2 [/ }
to_str("in der Andockstation: \"",?.~.name,"\""));: Y6 }( K: v+ E5 u! I
else
9 t' H' m4 d! ?) m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% F& {( n5 G" P' y& h0 c E to_str("in docking station: \"",?.~.name,"\""));
1 `6 \" C* e( `& J5 R, T; ? end;# B7 x2 S2 ~3 r' h. G% r& y
else
6 l, a( T1 w2 R( G8 _) }- ]5 D @.Destination := assignLObj[1,row];, O T& [% C5 J" l8 f# r$ L: f
end; 0 i! S' Y% g1 C- X3 U& x* \* V, g. t
newDirection(@);7 R* p. q0 {- N
@.HasOrder := true;! {8 m* A( m5 D& c& n
end;
7 B* N/ u! `- T, D end;2 w' g9 v" J0 u( Z" F
end; -- of the method W' E- K5 a: s5 S. M4 w
|