public interface INetwork<N extends INode<N,P>,P extends IPath<N>> extends IRouteProvider<ShortestPathData<N,P>>
Modifier and Type  Method and Description 

void 
add(N n)
Adds node to network.

void 
add(P p)
Adds relation to network.

java.lang.Class<? extends ExtAgentWithSpatialMetrics> 
getCompatibleAgentExtensionClass()
This method is internal and shouldn't be called by user.

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 
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(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.

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(Point givenPoint,
Point out)
Looking for the closest markup element in this network to the given point.

N 
getNearestNode(Point p)
Looking for the closest node 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.

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 reverseOffset,
LengthUnits units,
Position out)
Calculates current position on the shortest path through network by the given offset

Position 
getPosition(ShortestPathData<N,P> data,
double reverseOffset,
Position out)
Calculates current position on the shortest path through network by the given offset

java.util.List<INetwork<?,?>> 
getRelatedNetworks() 
Agent 
getSpace()
Returns the space where the markup element is defined

java.util.List<N> 
nodes() 
java.util.List<P> 
paths() 
java.util.List<NetworkPort> 
ports() 
getDistance, getLength, getPathData, getPositionAtOffset
void add(N n)
n
 network node, instance of INode
void add(P p)
p
 network path, instance of IPath
N getNearestNode(Point p)
p
 the given pointINetworkMarkupElement getNearestNetworkElement(double x, double y, double z, Point out)
x
 the x given coordinatey
 the y given coordinatez
 the z given coordinateout
 the point in this markup element nearest to the given coordinatesINetworkMarkupElement getNearestNetworkElement(Point givenPoint, Point out)
givenPoint
 the given pointout
 the point in this markup element nearest to the given pointN getNode(int index)
int getNodeCount()
P getPath(int index)
int getPathCount()
java.util.List<NetworkPort> ports()
java.util.List<N> nodes()
java.util.List<P> paths()
@AnyLogicInternalAPI java.util.List<INetwork<?,?>> getRelatedNetworks()
double getDistance(N from, N to, ShortestPathData<N,P> data)
from
 from nodeto
 to nodedata
 output object to write to, may be nulldouble getDistance(N from, N to, ShortestPathData<N,P> data, LengthUnits units)
from
 source nodeto
 target nodedata
 output object to write to, may be nullunits
 length unitsdouble getDistance(N from, P to, double toOffset, ShortestPathData<N,P> data)
from
 source nodeto
 target pathtoOffset
 offset on the target pathdata
 output object to write to, may be nulldouble getDistance(N from, P to, double toOffset, ShortestPathData<N,P> data, LengthUnits units)
from
 source nodeto
 target pathtoOffset
 offset on the target pathdata
 output object to write to, may be nullunits
 length unitsdouble getDistance(P from, double fromOffset, N to, ShortestPathData<N,P> data)
from
 source pathfromOffset
 offset on the source pathto
 target nodedata
 output object to write to, may be nulldouble getDistance(P from, double fromOffset, N to, ShortestPathData<N,P> data, LengthUnits units)
from
 source pathfromOffset
 offset on the source pathto
 target nodedata
 output object to write to, may be nullunits
 length unitsdouble getDistance(P from, double fromOffset, P to, double toOffset, ShortestPathData<N,P> data)
from
 source pathfromOffset
 offset on the source pathto
 target pathtoOffset
 offset on the target pathdata
 output object to write to, may be nulldouble getDistance(P from, double fromOffset, P to, double toOffset, ShortestPathData<N,P> data, LengthUnits units)
from
 source pathfromOffset
 offset on the source pathto
 target pathtoOffset
 offset on the target pathdata
 output object to write to, may be nullunits
 length unitsdouble getDistance(Point source, Point target, N from, N to, ShortestPathData<N,P> data)
source
 source pointtarget
 target pointfrom
 network starting nodeto
 network end nodedata
 output object to write into, may be nulldouble getDistance(Point source, Point target, N from, N to, ShortestPathData<N,P> data, LengthUnits units)
source
 source pointtarget
 target pointfrom
 network starting nodeto
 network end nodedata
 output object to write into, may be nullunits
 length unitsdouble getDistance(Point source, Point target, N from, P to, double toOffset, ShortestPathData<N,P> data)
source
 source pointtarget
 target pointfrom
 network starting nodeto
 network end pathtoOffset
 offset on the network end pathdata
 output object to write into, may be nulldouble getDistance(Point source, Point target, N from, P to, double toOffset, ShortestPathData<N,P> data, LengthUnits units)
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 unitsdouble getDistance(Point source, Point target, P from, double fromOffset, N to, ShortestPathData<N,P> data)
source
 source pointtarget
 target pointfrom
 network starting pathfromOffset
 offset on the network starting pathto
 network end nodedata
 output object to write into, may be nulldouble getDistance(Point source, Point target, P from, double fromOffset, N to, ShortestPathData<N,P> data, LengthUnits units)
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 unitsdouble getDistance(Point source, Point target, P from, double fromOffset, P to, double toOffset, ShortestPathData<N,P> data)
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 nulldouble getDistance(Point source, Point target, P from, double fromOffset, P to, double toOffset, ShortestPathData<N,P> data, LengthUnits units)
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 unitsdouble getDistance(Point source, Point target, ShortestPathData<N,P> data)
source
 source pointtarget
 target pointdata
 data output object to write into, may be nulldouble getDistance(Point source, Point target, ShortestPathData<N,P> data, LengthUnits units)
source
 source pointtarget
 target pointdata
 data output object to write into, may be nullunits
 length unitsdouble getPlainDistance(Point firstPoint, Point secondPoint)
firstPoint
 secondPoint
 double getPlainDistance(Point firstPoint, Point secondPoint, LengthUnits units)
firstPoint
 secondPoint
 units
 unit of lengthPosition getPosition(ShortestPathData<N,P> data, double reverseOffset, Position out)
data
 shortest path data, see #getDistance(Node, Node, ShortestPathData)
methodsreverseOffset
 offset from the end of routeout
 the Position object to use for output, may be null
Position getPosition(ShortestPathData<N,P> data, double reverseOffset, LengthUnits units, Position out)
data
 shortest path data, see #getDistance(Node, Node, ShortestPathData)
methodsreverseOffset
 offset from the end of routeunits
 the units of lengthout
 the Position object to use for output, may be null
Agent getSpace()
@AnyLogicInternalAPI java.lang.Class<? extends ExtAgentWithSpatialMetrics> getCompatibleAgentExtensionClass()
Copyright © AnyLogic North America, LLC. All Rights Reserved.