/* called by: entrance ctrl of the object 'track'
( `+ h) P5 W$ e9 i( U*/& H$ i' `; n- Z( G, ?6 S1 g- P
is/ k4 l; I5 j2 Z( h' E- x- {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 O- J- `8 s; v: U6 n8 D1 ldo5 D6 b7 R8 Q& Z1 H) k( P8 Z
Lan := rootfolder.Internal.Tools.AOLlanguage;( H9 |! m& Y# c- r
if current = @.Destination -- else return
& y |2 p2 J1 q then
# ^4 [- @# ~& {( [" E* D" q! V @.Destination := void;: b# U3 v& A6 `* H
if @.occupied then6 P# J7 X- \% h/ f6 `: N& S
part := @.cont;" n+ S6 ^! ^! A# M
@.transpOrder := void;* v Q# y, O2 V/ p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& q1 P: O/ @8 L p: v
@,root.eventcontroller.simTime);7 O' e7 j% [* u& {8 Z; q
@.HasOrder := false;
6 X9 t# x( A6 O5 d4 i% S; O @.DrivingHome := true;
- ~9 U' U- O/ H4 V% G3 p rgManager.tryToStartTransOrder;
' u) q: Q; M- S( @0 K t6 o if @.Destination = void) C7 j- f- h# H+ Q# p) c2 e6 X7 T4 q
then -- no transport order for vehicle @3 F6 G! `, r' g8 v) a' D
@.Destination :=2 d- D; o1 {( u: }/ X" T' ?% X
rgManager.nearestFreeStation(@,track.~);
+ D8 }$ J: R/ ]: K newDirection(@);
5 w5 A$ P- S) X! p7 u if @.Destination /= void then# p( T; `4 r h6 S% a" \1 l2 {- d' O
@.Destination.NumReservation :=
. ^! C3 X7 P- M# R4 i* O @.Destination.NumReservation + 1;! [1 ^ d, Y+ O6 ~9 a" E2 D5 w
end;
$ |2 h) A$ p& ~0 _2 E9 D @.CurrIcon := "drivingHome";0 ^1 `( ]* v( Z& g4 S! q' M! S
@.DrivingHome := true;. ^3 R {% D- M }3 {- M
end;
: p# Z0 H% o9 V else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ a/ \/ \! N2 L( }. W1 Y part := @.transpOrder;
$ [5 t) u: V4 Y# [, q$ l part.move(@);-- load part
- n) u$ f; F" l" s# C/ ~" D7 \ @.CurrIcon := "load";
. u4 z$ y& S9 [! [ GlobalDistObj := part.globDestination;
7 ^1 ?, |0 ?2 `+ O( M, l6 h assignLObj := rgmanager.rgAssignL;
5 p' q* ~" m& V row := assignLObj.getRowNo(GlobalDistObj);
4 w( I3 o) ]5 Q! K, A if Row = -1 then -- since 70
8 U; B1 Z/ ~6 w8 A. l1 @# i if lan=1 then" U! Q3 v, r( a$ l( G4 J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 C4 o- n% q( o5 B/ V9 X) [; x
to_str("in der Andockstation: \"",?.~.name,"\""));' @! r0 C5 ]& H8 a3 m
else' F% A0 A( D/ a' x4 L6 b
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," r0 q: u2 g* f. B+ D
to_str("in docking station: \"",?.~.name,"\"")); 1 I; b, x j3 R5 B q! S
end;
) @" }9 X" Q: n else, l, N T8 D0 x# b$ T# }. Q$ q u5 H
@.Destination := assignLObj[1,row];
! [ J1 E7 }2 E end; 1 S5 T6 s1 l) n7 X/ L# \: x E0 B
newDirection(@);+ Z, R9 ^2 Q: w! b$ E
@.HasOrder := true;
0 @9 L/ O! N, M1 T end;
3 B9 Y. K, \* o end;1 u% E( V% s* ?2 v
end; -- of the method* E, o0 f& ?0 p1 u' r; B
|