/* called by: entrance ctrl of the object 'track'8 Q6 L# [) X7 D* H
*/
4 r" s4 U! [: w: gis
# Y7 o! L, r, U5 h" F part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ f: d# B* w. }2 ]- }- k, Ado
& Z& S# Y f2 ?/ B' D5 s( p% s- Q Lan := rootfolder.Internal.Tools.AOLlanguage;
( \1 C. z' h- ~3 n' [; }# B if current = @.Destination -- else return0 E; e, p; y7 a6 H
then4 @/ f" c6 ?4 {! v" c
@.Destination := void;
" z( N' x8 d0 g if @.occupied then2 V( [/ q Q0 ]* _" j* D, a1 q
part := @.cont;
' R1 u: U$ F& z1 Y) i5 { @.transpOrder := void;& [ r4 I# N* I6 q) y9 h9 j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: j# l- w. v+ f* @1 v3 s# d' }! d @,root.eventcontroller.simTime);
R" W0 c9 Q$ U; E @.HasOrder := false;
& c( {, j3 y% k( U; o; s1 \ @.DrivingHome := true;4 M% t' d; h- k# o7 i
rgManager.tryToStartTransOrder;: I3 I1 l# e( O( D$ q) Z- Z5 w! m
if @.Destination = void$ Z3 u' t3 K8 Q3 R8 u% x7 T* S
then -- no transport order for vehicle @: l' T, U; A/ y6 J! j
@.Destination :=; H1 ~- x/ x* x2 _
rgManager.nearestFreeStation(@,track.~);
! K6 ]- [' ]4 b. ?% S newDirection(@); / @" U; Y# { F/ C7 o$ L
if @.Destination /= void then
2 B0 o. |" c [! X3 U S. w! m! l @.Destination.NumReservation :=
; O! k5 B; r: W& x0 Y5 l7 F @.Destination.NumReservation + 1;
! q) ?" Y5 t# h4 ^; Q end;& _" O- B V+ `5 L+ n j' v
@.CurrIcon := "drivingHome";
9 u2 c0 K+ Q$ B3 ^. q" g @.DrivingHome := true;4 g0 Z2 o, ^7 p V: K6 d. z/ F
end;
3 K1 q& @0 j) s else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ U8 y5 ?' E" O1 l+ f& F2 j part := @.transpOrder;
" o6 U2 c/ a. G# t1 Z part.move(@);-- load part
; B O, _9 f- | q5 F @.CurrIcon := "load";- A! e% [; Q# K# ~/ ~
GlobalDistObj := part.globDestination;
) S: l- i0 V7 R( Y6 W- i, G; c assignLObj := rgmanager.rgAssignL;. Y* O4 W5 z X4 j
row := assignLObj.getRowNo(GlobalDistObj);
% P9 w9 H- Q6 I: W4 [+ n3 i if Row = -1 then -- since 70
! o6 [9 {& H! @2 \6 c" A: J# S if lan=1 then
/ b5 j2 [8 A% d( H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 D) A5 i. s( z U7 ^
to_str("in der Andockstation: \"",?.~.name,"\""));0 ~$ {2 w, s: Z" _! ^1 [$ d8 |
else
6 C$ ?3 \0 Y& L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 W! `" i: O% ]6 k q; J to_str("in docking station: \"",?.~.name,"\""));
; t3 J; j' o6 _. {/ b. \ u/ f' _5 A end;
b' Y! ]; K5 h5 @ else) T g4 V9 Y& U O
@.Destination := assignLObj[1,row];
2 N' ^0 m$ k, A3 ~$ n+ s3 P* U end; * r5 k* v7 \* [5 i1 s% t. W& `
newDirection(@);
: |3 y" _- p+ D4 s9 ] u# N! n @.HasOrder := true;, V+ {& I9 u/ {. C, n" ?
end;* E x: x4 e! R' c4 B
end;' z" M" j0 r& |7 u2 b* U
end; -- of the method" g! w2 q/ b7 J [5 E, b" S
|