/* called by: entrance ctrl of the object 'track'8 v: S0 B! }; W" E" ]6 C" T* f
*/
9 Q% \! ~" a9 @8 ~( R2 tis
5 \5 z4 Z* p, M) m G1 A part, GlobalDistObj, assignLObj:object;row,Lan:integer;; f/ \( v1 R; p5 x
do4 I, [% i: s7 A, H( f3 u% u, i
Lan := rootfolder.Internal.Tools.AOLlanguage;' j& J- |, S1 e4 @
if current = @.Destination -- else return
8 |5 r; _" d+ u then
, S4 `4 S4 h& y9 \& O @.Destination := void;$ v9 R- \) c9 ]! {% a* J: N
if @.occupied then
& S7 g% c1 h) ^4 X* b# p3 J part := @.cont;
! D7 v2 F4 u. x4 t" D" B* z @.transpOrder := void;
! s0 o+ f" Y. {8 R* [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; z3 {; a3 n& t9 Z* v- F @,root.eventcontroller.simTime);
8 H( `: h2 \, q. v @.HasOrder := false;" X2 a j5 a" C% f" ?+ E8 x
@.DrivingHome := true;
, Z( i! p$ }( Z6 @/ p! [4 s& Q# ` rgManager.tryToStartTransOrder;
; Z. \5 y. w2 }# B) z9 M if @.Destination = void5 `* O4 |' B' [1 r
then -- no transport order for vehicle @
( ?/ s+ n& t1 X7 ?! L @.Destination :=
7 |! q: ~# `7 O- `$ R1 f6 Z rgManager.nearestFreeStation(@,track.~);, l! M/ u* O/ _5 W+ V
newDirection(@); 5 Y0 y( U4 K x, \" T5 x& j# U
if @.Destination /= void then
% Y# A8 ^/ \; L, D @.Destination.NumReservation :=6 x& r8 o! Y7 h/ @
@.Destination.NumReservation + 1; Y% _; e; `" q( k6 J! \# ~
end;
% R3 H3 m; a6 Q. a$ M; A @.CurrIcon := "drivingHome";
. @& g/ e% D8 l @.DrivingHome := true;
6 E. [8 R: t$ h# a/ P% e8 V end;. D4 }% {7 m! i/ t& K& `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) [3 r3 |- x) O& ]( F. t: i4 N1 O
part := @.transpOrder;
; ]8 k, y5 |$ i2 K2 ] part.move(@);-- load part0 t& |6 A4 l+ O8 O) C( O% B, g' S, k
@.CurrIcon := "load";
" u9 u* Y3 ^. V7 R O GlobalDistObj := part.globDestination;
6 W/ n6 s' e4 U8 t assignLObj := rgmanager.rgAssignL;
& N+ g# d0 f2 f$ q row := assignLObj.getRowNo(GlobalDistObj);+ V8 z; T o% ?& F% Q0 x
if Row = -1 then -- since 70* H' Y) m7 t, P, u/ B+ k8 t
if lan=1 then
8 |( i% n# P3 w* G+ I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& ?/ o8 O% k0 Z8 J
to_str("in der Andockstation: \"",?.~.name,"\""));' V% E1 T/ e; w* x
else
: w3 e2 }/ ^8 z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
s( a5 i4 q! p5 v% `: z to_str("in docking station: \"",?.~.name,"\"")); $ S* R5 @. \7 `
end;0 h, u4 D9 j) l# ~. O7 `
else& p' N2 S3 l7 z$ }* U7 y9 o; N
@.Destination := assignLObj[1,row];% C/ }" a4 j0 \7 J3 R
end;
3 f- d5 n& G2 r- a7 m: y) S newDirection(@);: e8 q6 v4 d7 h+ {6 C' z2 m3 T
@.HasOrder := true;1 ]6 N0 h) B. ?, v. r" u1 S% Z
end;
$ e# Z; I. O6 s% e2 v end;7 d, B8 q6 v$ j1 v( G, }6 A7 K
end; -- of the method
+ ?# o' v* ^4 y7 ?/ } |