/* called by: entrance ctrl of the object 'track'1 q2 E, x! W( k2 S
*/
1 A9 @% }; ]! dis
/ _- D1 l: i# S. ~! X. L part, GlobalDistObj, assignLObj:object;row,Lan:integer;. o* D( L+ I U- Y1 ?7 j( I
do$ y; y9 s: }0 G- O/ c [
Lan := rootfolder.Internal.Tools.AOLlanguage;
. ~1 R( W/ \# @1 ~ if current = @.Destination -- else return% v0 v' I3 v7 y" K6 F* t
then T/ K1 P" ^3 K5 `$ K% A6 r
@.Destination := void;# p' a7 P* g: O' o/ B5 L' u. N
if @.occupied then
- l3 f" K6 g$ p/ g, g3 y7 b" d part := @.cont;
: c* p3 p; S k ^- J2 D, | @.transpOrder := void;
1 k6 Z$ B8 _, a% m2 _( r% g( U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- J$ \+ W# R1 a2 h+ _# N @,root.eventcontroller.simTime);: N. u8 Q z2 X: b( O8 ~
@.HasOrder := false;
6 v5 g8 h, }, t3 q6 x @.DrivingHome := true;& Q! L( F6 R8 m& b
rgManager.tryToStartTransOrder;6 G& k& R2 l6 t0 ^; d
if @.Destination = void
" O8 e }( O# B. z: R8 E then -- no transport order for vehicle @
* Y* [% q) l7 f# o g* } @.Destination :=) i: i5 z! G. O- A8 J
rgManager.nearestFreeStation(@,track.~);+ G3 W! U" J$ V& T% c* K: J5 `
newDirection(@); + X! Y0 ]/ m4 S
if @.Destination /= void then
: f$ }" P& r: e% P+ G. v: { @.Destination.NumReservation :=$ s! Z2 B0 N7 Y9 e% q
@.Destination.NumReservation + 1;& C, z4 @2 a4 V. s; W" s& c
end; G% @3 i. S; k. _$ a
@.CurrIcon := "drivingHome";+ U- Y$ L( s0 Q9 w; n" T/ |
@.DrivingHome := true;
# _3 X4 i F1 T' A4 i end;* R" z3 |" v: K% e# X( [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* V& D% H I/ r8 }" f
part := @.transpOrder;
* i4 q+ G1 u% b6 X7 h6 Y part.move(@);-- load part
9 \- z+ K4 d1 I, l* X6 m @.CurrIcon := "load";- W: T. D: Y9 y
GlobalDistObj := part.globDestination;
5 V' g0 a& u/ K, D assignLObj := rgmanager.rgAssignL;
% [' m0 L; k5 @. P% r7 M row := assignLObj.getRowNo(GlobalDistObj);
; W( t3 F. }0 z& \ if Row = -1 then -- since 70
6 r+ x" N. ]9 n& r2 m4 V5 a* q if lan=1 then) w$ n" ?- h1 x5 [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 N$ P1 `1 ~$ x6 _$ ~5 [
to_str("in der Andockstation: \"",?.~.name,"\""));6 p' }1 }4 z9 R: `" E+ k
else! \7 P: y2 Q7 h- }3 q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 ?8 k5 X) Q' t& ^3 ~# `
to_str("in docking station: \"",?.~.name,"\"")); . }( E1 X+ c8 `* l# g
end; p7 L1 `7 B7 c
else
# }) b! y( }3 C9 {, S- \ @.Destination := assignLObj[1,row];; _% f3 |. ]! H, Z B% _+ f" i
end;
6 C' d* y4 f9 F; w$ w- N newDirection(@);: Z* X, {$ j( Y+ }
@.HasOrder := true;
5 N( W8 I7 w" ~2 b. H& Y, H0 d end;; T$ c6 v. c$ O5 ^
end;
' G( N0 P8 n# {+ O4 ]: Jend; -- of the method. R" L6 f1 l* d5 @6 S: p z
|