/* called by: entrance ctrl of the object 'track'* N3 {% E6 f6 s+ o
*/
" m* |: S, M- N5 z+ lis
0 n2 V$ v5 I2 t3 Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;; f, Y3 D0 o( T1 w2 _% ?
do
e5 k; D. B p) I7 ] Lan := rootfolder.Internal.Tools.AOLlanguage;
2 X% @: r( O- v& a1 J if current = @.Destination -- else return
# Q5 h5 H6 x; y1 Y8 I then- }# V0 Z4 i& ?+ g
@.Destination := void;
( L- F: d( y3 |5 {* z if @.occupied then4 @! Q- o) ]/ r' n; \: @; G
part := @.cont;
6 ^: b. X- v5 b9 A- j @.transpOrder := void;' v' v! ~% ~9 B; V! r+ {" S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, y% G5 ?3 F+ e1 {
@,root.eventcontroller.simTime);% y( r0 M! _! S5 I+ P; d0 X# |
@.HasOrder := false;
! q! L$ `# z3 ^9 W# Q! Z @.DrivingHome := true;1 y6 k8 c# X8 E0 b9 h! b) y
rgManager.tryToStartTransOrder;
% G7 q% e# V- R& R% G* ? if @.Destination = void
- M h, v- [1 c) U then -- no transport order for vehicle @ _: n" _+ Y) a
@.Destination :=/ M6 e8 i1 L5 L: @
rgManager.nearestFreeStation(@,track.~);4 R! C7 ]0 g+ ^" O, c+ [7 W( O
newDirection(@); 0 {' N6 ]5 n& o
if @.Destination /= void then
6 B- f3 u$ b% P7 [" ] R9 f @.Destination.NumReservation :=
3 M, r6 b) b' Q7 j) |& Z3 T @.Destination.NumReservation + 1;
) V8 d6 D' _5 O( A3 D+ G5 c end;. C I( N e3 t
@.CurrIcon := "drivingHome";% n( Q% N$ f, \: A; ]
@.DrivingHome := true;$ M& I0 k. ]1 W2 C; t
end;# \ g) Y) D: d% Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 m( K+ Y. [3 X2 g) d/ M+ G$ [
part := @.transpOrder;" K. h: @3 m/ T( W
part.move(@);-- load part
- Y h* K! p0 S @.CurrIcon := "load";& i# o* ~# O, @! s5 }4 O" X/ \
GlobalDistObj := part.globDestination;
$ O, z9 g& x2 e3 t! N) \, U assignLObj := rgmanager.rgAssignL;
( P- b3 d& F. i8 x row := assignLObj.getRowNo(GlobalDistObj);
& @" t* e, t2 R4 o if Row = -1 then -- since 70
8 ~& w+ x Z+ q. @) C! H if lan=1 then6 Z( ^* b+ `$ u2 |' j! Y8 W, o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ X X1 B! S& d' q9 d- I& u3 v
to_str("in der Andockstation: \"",?.~.name,"\""));
; b: k9 ] M4 z, t* z0 q* N else; L' @1 H5 w6 F/ |" `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- z$ g6 M, t: ~' s' a
to_str("in docking station: \"",?.~.name,"\""));
: j' Q' d1 s2 Y end;
. m5 b) ^' p. |$ f( D else
; Z k% l. E G: r! Y @.Destination := assignLObj[1,row];
- P" v' d" R O0 L end; 9 ^) Q" J& f1 ~$ v
newDirection(@);1 b4 l$ Z. \& l1 e+ B5 r' q
@.HasOrder := true;
" t8 n2 X. t; h: o6 o end;
8 p( [3 [. `3 J) t0 ?' Z% l& Y1 M end;
; O' z- `) c4 V0 Cend; -- of the method
$ Q/ O0 w+ |' O" H$ U% v( s7 ~ |