/* called by: entrance ctrl of the object 'track'" D/ M* h5 m3 Y, L* V6 R
*/5 q& b; F2 Q. S$ a
is
% \4 N3 H9 F$ {* d Y6 {( S part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 w; l' T: e9 I/ j; _0 m% Y- s
do
( J- E# q8 s7 f" m Lan := rootfolder.Internal.Tools.AOLlanguage;
. ^6 A) k' P9 x( L; N1 }' C% ` if current = @.Destination -- else return2 f1 t% X& Q( k% b. n9 e' \
then6 D2 n$ Q" C& L( A) L: N( N5 R L P
@.Destination := void;
& h* g/ `" O/ G! U/ V' g# k if @.occupied then1 B( `- D! u8 ?( s" R
part := @.cont;) Y9 `# b( H. k
@.transpOrder := void;
! F$ a/ V4 q3 r4 ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 u D/ c! J/ y) L3 P
@,root.eventcontroller.simTime);
2 O2 I, P5 a, ^$ p8 R; Y8 W% d' r @.HasOrder := false;
1 L$ x# b! y( O @.DrivingHome := true;$ I) ?* q& M$ I: P/ \
rgManager.tryToStartTransOrder;
3 w' ~" v. ?8 n- o if @.Destination = void
3 i& J- c# O. W9 \# J4 S then -- no transport order for vehicle @
; M( o- O' p5 U. k& h! v, K @.Destination :=
/ r6 w# t* ~0 D rgManager.nearestFreeStation(@,track.~);
4 z8 B* e0 `- M5 x5 \2 U newDirection(@);
4 J) i+ u( }8 x+ D" D if @.Destination /= void then9 O5 V: C0 {) t. H
@.Destination.NumReservation :=+ @; {; o0 j+ M- r
@.Destination.NumReservation + 1;
+ a, l& S: ]' f5 h8 | end;
5 K$ B9 h1 L1 u8 C6 E @.CurrIcon := "drivingHome";* m1 Y8 `: p9 F& I7 z' w6 Q
@.DrivingHome := true;" e7 @# e* G' g: D I6 Y$ g
end;
; M0 q$ O4 F& V8 D: X else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ P% ~# Z+ E7 h3 a! ]* k
part := @.transpOrder;
4 r5 v3 @/ Z1 \ part.move(@);-- load part6 r( M2 c% Y3 k1 F
@.CurrIcon := "load";
4 Q1 y( p$ M e5 X GlobalDistObj := part.globDestination;
" `: t+ { R" h k: O; h E# h" k assignLObj := rgmanager.rgAssignL;
- I5 g& Z; \" a5 D1 K2 ^2 w; z row := assignLObj.getRowNo(GlobalDistObj);
& | h+ \/ z* |. I& D0 G if Row = -1 then -- since 70
3 I7 a2 _& g/ E/ N: Y [" b if lan=1 then3 I9 y7 H! ]1 i p. R8 x# Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 e! B* R0 O( f1 W& q) T4 K to_str("in der Andockstation: \"",?.~.name,"\""));
( ^' C+ s' Q+ ?' `6 }7 Z8 Z, Y) E else4 T! ?6 v* F( Y+ G% W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& s8 {7 W9 Y% X, y% G, Y" n
to_str("in docking station: \"",?.~.name,"\""));
5 G/ J3 c, v5 z end;
; P, o" \# i$ I$ F* F else0 Q6 C; ~' o. u; L
@.Destination := assignLObj[1,row];& k5 O( {" g/ l& \; O$ ?
end; & E% A9 ?* T" z( ^1 \, ^$ [
newDirection(@);
0 b6 ^7 H* T/ F' `1 \) n& _ @.HasOrder := true;
* [3 N# e* s: [+ h end;
! W2 X+ X, v% [: _ T" a8 I( E) Z end;
$ ]6 x7 `( h& M1 Mend; -- of the method9 R) Y& a& R" \% E$ ]' S$ q6 V
|