AnyLogic
Expand
Font size
All Implemented Interfaces:
IRouteProvider<ShortestPathData<N,P>>, INetwork<N,P>, 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

Constructor Summary

ConstructorDescription
AbstractNetwork(Owner owner, String name) 
AbstractNetwork(Owner owner, String name, boolean isPublic, boolean visible) 

Method Summary

Modifier and TypeMethodDescription
voidadd(N n)
Adds node to network.
voidadd(P p)
Adds relation to network.
doublegetDistance(Point startPoint, Point endPoint)
Creates a route from one point to another and calculates its length.
doublegetDistance(Point source, Point target, ShortestPathData<N,P> data)
Calculates the distance between two points using the network paths.
doublegetDistance(Point source, Point target, ShortestPathData<N,P> data, LengthUnits units)
Calculates the distance between two points using the network paths.
doublegetDistance(Point source, Point target, N from, N to, ShortestPathData<N,P> data)
Calculates the distance between two points using the network paths.
doublegetDistance(Point source, Point target, N from, N to, ShortestPathData<N,P> data, LengthUnits units)
Calculates the distance between two points using the network paths.
doublegetDistance(Point source, Point target, N from, P to, double toOffset, ShortestPathData<N,P> data)
Calculates the distance between two points using the network paths.
doublegetDistance(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.
doublegetDistance(Point source, Point target, P from, double fromOffset, N to, ShortestPathData<N,P> data)
Calculates the distance between two points using the network paths.
doublegetDistance(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.
doublegetDistance(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.
doublegetDistance(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.
doublegetDistance(N from, N to, ShortestPathData<N,P> data)
Calculates the distance from source object in the network to the target object.
doublegetDistance(N from, N to, ShortestPathData<N,P> data, LengthUnits units)
Calculates the distance from source object in the network to the target object.
doublegetDistance(N from, P to, double toOffset, ShortestPathData<N,P> data)
Calculates the distance from source object in the network to the target object.
doublegetDistance(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.
doublegetDistance(P from, double fromOffset, N to, ShortestPathData<N,P> data)
Calculates the distance from source object in the network to the target object.
doublegetDistance(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.
doublegetDistance(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.
doublegetDistance(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.
doublegetLength(ShortestPathData<N,P> pathData)
Retrieves length of the specified route.
INetworkMarkupElementgetNearestNetworkElement(double x, double y, double z, Point out)
Looking for the closest markup element in this network to the given coordinates.
INetworkMarkupElementgetNearestNetworkElement(Agent agent, Point out)
Looking for the closest markup element in this network to the given agent.
INetworkMarkupElementgetNearestNetworkElement(Point givenPoint, Point out)
Looking for the closest markup element in this network to the given point.
NgetNearestNode(double x, double y, double z, Point out)
Looking for the closest node in this network to the given coordinates.
NgetNearestNode(Agent agent, Point out)
Looking for the closest node in this network to the given agent.
NgetNearestNode(Point givenPoint)
Looking for the closest node in this network to the given point.
NgetNearestNode(Point givenPoint, Point out)
Looking for the closest node in this network to the given point.
PgetNearestPath(double x, double y, double z, Point out)
Looking for the closest path in this network to the given coordinates.
PgetNearestPath(Agent agent, Point out)
Looking for the closest path in this network to the given agent.
PgetNearestPath(Point givenPoint, Point out)
Looking for the closest path in this network to the given point.
NgetNode(int index) 
intgetNodeCount()
Amount of nodes in this network.
PgetPath(int index) 
intgetPathCount()
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 doublegetPlainDistance(Point firstPoint, Point secondPoint)
Straight line distance between two points.
doublegetPlainDistance(Point firstPoint, Point secondPoint, LengthUnits units)
Straight line distance between two points in given units of length.
PositiongetPosition(ShortestPathData<N,P> data, double offset, LengthUnits units, Position out)
Calculates current position on the shortest path through network by the given offset
PositiongetPosition(ShortestPathData<N,P> data, double offset, Position out)
Calculates current position on the shortest path through network by the given offset
PositiongetPositionAtOffset(ShortestPathData<N,P> pathData, double offset, Position out)
Retrieves agent's position on the route.
List<INetwork<?,?>>getRelatedNetworks() 
List<N>nodes() 
List<P>paths() 
List<NetworkPort>ports() 

Methods inherited from class com.anylogic.engine.markup.AbstractMarkupAggregator

elementsInternal, error, getName, getOwner, initializeInternal, isVisible, onAggregatorVisibilityChanged, setVisible

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface com.anylogic.engine.markup.INetwork

getCompatibleAgentExtensionClass, getSpace

Constructor Details

AbstractNetwork

public AbstractNetwork(Owner owner,
 String name)

AbstractNetwork

public AbstractNetwork(Owner owner,
 String name,
 boolean isPublic,
 boolean visible)

Method Details

add

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 interface INetwork<N extends INode<N,P>,P extends IPath<N>>
Parameters:
n - network node, instance of INode

add

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 interface INetwork<N extends INode<N,P>,P extends IPath<N>>
Parameters:
p - network path, instance of IPath

getNode

public N getNode(int index)
Specified by:
getNode in interface INetwork<N extends INode<N,P>,P extends IPath<N>>

getNodeCount

public int getNodeCount()
Description copied from interface: INetwork
Amount of nodes in this network.
Specified by:
getNodeCount in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
Returns:
amount of nodes

getPath

public P getPath(int index)
Specified by:
getPath in interface INetwork<N extends INode<N,P>,P extends IPath<N>>

getPathCount

public int getPathCount()
Description copied from interface: INetwork
Amount of paths in this network.
Specified by:
getPathCount in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
Returns:
amount of paths

ports

public List<NetworkPort> ports()
Specified by:
ports in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
Returns:
all ports of this network

nodes

public List<N> nodes()
Specified by:
nodes in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
Returns:
all nodes of this network

paths

public List<P> paths()
Specified by:
paths in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
Returns:
all paths of this network

getRelatedNetworks

@AnyLogicInternalAPI
public List<INetwork<?,?>> getRelatedNetworks()
Specified by:
getRelatedNetworks in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
Returns:
list of related networks

getDistance

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:
  • From network node - extracted point is a connection point of the node and the path, that will be used to calculate distance
  • From path and offset - extracted point lies at the certain distance (offset) from the start of the path
  • Specified by:
    getDistance in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    from - from node
    to - to node
    data - output object to write to, may be null
    Returns:
    distance between two points in the network

    getDistance

    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:
  • From network node - extracted point is a connection point of the node and the path, that will be used to calculate distance
  • From path and offset - extracted point lies at the certain distance (offset) from the start of the path
  • Specified by:
    getDistance in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    from - source node
    to - target node
    data - output object to write to, may be null
    units - length units
    Returns:
    distance between two points in the network

    getDistance

    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:
  • From network node - extracted point is a connection point of the node and the path, that will be used to calculate distance
  • From path and offset - extracted point lies at the certain distance (offset) from the start of the path
  • Specified by:
    getDistance in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    from - source node
    to - target path
    toOffset - offset on the target path
    data - output object to write to, may be null
    Returns:
    distance between two points in the network

    getDistance

    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:
  • From network node - extracted point is a connection point of the node and the path, that will be used to calculate distance
  • From path and offset - extracted point lies at the certain distance (offset) from the start of the path
  • Specified by:
    getDistance in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    from - source node
    to - target path
    toOffset - offset on the target path
    data - output object to write to, may be null
    units - length units
    Returns:
    distance between two points in the network

    getDistance

    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:
  • From network node - extracted point is a connection point of the node and the path, that will be used to calculate distance
  • From path and offset - extracted point lies at the certain distance (offset) from the start of the path
  • Specified by:
    getDistance in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    from - source path
    fromOffset - offset on the source path
    to - target node
    data - output object to write to, may be null
    Returns:
    distance between two points in the network

    getDistance

    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:
  • From network node - extracted point is a connection point of the node and the path, that will be used to calculate distance
  • From path and offset - extracted point lies at the certain distance (offset) from the start of the path
  • Specified by:
    getDistance in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    from - source path
    fromOffset - offset on the source path
    to - target node
    data - output object to write to, may be null
    units - length units
    Returns:
    distance between two points in the network

    getDistance

    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:
  • From network node - extracted point is a connection point of the node and the path, that will be used to calculate distance
  • From path and offset - extracted point lies at the certain distance (offset) from the start of the path
  • Specified by:
    getDistance in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    from - source path
    fromOffset - offset on the source path
    to - target path
    toOffset - offset on the target path
    data - output object to write to, may be null
    Returns:
    distance between two points in the network

    getDistance

    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:
  • From network node - extracted point is a connection point of the node and the path, that will be used to calculate distance
  • From path and offset - extracted point lies at the certain distance (offset) from the start of the path
  • Specified by:
    getDistance in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    from - source path
    fromOffset - offset on the source path
    to - target path
    toOffset - offset on the target path
    data - output object to write to, may be null
    units - length units
    Returns:
    distance between two points in the network

    getDistance

    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:
  • Specifying the network node. The network point will lie at the connection point of the node and the path, that will be used to calculate distance
  • Specifying the path and the offset. The network point will lie at the certain distance (offset) from the start of this path
  • Specified by:
    getDistance in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    source - source point
    target - target point
    from - network starting node
    to - network end node
    data - output object to write into, may be null
    Returns:
    the distance between two points if traveling using network

    getDistance

    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:
  • Specifying the network node. The network point will lie at the connection point of the node and the path, that will be used to calculate distance
  • Specifying the path and the offset. The network point will lie at the certain distance (offset) from the start of this path
  • Specified by:
    getDistance in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    source - source point
    target - target point
    from - network starting node
    to - network end node
    data - output object to write into, may be null
    units - length units
    Returns:
    the distance between two points if traveling using network

    getDistance

    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:
  • Specifying the network node. The network point will lie at the connection point of the node and the path, that will be used to calculate distance
  • Specifying the path and the offset. The network point will lie at the certain distance (offset) from the start of this path
  • Specified by:
    getDistance in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    source - source point
    target - target point
    from - network starting node
    to - network end path
    toOffset - offset on the network end path
    data - output object to write into, may be null
    Returns:
    the distance between two points if traveling using network

    getDistance

    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:
  • Specifying the network node. The network point will lie at the connection point of the node and the path, that will be used to calculate distance
  • Specifying the path and the offset. The network point will lie at the certain distance (offset) from the start of this path
  • Specified by:
    getDistance in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    source - source point
    target - target point
    from - network starting node
    to - network end path
    toOffset - offset on the network end path
    data - output object to write into, may be null
    units - length units
    Returns:
    the distance between two points if traveling using network

    getDistance

    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:
  • Specifying the network node. The network point will lie at the connection point of the node and the path, that will be used to calculate distance
  • Specifying the path and the offset. The network point will lie at the certain distance (offset) from the start of this path
  • Specified by:
    getDistance in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    source - source point
    target - target point
    from - network starting path
    fromOffset - offset on the network starting path
    to - network end node
    data - output object to write into, may be null
    Returns:
    the distance between two points if traveling using network

    getDistance

    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:
  • Specifying the network node. The network point will lie at the connection point of the node and the path, that will be used to calculate distance
  • Specifying the path and the offset. The network point will lie at the certain distance (offset) from the start of this path
  • Specified by:
    getDistance in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    source - source point
    target - target point
    from - network starting path
    fromOffset - offset on the network starting path
    to - network end node
    data - output object to write into, may be null
    units - length units
    Returns:
    the distance between two points if traveling using network

    getDistance

    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:
  • Specifying the network node. The network point will lie at the connection point of the node and the path, that will be used to calculate distance
  • Specifying the path and the offset. The network point will lie at the certain distance (offset) from the start of this path
  • Specified by:
    getDistance in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    source - source point
    target - target point
    from - network starting path
    fromOffset - offset on the network starting path
    to - network end path
    toOffset - offset on the network end path
    data - output object to write into, may be null
    Returns:
    the distance between two points if traveling using network

    getDistance

    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:
  • Specifying the network node. The network point will lie at the connection point of the node and the path, that will be used to calculate distance
  • Specifying the path and the offset. The network point will lie at the certain distance (offset) from the start of this path
  • Specified by:
    getDistance in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    source - source point
    target - target point
    from - network starting path
    fromOffset - offset on the network starting path
    to - network end path
    toOffset - offset on the network end path
    data - output object to write into, may be null
    units - length units
    Returns:
    the distance between two points if traveling using network

    getDistance

    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 interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    source - source point
    target - target point
    data - data output object to write into, may be null
    Returns:
    the distance between two points if traveling using network

    getDistance

    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 interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    source - source point
    target - target point
    data - data output object to write into, may be null
    units - length units
    Returns:
    the distance between two points if traveling using network

    getPosition

    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 interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    data - shortest path data, see #getDistance(Node, Node, ShortestPathData) methods
    offset - offset from the end of route
    out - the Position object to use for output, may be null
    Returns:
    the position on the shortest path

    getPosition

    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 interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    data - shortest path data, see #getDistance(Node, Node, ShortestPathData) methods
    offset - offset from the end of route
    units - the units of length
    out - the Position object to use for output, may be null
    Returns:
    the position on the shortest path

    getNearestNetworkElement

    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 interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    x - the x given coordinate
    y - the y given coordinate
    z - the z given coordinate
    out - the point in this markup element nearest to the given coordinates
    Returns:
    nearest markup element

    getNearestNetworkElement

    public INetworkMarkupElement getNearestNetworkElement(Agent agent,
     Point out)
    Looking for the closest markup element in this network to the given agent.
    Parameters:
    agent - the given agent
    out - the point in this markup element nearest to the given agent
    Returns:
    nearest markup element

    getNearestNetworkElement

    public INetworkMarkupElement getNearestNetworkElement(Point givenPoint,
     Point out)
    Looking for the closest markup element in this network to the given point.
    Specified by:
    getNearestNetworkElement in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    givenPoint - the given point
    out - the point in this markup element nearest to the given point
    Returns:
    nearest markup element

    getNearestNode

    public N getNearestNode(Agent agent,
     Point out)
    Looking for the closest node in this network to the given agent.
    Parameters:
    agent - the given agent
    out - the point in this node nearest to the given agent
    Returns:
    nearest node

    getNearestNode

    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 coordinate
    y - the y coordinate
    z - the z coordinate
    out - the point in this node nearest to the given coordinates
    Returns:
    nearest node

    getNearestNode

    public N getNearestNode(Point givenPoint)
    Looking for the closest node in this network to the given point.
    Specified by:
    getNearestNode in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Parameters:
    givenPoint - the given point
    Returns:
    nearest node

    getNearestNode

    public N getNearestNode(Point givenPoint,
     Point out)
    Looking for the closest node in this network to the given point.
    Parameters:
    givenPoint - the given point
    out - the point in this node nearest to the given point
    Returns:
    nearest node

    getNearestPath

    public P getNearestPath(Agent agent,
     Point out)
    Looking for the closest path in this network to the given agent.
    Parameters:
    agent - the given agent
    out - the point in this path nearest to the given agent
    Returns:
    nearest path

    getNearestPath

    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 coordinate
    y - the y coordinate
    z - the z coordinate
    out - the point in this path nearest to the given coordinates
    Returns:
    the nearest path

    getNearestPath

    public P getNearestPath(Point givenPoint,
     Point out)
    Looking for the closest path in this network to the given point.
    Parameters:
    givenPoint - the given agent
    out - the point in this path nearest to the given point
    Returns:
    the nearest path

    getPlainDistance

    public abstract double getPlainDistance(Point firstPoint,
     Point secondPoint)
    Description copied from interface: INetwork
    Straight line distance between two points.
    Specified by:
    getPlainDistance in interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    Returns:
    distance between two points

    getPlainDistance

    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 interface INetwork<N extends INode<N,P>,P extends IPath<N>>
    units - unit of length
    Returns:
    distance between two points

    getDistance

    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 interface IRouteProvider<N extends INode<N,P>>
    Parameters:
    startPoint - Start point of a route
    endPoint - End point of a route
    Returns:
    length of a route from one point to another

    getPathData

    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 interface IRouteProvider<N extends INode<N,P>>
    Parameters:
    startPoint - Start point of the route
    endPoint - End point of the route
    out - This parameter was added to prevent creating additional instances of route data objects; could be null
    Returns:
    the route data to move an agent between specified points;
    See Also:
    IPathData

    getPositionAtOffset

    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 interface IRouteProvider<N extends INode<N,P>>
    Parameters:
    pathData - The route data of moving agent
    offset - The distance that agent should pass to reach the end of the route
    out - This parameter was added to prevent creating additional instances; could be null
    Returns:
    Agent's position on the route
    See Also:
    PositionIPathData

    getLength

    public double getLength(ShortestPathData<N,P> pathData)
    Description copied from interface: IRouteProvider
    Retrieves length of the specified route.
    Specified by:
    getLength in interface IRouteProvider<N extends INode<N,P>>
    Parameters:
    pathData - the route data
    Returns:
    length of the specified route