Package com.anylogic.engine.markup
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.markup.AbstractMarkupAggregator
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.markup.INetwork
- Constructor Detail
- Method Detail
- add
- add
- getNode
- getNodeCount
- getPath
- getPathCount
- ports
- nodes
- paths
- getRelatedNetworks
- getDistance
- getDistance
- getDistance
- getDistance
- getDistance
- getDistance
- getDistance
- getDistance
- getDistance
- getDistance
- getDistance
- getDistance
- getDistance
- getDistance
- getDistance
- getDistance
- getDistance
- getDistance
- getPosition
- getPosition
- getNearestNetworkElement
- getNearestNetworkElement
- getNearestNetworkElement
- getNearestNode
- getNearestNode
- getNearestNode
- getNearestNode
- getNearestPath
- getNearestPath
- getNearestPath
- getPlainDistance
- getPlainDistance
- getDistance
- getPathData
- getPositionAtOffset
- getLength
- java.lang.Object
-
- com.anylogic.engine.markup.AbstractMarkupAggregator<Owner>
-
- com.anylogic.engine.markup.AbstractNetwork<N,P,Owner>
- All Implemented Interfaces:
IRouteProvider<ShortestPathData<N,P>>
,INetwork<N,P>
,java.io.Serializable
- Direct Known Subclasses:
ConveyorNetwork
,GISNetwork
,Network
@AnyLogicInternalAPI public abstract class AbstractNetwork<N extends INode<N,P>,P extends IPath<N>,Owner> extends AbstractMarkupAggregator<Owner> implements INetwork<N,P>
- See Also:
- Serialized Form
AbstractNetwork(Owner owner,
java.lang.String name) |
|
AbstractNetwork(Owner owner,
java.lang.String name,
boolean isPublic,
boolean visible) |
|
Constructor | Description |
---|
void |
add(N n) |
Adds node to network.
|
void |
add(P p) |
Adds relation to network.
|
double |
getDistance(Point startPoint,
Point endPoint) |
Creates a route from one point to another and calculates its length.
|
double |
getDistance(Point source,
Point target,
ShortestPathData<N,P> data) |
Calculates the distance between two points using the network paths.
|
double |
getDistance(Point source,
Point target,
ShortestPathData<N,P> data,
LengthUnits units) |
Calculates the distance between two points using the network paths.
|
double |
getDistance(Point source,
Point target,
N from,
N to,
ShortestPathData<N,P> data) |
Calculates the distance between two points using the network paths.
|
double |
getDistance(Point source,
Point target,
N from,
N to,
ShortestPathData<N,P> data,
LengthUnits units) |
Calculates the distance between two points using the network paths.
|
double |
getDistance(Point source,
Point target,
N from,
P to,
double toOffset,
ShortestPathData<N,P> data) |
Calculates the distance between two points using the network paths.
|
double |
getDistance(Point source,
Point target,
N from,
P to,
double toOffset,
ShortestPathData<N,P> data,
LengthUnits units) |
Calculates the distance between two points using the network paths.
|
double |
getDistance(Point source,
Point target,
P from,
double fromOffset,
N to,
ShortestPathData<N,P> data) |
Calculates the distance between two points using the network paths.
|
double |
getDistance(Point source,
Point target,
P from,
double fromOffset,
N to,
ShortestPathData<N,P> data,
LengthUnits units) |
Calculates the distance between two points using the network paths.
|
double |
getDistance(Point source,
Point target,
P from,
double fromOffset,
P to,
double toOffset,
ShortestPathData<N,P> data) |
Calculates the distance between two points using the network paths.
|
double |
getDistance(Point source,
Point target,
P from,
double fromOffset,
P to,
double toOffset,
ShortestPathData<N,P> data,
LengthUnits units) |
Calculates the distance between two points using the network paths.
|
double |
getDistance(N from,
N to,
ShortestPathData<N,P> data) |
Calculates the distance from source object in the network to the target object.
|
double |
getDistance(N from,
N to,
ShortestPathData<N,P> data,
LengthUnits units) |
Calculates the distance from source object in the network to the target object.
|
double |
getDistance(N from,
P to,
double toOffset,
ShortestPathData<N,P> data) |
Calculates the distance from source object in the network to the target object.
|
double |
getDistance(N from,
P to,
double toOffset,
ShortestPathData<N,P> data,
LengthUnits units) |
Calculates the distance from source object in the network to the target object.
|
double |
getDistance(P from,
double fromOffset,
N to,
ShortestPathData<N,P> data) |
Calculates the distance from source object in the network to the target object.
|
double |
getDistance(P from,
double fromOffset,
N to,
ShortestPathData<N,P> data,
LengthUnits units) |
Calculates the distance from source object in the network to the target object.
|
double |
getDistance(P from,
double fromOffset,
P to,
double toOffset,
ShortestPathData<N,P> data) |
Calculates the distance from source object in the network to the target object.
|
double |
getDistance(P from,
double fromOffset,
P to,
double toOffset,
ShortestPathData<N,P> data,
LengthUnits units) |
Calculates the distance from source object in the network to the target object.
|
double |
getLength(ShortestPathData<N,P> pathData) |
Retrieves length of the specified route.
|
INetworkMarkupElement |
getNearestNetworkElement(double x,
double y,
double z,
Point out) |
Looking for the closest markup element in this network to the given coordinates.
|
INetworkMarkupElement |
getNearestNetworkElement(Agent agent,
Point out) |
Looking for the closest markup element in this network to the given agent.
|
INetworkMarkupElement |
getNearestNetworkElement(Point givenPoint,
Point out) |
Looking for the closest markup element in this network to the given point.
|
N |
getNearestNode(double x,
double y,
double z,
Point out) |
Looking for the closest node in this network to the given coordinates.
|
N |
getNearestNode(Agent agent,
Point out) |
Looking for the closest node in this network to the given agent.
|
N |
getNearestNode(Point givenPoint) |
Looking for the closest node in this network to the given point.
|
N |
getNearestNode(Point givenPoint,
Point out) |
Looking for the closest node in this network to the given point.
|
P |
getNearestPath(double x,
double y,
double z,
Point out) |
Looking for the closest path in this network to the given coordinates.
|
P |
getNearestPath(Agent agent,
Point out) |
Looking for the closest path in this network to the given agent.
|
P |
getNearestPath(Point givenPoint,
Point out) |
Looking for the closest path in this network to the given point.
|
N |
getNode(int index) |
|
int |
getNodeCount() |
Amount of nodes in this network.
|
P |
getPath(int index) |
|
int |
getPathCount() |
Amount of paths in this network.
|
ShortestPathData<N,P> |
getPathData(Point startPoint,
Point endPoint,
ShortestPathData<N,P> out) |
Retrieves the route data an agent will use to calculate
the route length and determine its position on the route
by calling
IRouteProvider.getLength(IPathData) and
IRouteProvider.getPositionAtOffset(IPathData, double, Position) respectively. |
abstract double |
getPlainDistance(Point firstPoint,
Point secondPoint) |
Straight line distance between two points.
|
double |
getPlainDistance(Point firstPoint,
Point secondPoint,
LengthUnits units) |
Straight line distance between two points in given units of length.
|
Position |
getPosition(ShortestPathData<N,P> data,
double offset,
LengthUnits units,
Position out) |
Calculates current position on the shortest path through network by the given offset
|
Position |
getPosition(ShortestPathData<N,P> data,
double offset,
Position out) |
Calculates current position on the shortest path through network by the given offset
|
Position |
getPositionAtOffset(ShortestPathData<N,P> pathData,
double offset,
Position out) |
Retrieves agent's position on the route.
|
java.util.List<INetwork<?,?>> |
getRelatedNetworks() |
|
java.util.List<N> |
nodes() |
|
java.util.List<P> |
paths() |
|
java.util.List<NetworkPort> |
ports() |
|
Modifier and Type | Method | Description |
---|
elementsInternal, error, getName, getOwner, initializeInternal, isVisible, onAggregatorVisibilityChanged, setVisible
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCompatibleAgentExtensionClass, getSpace
public AbstractNetwork(Owner owner, java.lang.String name)
public AbstractNetwork(Owner owner, java.lang.String name, boolean isPublic, boolean visible)
public void add(N n)
Description copied from interface:
INetwork
Adds node to network. Don't call this method when network has been initialized.
- Specified by:
add
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
n
- network node, instance ofINode
public void add(P p)
Description copied from interface:
INetwork
Adds relation to network. Don't call this method when network has been initialized.
- Specified by:
add
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
p
- network path, instance ofIPath
public N getNode(int index)
public int getNodeCount()
Description copied from interface:
INetwork
Amount of nodes in this network.
- Specified by:
getNodeCount
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Returns:
- amount of nodes
public P getPath(int index)
public int getPathCount()
Description copied from interface:
INetwork
Amount of paths in this network.
- Specified by:
getPathCount
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Returns:
- amount of paths
public java.util.List<NetworkPort> ports()
- Specified by:
ports
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Returns:
- all ports of this network
public java.util.List<N> nodes()
- Specified by:
nodes
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Returns:
- all nodes of this network
public java.util.List<P> paths()
- Specified by:
paths
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Returns:
- all paths of this network
@AnyLogicInternalAPI public java.util.List<INetwork<?,?>> getRelatedNetworks()
- Specified by:
getRelatedNetworks
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Returns:
- list of related networks
public double getDistance(N from, N to, ShortestPathData<N,P> data)
Description copied from interface:
INetwork
Calculates the distance from source object in the network to the target object. Source and target points can be
extracted from source and target objects in the following ways:
- Specified by:
getDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
from
- from nodeto
- to nodedata
- output object to write to, may be null- Returns:
- distance between two points in the network
public double getDistance(N from, N to, ShortestPathData<N,P> data, LengthUnits units)
Description copied from interface:
INetwork
Calculates the distance from source object in the network to the target object. Source and target points can be
extracted from source and target objects in the following ways:
- Specified by:
getDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
from
- source nodeto
- target nodedata
- output object to write to, may be nullunits
- length units- Returns:
- distance between two points in the network
public double getDistance(N from, P to, double toOffset, ShortestPathData<N,P> data)
Description copied from interface:
INetwork
Calculates the distance from source object in the network to the target object. Source and target points can be
extracted from source and target objects in the following ways:
- Specified by:
getDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
from
- source nodeto
- target pathtoOffset
- offset on the target pathdata
- output object to write to, may be null- Returns:
- distance between two points in the network
public double getDistance(N from, P to, double toOffset, ShortestPathData<N,P> data, LengthUnits units)
Description copied from interface:
INetwork
Calculates the distance from source object in the network to the target object. Source and target points can be
extracted from source and target objects in the following ways:
- Specified by:
getDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
from
- source nodeto
- target pathtoOffset
- offset on the target pathdata
- output object to write to, may be nullunits
- length units- Returns:
- distance between two points in the network
public double getDistance(P from, double fromOffset, N to, ShortestPathData<N,P> data)
Description copied from interface:
INetwork
Calculates the distance from source object in the network to the target object. Source and target points can be
extracted from source and target objects in the following ways:
- Specified by:
getDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
from
- source pathfromOffset
- offset on the source pathto
- target nodedata
- output object to write to, may be null- Returns:
- distance between two points in the network
public double getDistance(P from, double fromOffset, N to, ShortestPathData<N,P> data, LengthUnits units)
Description copied from interface:
INetwork
Calculates the distance from source object in the network to the target object. Source and target points can be
extracted from source and target objects in the following ways:
- Specified by:
getDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
from
- source pathfromOffset
- offset on the source pathto
- target nodedata
- output object to write to, may be nullunits
- length units- Returns:
- distance between two points in the network
public double getDistance(P from, double fromOffset, P to, double toOffset, ShortestPathData<N,P> data)
Description copied from interface:
INetwork
Calculates the distance from source object in the network to the target object. Source and target points can be
extracted from source and target objects in the following ways:
- Specified by:
getDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
from
- source pathfromOffset
- offset on the source pathto
- target pathtoOffset
- offset on the target pathdata
- output object to write to, may be null- Returns:
- distance between two points in the network
public double getDistance(P from, double fromOffset, P to, double toOffset, ShortestPathData<N,P> data, LengthUnits units)
Description copied from interface:
INetwork
Calculates the distance from source object in the network to the target object. Source and target points can be
extracted from source and target objects in the following ways:
- Specified by:
getDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
from
- source pathfromOffset
- offset on the source pathto
- target pathtoOffset
- offset on the target pathdata
- output object to write to, may be nullunits
- length units- Returns:
- distance between two points in the network
public double getDistance(Point source, Point target, N from, N to, ShortestPathData<N,P> data)
Description copied from interface:
INetwork
Calculates the distance between two points using the network paths. Source and target points do not have to belong to the network.
You have two options in terms of 'connecting' the source point to the network start point and the network end point to the target point, namely:
- Specified by:
getDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
source
- source pointtarget
- target pointfrom
- network starting nodeto
- network end nodedata
- output object to write into, may be null- Returns:
- the distance between two points if traveling using network
public double getDistance(Point source, Point target, N from, N to, ShortestPathData<N,P> data, LengthUnits units)
Description copied from interface:
INetwork
Calculates the distance between two points using the network paths. Source and target points do not have to belong to the network.
You have two options in terms of 'connecting' the source point to the network start point and the network end point to the target point, namely:
- Specified by:
getDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
source
- source pointtarget
- target pointfrom
- network starting nodeto
- network end nodedata
- output object to write into, may be nullunits
- length units- Returns:
- the distance between two points if traveling using network
public double getDistance(Point source, Point target, N from, P to, double toOffset, ShortestPathData<N,P> data)
Description copied from interface:
INetwork
Calculates the distance between two points using the network paths. Source and target points do not have to belong to the network.
You have two options in terms of 'connecting' the source point to the network start point and the network end point to the target point, namely:
- Specified by:
getDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
source
- source pointtarget
- target pointfrom
- network starting nodeto
- network end pathtoOffset
- offset on the network end pathdata
- output object to write into, may be null- Returns:
- the distance between two points if traveling using network
public double getDistance(Point source, Point target, N from, P to, double toOffset, ShortestPathData<N,P> data, LengthUnits units)
Description copied from interface:
INetwork
Calculates the distance between two points using the network paths. Source and target points do not have to belong to the network.
You have two options in terms of 'connecting' the source point to the network start point and the network end point to the target point, namely:
- Specified by:
getDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
source
- source pointtarget
- target pointfrom
- network starting nodeto
- network end pathtoOffset
- offset on the network end pathdata
- output object to write into, may be nullunits
- length units- Returns:
- the distance between two points if traveling using network
public double getDistance(Point source, Point target, P from, double fromOffset, N to, ShortestPathData<N,P> data)
Description copied from interface:
INetwork
Calculates the distance between two points using the network paths. Source and target points do not have to belong to the network.
You have two options in terms of 'connecting' the source point to the network start point and the network end point to the target point, namely:
- Specified by:
getDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
source
- source pointtarget
- target pointfrom
- network starting pathfromOffset
- offset on the network starting pathto
- network end nodedata
- output object to write into, may be null- Returns:
- the distance between two points if traveling using network
public double getDistance(Point source, Point target, P from, double fromOffset, N to, ShortestPathData<N,P> data, LengthUnits units)
Description copied from interface:
INetwork
Calculates the distance between two points using the network paths. Source and target points do not have to belong to the network.
You have two options in terms of 'connecting' the source point to the network start point and the network end point to the target point, namely:
- Specified by:
getDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
source
- source pointtarget
- target pointfrom
- network starting pathfromOffset
- offset on the network starting pathto
- network end nodedata
- output object to write into, may be nullunits
- length units- Returns:
- the distance between two points if traveling using network
public double getDistance(Point source, Point target, P from, double fromOffset, P to, double toOffset, ShortestPathData<N,P> data)
Description copied from interface:
INetwork
Calculates the distance between two points using the network paths. Source and target points do not have to belong to the network.
You have two options in terms of 'connecting' the source point to the network start point and the network end point to the target point, namely:
- Specified by:
getDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
source
- source pointtarget
- target pointfrom
- network starting pathfromOffset
- offset on the network starting pathto
- network end pathtoOffset
- offset on the network end pathdata
- output object to write into, may be null- Returns:
- the distance between two points if traveling using network
public double getDistance(Point source, Point target, P from, double fromOffset, P to, double toOffset, ShortestPathData<N,P> data, LengthUnits units)
Description copied from interface:
INetwork
Calculates the distance between two points using the network paths. Source and target points do not have to belong to the network.
You have two options in terms of 'connecting' the source point to the network start point and the network end point to the target point, namely:
- Specified by:
getDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
source
- source pointtarget
- target pointfrom
- network starting pathfromOffset
- offset on the network starting pathto
- network end pathtoOffset
- offset on the network end pathdata
- output object to write into, may be nullunits
- length units- Returns:
- the distance between two points if traveling using network
public double getDistance(Point source, Point target, ShortestPathData<N,P> data)
Description copied from interface:
INetwork
Calculates the distance between two points using the network paths. Source and target points do not have to belong to the network.
Network starting and and points will be chosen as network closest points to the source and target points respectively.
- Specified by:
getDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
source
- source pointtarget
- target pointdata
- data output object to write into, may be null- Returns:
- the distance between two points if traveling using network
public double getDistance(Point source, Point target, ShortestPathData<N,P> data, LengthUnits units)
Description copied from interface:
INetwork
Calculates the distance between two points using the network paths. Source and target points do not have to belong to the network.
Network starting and and points will be chosen as network closest points to the source and target points respectively.
- Specified by:
getDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
source
- source pointtarget
- target pointdata
- data output object to write into, may be nullunits
- length units- Returns:
- the distance between two points if traveling using network
public Position getPosition(ShortestPathData<N,P> data, double offset, Position out)
Description copied from interface:
INetwork
Calculates current position on the shortest path through network by the given offset
- Specified by:
getPosition
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
data
- shortest path data, see#getDistance(Node, Node, ShortestPathData)
methodsoffset
- offset from the end of routeout
- the Position object to use for output, may benull
- Returns:
- the position on the shortest path
public Position getPosition(ShortestPathData<N,P> data, double offset, LengthUnits units, Position out)
Description copied from interface:
INetwork
Calculates current position on the shortest path through network by the given offset
- Specified by:
getPosition
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
data
- shortest path data, see#getDistance(Node, Node, ShortestPathData)
methodsoffset
- offset from the end of routeunits
- the units of lengthout
- the Position object to use for output, may benull
- Returns:
- the position on the shortest path
public INetworkMarkupElement getNearestNetworkElement(double x, double y, double z, Point out)
Looking for the closest markup element in this network to the given coordinates.
- Specified by:
getNearestNetworkElement
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
x
- the x given coordinatey
- the y given coordinatez
- the z given coordinateout
- the point in this markup element nearest to the given coordinates- Returns:
- nearest markup element
public INetworkMarkupElement getNearestNetworkElement(Agent agent, Point out)
Looking for the closest markup element in this network to the given agent.
- Parameters:
agent
- the given agentout
- the point in this markup element nearest to the given agent- Returns:
- nearest markup element
public INetworkMarkupElement getNearestNetworkElement(Point givenPoint, Point out)
Looking for the closest markup element in this network to the given point.
- Specified by:
getNearestNetworkElement
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
givenPoint
- the given pointout
- the point in this markup element nearest to the given point- Returns:
- nearest markup element
public N getNearestNode(Agent agent, Point out)
Looking for the closest node in this network to the given agent.
- Parameters:
agent
- the given agentout
- the point in this node nearest to the given agent- Returns:
- nearest node
public N getNearestNode(double x, double y, double z, Point out)
Looking for the closest node in this network to the given coordinates.
- Parameters:
x
- the x coordinatey
- the y coordinatez
- the z coordinateout
- the point in this node nearest to the given coordinates- Returns:
- nearest node
public N getNearestNode(Point givenPoint)
Looking for the closest node in this network to the given point.
- Specified by:
getNearestNode
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Parameters:
givenPoint
- the given point- Returns:
- nearest node
public N getNearestNode(Point givenPoint, Point out)
Looking for the closest node in this network to the given point.
- Parameters:
givenPoint
- the given pointout
- the point in this node nearest to the given point- Returns:
- nearest node
public P getNearestPath(Agent agent, Point out)
Looking for the closest path in this network to the given agent.
- Parameters:
agent
- the given agentout
- the point in this path nearest to the given agent- Returns:
- nearest path
public P getNearestPath(double x, double y, double z, Point out)
Looking for the closest path in this network to the given coordinates.
- Parameters:
x
- the x coordinatey
- the y coordinatez
- the z coordinateout
- the point in this path nearest to the given coordinates- Returns:
- the nearest path
public P getNearestPath(Point givenPoint, Point out)
Looking for the closest path in this network to the given point.
- Parameters:
givenPoint
- the given agentout
- the point in this path nearest to the given point- Returns:
- the nearest path
public abstract double getPlainDistance(Point firstPoint, Point secondPoint)
Description copied from interface:
INetwork
Straight line distance between two points.
- Specified by:
getPlainDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
- Returns:
- distance between two points
public double getPlainDistance(Point firstPoint, Point secondPoint, LengthUnits units)
Description copied from interface:
INetwork
Straight line distance between two points in given units of length.
- Specified by:
getPlainDistance
in interfaceINetwork<N extends INode<N,P>,P extends IPath<N>>
units
- unit of length- Returns:
- distance between two points
public double getDistance(Point startPoint, Point endPoint)
Description copied from interface:
IRouteProvider
Creates a route from one point to another and calculates its length.
Uses route provider to create a route.
- Specified by:
getDistance
in interfaceIRouteProvider<N extends INode<N,P>>
- Parameters:
startPoint
- Start point of a routeendPoint
- End point of a route- Returns:
- length of a route from one point to another
public ShortestPathData<N,P> getPathData(Point startPoint, Point endPoint, ShortestPathData<N,P> out)
Description copied from interface:
IRouteProvider
Retrieves the route data an agent will use to calculate
the route length and determine its position on the route
by calling
IRouteProvider.getLength(IPathData)
and
IRouteProvider.getPositionAtOffset(IPathData, double, Position)
respectively.- Specified by:
getPathData
in interfaceIRouteProvider<N extends INode<N,P>>
- Parameters:
startPoint
- Start point of the routeendPoint
- End point of the routeout
- This parameter was added to prevent creating additional instances of route data objects; could benull
- Returns:
- the route data to move an agent between specified points;
- See Also:
IPathData
public Position getPositionAtOffset(ShortestPathData<N,P> pathData, double offset, Position out)
Description copied from interface:
IRouteProvider
Retrieves agent's position on the route.
- Specified by:
getPositionAtOffset
in interfaceIRouteProvider<N extends INode<N,P>>
- Parameters:
pathData
- The route data of moving agentoffset
- The distance that agent should pass to reach the end of the routeout
- This parameter was added to prevent creating additional instances; could benull
- Returns:
- Agent's position on the route
- See Also:
Position
,IPathData
public double getLength(ShortestPathData<N,P> pathData)
Description copied from interface:
IRouteProvider
Retrieves length of the specified route.
- Specified by:
getLength
in interfaceIRouteProvider<N extends INode<N,P>>
- Parameters:
pathData
- the route data- Returns:
- length of the specified route
-
How can we improve this article?
-