/* called by: entrance ctrl of the object 'track'
! h: j6 j- g' |( J* g; e*/
, _: g: l5 c1 I+ S' J$ Bis
b6 p/ _3 Q1 z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, H5 Z- `4 l% n4 H3 d/ ]+ ]do" x/ c6 h1 e6 W! \
Lan := rootfolder.Internal.Tools.AOLlanguage;8 i9 Y @- c+ W& \8 g
if current = @.Destination -- else return
$ w& u- f, t; g% A then
: R* l8 Z/ n! P @.Destination := void;
3 A8 `7 m" B, l% V. J& Z6 e. D if @.occupied then
4 Q, E3 ?% }2 Z& d3 Y3 k. l4 l part := @.cont;
b1 {: ?: k, k( k0 ] @.transpOrder := void;% ^3 q3 S! s4 B5 Z6 j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, X5 t: k, F. g- y) [$ k+ B
@,root.eventcontroller.simTime);1 B- {& D+ t' \9 `8 v. J S
@.HasOrder := false;
' q7 Z0 P' s7 H4 f1 U @.DrivingHome := true;9 [7 u& ~) o; o( ~" w0 j
rgManager.tryToStartTransOrder;6 Q( u9 x& ^2 L, ?4 L( m% O0 r
if @.Destination = void
$ F4 t6 A; \2 E- A, ~9 I3 B then -- no transport order for vehicle @" n5 _% r/ e6 Z
@.Destination :=
6 ~: @0 n* D/ P( T# I rgManager.nearestFreeStation(@,track.~);: K* v# h5 v; E9 G4 t
newDirection(@);
& ~, ~) r- C8 u m9 Y. b if @.Destination /= void then
% d1 \+ y, S5 p% V; v @.Destination.NumReservation :=
" Y& ^1 }+ R8 u' ?8 _ @.Destination.NumReservation + 1;
5 Z6 _8 ?: F6 T7 c3 ?, y: ^. j end;
) n O |' M8 g- Z @.CurrIcon := "drivingHome";( ^$ P9 B1 Z7 ^. }2 I
@.DrivingHome := true;+ I7 j/ v3 E! c
end;
! ^* c7 L% J& G7 o" Y! e else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 E4 Z6 m' Z; a! C8 i part := @.transpOrder;0 G& D2 w7 [, `" d2 J
part.move(@);-- load part
8 t# U/ r9 O( I @.CurrIcon := "load";
* `* [+ M1 j& y& D1 ~/ N2 I# E GlobalDistObj := part.globDestination;
) ]! J1 H( w0 I7 Y' G7 B5 [ assignLObj := rgmanager.rgAssignL;
3 r3 F! d: u1 Q* k8 S, D4 Q row := assignLObj.getRowNo(GlobalDistObj);+ R9 ?' D% ^( j- v
if Row = -1 then -- since 705 L( Y q% X- i3 s, C- @. g
if lan=1 then5 p0 G* I' ?- d- i- k4 a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 Y: F: J0 |4 s+ w
to_str("in der Andockstation: \"",?.~.name,"\""));
* }' R& J) c4 m: d' J8 n+ b else
/ b; J. O k4 w2 k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; l+ a a) ?( Y S) B" ] to_str("in docking station: \"",?.~.name,"\""));
% G8 X- F% r4 d/ o end;, Z, |; N% [3 S) A! p6 n& k0 Q: \- s3 N
else+ B' V0 l* E) Z# E& ^+ b# L( v
@.Destination := assignLObj[1,row];
4 U7 |* F& Y# N ~ end;
# ^; R) {" S& W6 D* o! b, c+ ~ newDirection(@);
( \' W' H- Q. G% o @.HasOrder := true;
T2 D# }" Q1 `2 B, z end;
8 }; o" N3 v9 r& } end;4 Y4 r5 i4 Y; l& G, E; b
end; -- of the method o8 M2 M* l3 ^) F
|