/* called by: entrance ctrl of the object 'track'1 _0 I$ U! a. }4 k
*/
& E& r# Y; s o* Ris
& F2 |4 G5 K% ^+ M* o9 c part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 N. f% {6 F- _; J- ]
do. Z$ Q3 E& c! E
Lan := rootfolder.Internal.Tools.AOLlanguage;
" {/ S# W% t' d" o6 G7 C' k6 x if current = @.Destination -- else return
' O6 s+ B; ?( x; D# u then9 ]# s8 t/ k/ K2 r7 O
@.Destination := void;
$ P& i5 D1 h: t' l$ a. W if @.occupied then
, e. C6 _9 y5 B8 e8 m part := @.cont;
; ?" ^' Z. t( q V1 u: F4 z @.transpOrder := void;
) n; W8 y3 n% \* z0 |6 X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* [1 o5 Q- M) G; V
@,root.eventcontroller.simTime);
; [) q F( f+ ~$ V( b9 P @.HasOrder := false; I# @, r1 g3 \7 M, M: Y' }
@.DrivingHome := true;
, U+ u. \$ n a$ O k rgManager.tryToStartTransOrder;! E( F5 v$ s) @/ |. a
if @.Destination = void
- J7 p1 ^, P% r7 I9 q4 p: h then -- no transport order for vehicle @
5 m& E3 Q6 G; I& _4 G @.Destination :=% s6 A. k- h0 ?2 U8 {
rgManager.nearestFreeStation(@,track.~);
* k, N7 V6 k( y- D newDirection(@);
8 S' h. ?, V/ ]4 T if @.Destination /= void then1 K. {6 h1 v7 u$ [2 o' n# i
@.Destination.NumReservation :=
6 ?* H$ v: S4 W4 D7 E+ W& I" G3 b @.Destination.NumReservation + 1;% `5 ^* c) J3 Q) ]' x o. \7 N( A4 J
end;7 p9 J' [! f) r( M
@.CurrIcon := "drivingHome";8 ^( q5 X% W+ {
@.DrivingHome := true;- E6 N% u( O% N4 |+ d! g
end;
- f% |) e6 A+ Y5 p else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 w8 E+ B. H9 d( S$ b
part := @.transpOrder;
) K! S) w- f$ n5 N. s part.move(@);-- load part
. `# t8 i$ t( L# c# `' V3 g @.CurrIcon := "load";" B2 R- a- a, c( c0 O
GlobalDistObj := part.globDestination;; Q* A' |% n, ~7 \& n: w8 a0 b
assignLObj := rgmanager.rgAssignL;
! r$ j4 ?2 |8 G9 k# m row := assignLObj.getRowNo(GlobalDistObj);
! S- M7 Q% c3 [1 i if Row = -1 then -- since 70
9 }. g3 h9 }' j9 g3 ?2 P if lan=1 then2 E* Q+ b% z: ^1 ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* y9 U5 _. T$ w9 ~! B' `
to_str("in der Andockstation: \"",?.~.name,"\""));9 d: M# L6 K$ _* ]" p
else
+ D. O/ g7 R/ c. a3 M# \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 B0 b0 B+ Z1 o to_str("in docking station: \"",?.~.name,"\"")); $ G+ `$ W) x+ ?! o' s' C: S& c
end;
1 S7 K8 l. J1 F* F' q else# O- V! ?5 S7 F* x- K/ r% @7 T) ^
@.Destination := assignLObj[1,row];
" i) Y6 X5 V- K# Y) T8 `- v end; : V% u2 [: O+ A" _2 e
newDirection(@);8 g8 ^8 O* u( E. A
@.HasOrder := true;
" \ l6 G& x; H. q( |8 B, _- r end;1 t& P K/ E5 k' H) y
end;# A+ [% p2 W5 c7 [
end; -- of the method% u8 p1 ]) O- B; }1 O+ F
|