/* called by: entrance ctrl of the object 'track'' j$ {& v, e+ d+ D# v6 _
*/) D8 H( M' i6 Z3 B! k
is
% z1 _2 ~; U1 D" N1 d4 V part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" @0 A! { m- J' m5 d- q; [8 Hdo, w6 e, b/ R) Y3 C
Lan := rootfolder.Internal.Tools.AOLlanguage;) H1 F" U& ?) M
if current = @.Destination -- else return% v, ?3 f F- j& I
then+ c7 G6 {' d$ k3 F
@.Destination := void;; ?+ [/ E; H( T- l: ?- {8 e9 {
if @.occupied then
" s+ D# Q+ k6 c. I7 M5 X! ~! S part := @.cont;
3 H8 I! S6 S4 [% }/ r% I! g& K0 f @.transpOrder := void;! P4 q L3 I$ S0 F# S3 Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 p& B) g( E" y9 `* x% Q @,root.eventcontroller.simTime);
) Z9 p; h; u* E* G$ r @.HasOrder := false;4 j! ^2 t3 M. z) K+ `8 K9 [8 R
@.DrivingHome := true;
% d; F0 j6 e, L. C rgManager.tryToStartTransOrder;
4 F- L M' A$ E. W if @.Destination = void
2 V5 _9 Y) k! W6 h7 | then -- no transport order for vehicle @* B7 y i" ?& a( G8 n b$ u
@.Destination :=
/ z& [3 e% V! q/ J" {: P/ E rgManager.nearestFreeStation(@,track.~);4 V4 b4 K. \7 t
newDirection(@); % `' L1 l$ J _- @" f2 e/ g( Y- J
if @.Destination /= void then: ?3 w( |# ?+ K: ?& i- j
@.Destination.NumReservation :=
1 S' A n& E$ ]! X2 k; ` @.Destination.NumReservation + 1;
" A: S6 d/ Y* S3 A end;
3 z1 k% p3 U5 {3 C. F @.CurrIcon := "drivingHome";
) _6 h' E* {$ D+ X6 {7 d. v @.DrivingHome := true;: g+ y% O2 Q0 M" Q; e: I5 C% T
end;
- B) J; P6 V% C1 w else -- the vehicle @ is empty, both vehicle and part are in the same dock station' ^% e: w# V( F: T* g
part := @.transpOrder;
6 ^- f! n. y% ~. D- N r) u part.move(@);-- load part' t* c' A3 k0 {* X; u- Z* g
@.CurrIcon := "load";
6 G- U8 K# }/ `, J6 \. \ GlobalDistObj := part.globDestination;5 F% R2 \# w0 ^( }: w( d/ k6 F
assignLObj := rgmanager.rgAssignL;; u, x* R( R0 S
row := assignLObj.getRowNo(GlobalDistObj);
! V8 {( `- `4 q& r' E+ y4 a if Row = -1 then -- since 70! H# k. o- h* f6 a) I) U, B o) y
if lan=1 then
# z8 H& i) d: j6 z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 W. U* U: y a+ P3 {" d; I; O( X to_str("in der Andockstation: \"",?.~.name,"\""));6 a- F# G* \' E& r- s$ d
else! Y! C# d' F$ D, A$ D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 a* q/ S1 w9 N+ i f
to_str("in docking station: \"",?.~.name,"\"")); ( s: [& o: i6 N
end;
+ K- a s6 C5 B9 W" }: v else
% J0 j! U* G9 b! S! a3 u$ J @.Destination := assignLObj[1,row];5 b1 ~. m/ B0 _* f, }; k4 V5 z h
end;
+ m' O) l- m8 ^3 Z& m newDirection(@);
9 c3 q/ W7 w* h! n3 S @.HasOrder := true;
5 |2 L4 Y* S. b2 B end;' r0 X/ x; U P& ~2 _5 B
end;
3 P( m' I* n" v1 \" i z0 fend; -- of the method# ]) }0 v, ^) z9 b
|