/* called by: entrance ctrl of the object 'track'0 S5 \2 t7 f2 [0 C' L
*/- ~ ~ b3 W& A& J2 M0 z
is
$ H! c1 {. V k8 C9 M/ M2 g& w% d part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. A8 _: x# ?1 G+ W) H4 D6 i9 Fdo
% `( x1 A+ k3 t, s/ E# c Lan := rootfolder.Internal.Tools.AOLlanguage;4 a, s; E- K# |' t2 m! L( x
if current = @.Destination -- else return" y2 Y/ U8 `! C; z1 T! C' S
then
% ?9 g B% L0 m @.Destination := void;
4 @' n# W( W* Q if @.occupied then
! ^* I5 d1 D4 H5 {6 Q7 R v part := @.cont;( l/ Z4 `0 M1 |. C3 F/ [: s
@.transpOrder := void;
4 [- k* ~4 e7 h& b9 v$ P& ~" i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 S- r" W) H7 k& Q7 u
@,root.eventcontroller.simTime);. z% [: E% J. o8 U* r( M* y o) D
@.HasOrder := false;
# P; i4 N0 y0 Q1 T8 c @.DrivingHome := true;
" G! K* B4 ^- M5 `/ H2 d# }: }2 h rgManager.tryToStartTransOrder;7 h) Y" u e; {
if @.Destination = void. t" U5 E9 g: T
then -- no transport order for vehicle @0 |0 ~+ F5 X7 w6 `
@.Destination :=
" r! o; f; a0 Z) O0 ]+ d$ ~ rgManager.nearestFreeStation(@,track.~);$ L4 d! p! E1 }; \, g3 @% E4 O
newDirection(@); . h) c7 F4 `$ |& u$ }# h
if @.Destination /= void then
, ? {4 w% F M; k# x* n& ]5 M! n9 S @.Destination.NumReservation :=" j/ a9 D' v2 T3 M$ h' ?4 x" C
@.Destination.NumReservation + 1;
; G/ L+ V( K; h. S! k end;9 U5 b; m. @3 ?+ a# E7 q/ G, [
@.CurrIcon := "drivingHome";4 X( U6 ?# F* Y8 z2 p6 I
@.DrivingHome := true;9 ^) A1 K$ k$ `( p( e) m
end;
4 H- D! B3 b) u% p* I' R( [' N+ ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station Y) k0 n6 `( W1 F9 m) r0 N
part := @.transpOrder;
& e1 r) C) t8 M6 E* n: e part.move(@);-- load part
# X' t" u: B$ R; y% r2 M2 h @.CurrIcon := "load";6 q) I5 A+ A% T4 s
GlobalDistObj := part.globDestination;7 w3 v$ {& f- d! J5 h
assignLObj := rgmanager.rgAssignL;: w7 k/ t* y( o% o1 |) d
row := assignLObj.getRowNo(GlobalDistObj);9 a; d0 z0 u; x) s% C
if Row = -1 then -- since 70+ p9 V2 Z/ \: f- g
if lan=1 then+ ` v$ w% q/ Z! j/ q3 D! B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( k( F6 i" W0 Y2 l$ q) Z4 ? to_str("in der Andockstation: \"",?.~.name,"\""));
- F5 |. Y4 n- p$ @0 Z2 Y% ] else8 O6 _+ r% i0 ~; S# R! F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* e* @: m" C- z, s( `
to_str("in docking station: \"",?.~.name,"\"")); ' G- a5 u6 H) |; i+ E
end;4 O5 H+ x" S* o G
else
. h+ j, u" Y: A @.Destination := assignLObj[1,row];8 u, ^" q4 b- G4 c
end; & n( b+ l+ o8 G1 U, D% l
newDirection(@);: U0 f! [+ h$ f9 C9 C
@.HasOrder := true;# x) ^3 t4 W4 a% O# s/ G6 o0 i$ ?
end;
+ \# \ A( O9 k7 k end;
* T3 L. l8 }* Aend; -- of the method9 C+ [0 T) d t% r# M$ R
|