/* called by: entrance ctrl of the object 'track'
) V0 v& i2 z L6 u8 j- b8 c*/
- }( [5 C+ j9 I/ Y* `is
/ I1 T0 o0 p6 k7 x8 W8 q ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;" @. s) r. r% H B- f
do
1 K9 I7 x( S) \! [ Lan := rootfolder.Internal.Tools.AOLlanguage;% A( }0 K6 o8 A; K4 d" v; o9 p
if current = @.Destination -- else return: Z7 a+ u+ u, Q6 {
then$ ~& P% }; K/ s0 h4 a2 m) q" z) [$ u
@.Destination := void;
1 S3 T0 c. L; H) i, D2 T9 [ if @.occupied then8 l6 u5 I* H# J
part := @.cont;4 W3 f/ `' h2 w: C% j8 R
@.transpOrder := void;
% m8 \2 O+ Q7 V3 _% ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- Y3 J9 i! B6 q4 u
@,root.eventcontroller.simTime);
+ W7 G; x& a) c: e/ c @.HasOrder := false;
( v) E& k5 |& s8 Y9 {' X) {: P( \3 u @.DrivingHome := true;7 d8 {. n5 y) U1 P* L- b
rgManager.tryToStartTransOrder;: ?) M: b: Y' B; A. C; a+ X0 Y
if @.Destination = void; D8 G7 R) ^, |, O: S
then -- no transport order for vehicle @- R5 q1 Y: [1 X9 x! U7 A0 K
@.Destination :=
. H& a* g( x2 N S8 I/ u rgManager.nearestFreeStation(@,track.~);
/ F; c. U* Q* n. E! M newDirection(@);
5 c& k1 E% K: ?- V4 _2 k8 c' x4 L if @.Destination /= void then0 c- x% P, B4 ^4 C- P$ _% Y8 f
@.Destination.NumReservation :=$ d0 }6 D2 n0 m8 V1 i! }( t2 `
@.Destination.NumReservation + 1;, x6 i- Y% a. Y
end;
7 u0 m: r$ T h @.CurrIcon := "drivingHome";
( E' F3 a+ L! d* m) s( \9 T @.DrivingHome := true;# d( i1 S( j7 S; @3 Y2 T& l
end;
; C* R: P) X$ ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ G7 \, }& {: D part := @.transpOrder;
4 C3 L0 }( V I, G# u1 d/ L) V part.move(@);-- load part Q, w3 D1 w' Q: U4 q0 L2 P) i
@.CurrIcon := "load";
" G* r5 r! |* B GlobalDistObj := part.globDestination;
1 n3 F9 h% Z% o% u& U. L: } assignLObj := rgmanager.rgAssignL;; ^" ]% Z) n7 [& q7 Q
row := assignLObj.getRowNo(GlobalDistObj);/ b% P. X, E! q: z. w
if Row = -1 then -- since 708 N Z% |7 E7 F: L: h- |6 }
if lan=1 then( j( @2 @3 u3 _2 C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 l! P4 y$ i8 v% W to_str("in der Andockstation: \"",?.~.name,"\""));
: ?8 O! g: U. c3 x& N else
# f, P$ z* K$ \, O# k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), c5 o6 m8 g( ^0 H/ Q5 Q
to_str("in docking station: \"",?.~.name,"\""));
3 i! T6 {' J. w% n5 `! ]# N end;
' E0 R2 g5 C0 ]7 \2 b- N) B0 k else
* n+ _. e+ p/ K) U F$ P @.Destination := assignLObj[1,row];
0 b) F5 U' c4 M end;
/ v+ n1 I" P6 } newDirection(@);& r; ]: |& w. |9 d/ k
@.HasOrder := true;
3 H0 h) Y# F) w/ m e& { end;# U5 s* S3 l8 ?
end;, n7 t5 s9 K \: o4 b
end; -- of the method) G' W) a$ A X7 C( v
|