Provides access to data and methods related to AGVs.
|Gets the next AGV on an accumulating path.
|An array of AGV.AllocationPoints that is the AGV's current set of not-yet-allocated allocation points.
|Gets the number of amp hours remaining in the AGV's battery.
|Gets or sets the ratio of (amp hours remaining)/(total amp hours) as a percentage.
|Gets or sets the current control point for this AGV.
|Gets the AGV's current travel distance.
|Gets the travel path section that the AGV is currently traveling on.
|Gets the current destination of the AGV.
|Gets the current desination control point of the AGV.
|Gets the final destination control point of the AGV.
|Gets or sets whether or not an AGV is oriented "forward" on a path.
|Provides access to Object methods and properties for this AGV.
|Gets the origin control point of the AGV.
|Gets/sets the control point to "overflow" to when the AGV is pushing trailers.
|Gets the current proximity state of the AGV.
|Gets the control point that was most recently the agv's currentCP.
|Gets or sets the control point that the agv connects to when the model is reset.
|Gets the current speed of the AGV.
|Provides access to TaskExecuter methods and properties for this AGV.
|An array of AGV.Trailers comprising the set of trailers attached to this AGV.
|An array of AGV.TravelPathSections that is the AGV's travel path for its current travel operation.
|Attaches the given object as a trailer on the AGV.
|Attaches a train of trailers to this AGV, automatically calculating gaps, etc. based on network geometry.
|Detaches the given trailer from the AGV.
|Gets a specific trailer based on an ahead/behind parameter, and a rank for the AGV driver.
|Redirects the AGV to a new destination, based on the given mode.
|Sets the destination control point.
|Begins recharging the AGV's battery.
|Detaches a train of trailers from this AGV, creating a separate AGV train.
|Constructs an AGV object based on the given TaskExecuter.
readonly double currentTravelDist
Gets the AGV's current travel distance.
The current travel distance of the AGV within its current travel operation. The AGV tracks its cumulative travel distance across each of the sections in its travel path. Each travel operation starts at a travel distance of 0, and travel distance increases as it travels along the path.
Gets or sets whether or not an AGV is oriented "forward" on a path.
You can get this property while an AGV is on a path to see if they are facing a forward direction. It will return 1 if the AGV is oriented forward and 0 if they are oriented backwards. You cannot set this property while an AGV is moving.
AGV agv = AGV(Model.find("TaskExecuter1"));
Gets/sets the control point to "overflow" to when the AGV is pushing trailers.
This is generally only needed if the AGV is pushing trailers. When pushing trailers, overflowCP defines a point on the AGV path network to which the AGV's trailers should "overflow", since those trailers will be pushed past the AGV's target destination.
overflowCP is controlled solely by the user. It is only automatically reset when the model is reset. Thus, if you set this property, you should reset it to 0 after finishing the operation where the it is applicable. If you do not reset it after its applicable travel operation, weird AGV path travel behavior may occur.
agv.overflowCP = Model.find("ControlPoint5");
|attachTrailer( treenode trailer , double gap , int behind , int detachRule )
|The object that will trail the AGV
|The trailer's distance from the next trailer or AGV
|Sets the position of the trailer. Can be 0 or 1: 0 is ahead, 1 is behind
|Sets the detach mode of the AGV. Can be 0 or 1: 0 is manual, 1 is automatic
Attaches the given object as a trailer on the AGV.
If you attach the trailer using the manual detach mode, you must call detachTrailer() to detach the trailer.
agv.attachTrailer(trailerObj, 0.1, 1, 0);
|coupleTrain( treenode trailer )
|The object that will be coupled to the AGV. If the trailer is itself an AGV, or is a trailer of an AGV, then the entire AGV train will be attached.
Attaches a train of trailers to this AGV, automatically calculating gaps, etc. based on network geometry.
coupleTrain() is similar to attachTrailer(), with the following primary differences:
- Whereas attachTrailer() attaches a single trailer to the AGV, coupleTrain() will attach all trailers that are part of another AGV train, if such a train exists.
- While attachTrailer() requires you to define parameters like whether the trailer should be attached ahead or behind, gap distance, etc., coupleTrain(), on the other hand, automatically resolves these parameters based on the location of the trailer/train on the AGV path network.
There are two possible scenarios when coupling the trailer onto the AGV's train. Each scenario effects a different logic for coupling the train, as follows:
- The trailer is an independent object - When the trailer is not associated with another AGV train, the AGV will determine where to couple the trailer by analyzing simple spatial proximity. It retrieves the location of the trailer, and determines whether that location is ahead of the AGV or behind. Then, based on that determination, it resolves the gap between the trailer and the AGV's associated ahead/behind-most trailer by again analyzing spatial proximity. Further, since there is no AGV train associated with the trailer, it will couple only that trailer to the AGV, and no other objects.
- The trailer is itself another AGV, or is a trailer of another AGV - When the trailer is part of another AGV, the AGV will determine couple parameters by analyzing its own location on the AGV path network relative to the location of that other AGV on the path network. Ahead/behind attributes, gap, etc. are determined by doing a path network distance analysis between each end of each AGV, and coupling the train via the shortest resulting path between the train ends. This algorithm assumes that the AGV ends can reach each other via one or more paths that do not require a train direction switch. In other words, the trains' proximity to each on the network should be "close and intuitive", like how you would want to couple trains in a real life situation. Coupling across weird path geometries will result in undetermined behavior.
Use this method in conjunction with uncoupleTrain() to simulate coupling and uncoupling of cars in a train yard.
|AGV.Trailer getTrailer( int isBehind , int rankFromDriver )
|1 if you want to access a trailer behind the AGV, and 0 if you want to access a trailer ahead of the AGV.
|The 1-based rank of the trailer from the AGV driver.
Gets a specific trailer based on an ahead/behind parameter, and a rank for the AGV driver.
Object trailer = agv.getTrailer(1, 2).object;
|redirect( Object newDest , int mode )
|The new desination for the AGV to travel to
|Determines what happens on redirect. Can have one of 4 values:
REDIRECT_AND_WAIT - if not redirected before arrival, the agv will wait at the destination until redirected
REDIRECT_AS_FINAL - the destination becomes the new final destination for the agv
REDIRECT_AND_CONTINUE_ON_ARRIVAL - the agv will continue to the final destination after arriving at the intermediate destination
REDIRECT_AND_CONTINUE_ON_PRE_ARRIVAL - the agv will continue to the final destination after pre-arriving at the intermediate destination (it will not decelerate to a stop)
Redirects the AGV to a new destination, based on the given mode.
|void setDestination( Object controlPoint , double pathOffset = 0 , Object relativeToTrailer = 0 , Variant agvBodyOffset = 0 )
|Control point to be set as the destination.
|How much to offset the destination along the path from the control point.
|Make the destination relative to a trailer.
|Specifies amount to offset from the body or one of the AGV.BodyOffset enum values. It may also be an array with 2 elements, the first with one of the AGV.BodyOffset enum values and the second with an additional offset amount.
Sets the destination control point.
agv.setDestination(Model.find("ControlPoint5"), 0, 0, AGV.BodyOffset.TrailerHeadEdge);
|uncoupleTrain( treenode trailer , treenode newDriver = 0 )
|The trailer at which to uncouple from the train.
|The object who will become the new "driver" AGV. If this object
does not already have an AGV instance associated with it, then an AGV will be created. If newDriver is not
passed as a parameter, or is 0, then the first trailer parameter will become the new driver.
If the new driver is not a TaskExecuter, then it will only contain AGV data for storing where the AGV train is on the path network. You will not be able to give the object travel tasks like you would a TaskExecuter.
Detaches a train of trailers from this AGV, creating a separate AGV train.
Use this method in conjunction with coupleTrain() to simulate coupling and uncoupling of cars in a train yard.
|AGV( treenode te , int assert = 0 )
|A TaskExecuter that is connected to the AGV network as an AGV Traveler.
|If 1, then if the TaskExecuter is not yet connected to the AGV network, it will be connected, and the associated AGV object will be created.
|An AGV object
Constructs an AGV object based on the given TaskExecuter.An AGV object can only be accessed by calling this method. Casting from a treenode is not correct.
AGV agv = AGV(te); // correct
AGV agv = te; // incorrect