Package com.anylogic.engine.markup
- java.lang.Object
- com.anylogic.engine.markup.AbstractMarkupAggregator<Owner>
- com.anylogic.engine.markup.AbstractNetwork<GISNode,
- com.anylogic.engine.markup.GISNetwork
- All Implemented Interfaces:
IRouteProvider<ShortestPathData<GISNode,
,GISRoute>> INetwork<GISNode,
,GISRoute> Serializable
public class GISNetwork extends AbstractNetwork<GISNode,GISRoute, ShapeGISMap>
Implementation of network for agent movement in GIS space.
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
Constructor | Description |
---|---|
GISNetwork |
Creates an empty network without nodes and edges.
|
GISNetwork |
Creates an empty network without nodes and edges.
|
GISNetwork |
Creates network with nodes and edges in GIS space and initializes it.
|
Modifier and Type | Method | Description |
---|---|---|
void | addAll |
Adds nodes and relations to this network.
|
Stream<? extends AbstractMarkup> | elementsInternal() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
final Class<? extends ExtAgentWithSpatialMetrics> | getCompatibleAgentExtensionClass() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
GISNode | getNearestNode |
Returns the node in this network that is the closest to the given latitude and longitude
|
double | getPlainDistance |
Straight line distance between two points.
|
Agent | getSpace() |
Returns the space where the markup element is defined
|
void | initialize() |
Initialization of markup aggregator (e.g.
|
add, add, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getLength, getNearestNetworkElement, getNearestNetworkElement, getNearestNetworkElement, getNearestNode, getNearestNode, getNearestNode, getNearestNode, getNearestPath, getNearestPath, getNearestPath, getNode, getNodeCount, getPath, getPathCount, getPathData, getPlainDistance, getPosition, getPosition, getPositionAtOffset, getRelatedNetworks, nodes, paths, ports
public GISNetwork(ShapeGISMap map, String name)
Creates an empty network without nodes and edges. Use methods
add(GISNode)
and add(GISRoute)
to fill network
then call initialize()
method to prepare network for using
in an agent's movement.- Parameters:
map
- GIS map which network is painted byname
- the name of the network
public GISNetwork(ShapeGISMap map, String name, boolean visible)
Creates an empty network without nodes and edges. Use methods
add(GISNode)
and add(GISRoute)
to fill network
then call initialize()
method to prepare network for using
in an agent's movement.- Parameters:
map
- GIS map which network is painted byname
- the name of the networkvisible
- determines visibility of network's elements
public GISNetwork(ShapeGISMap map, String name, boolean visible, GISMarkupElement... markupShapes)
Creates network with nodes and edges in GIS space and initializes it.
Network can't be modified after initialization.
- Parameters:
map
- GIS map which network is painted byname
- the name of the networkvisible
- determines visibility of network's markup elementsmarkupShapes
- markup elements
public void initialize()
Initialization of markup aggregator (e.g. network).It can't be modified since this method has been called.
@AnyLogicInternalAPI public Stream<? extends AbstractMarkup> elementsInternal()
Description copied from class:
AbstractMarkupAggregator
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.
- Specified by:
elementsInternal
in classAbstractMarkupAggregator<ShapeGISMap>
public void addAll(GISMarkupElement... markupShapes)
Adds nodes and relations to this network. The network should be uninitialized.
- Parameters:
markupShapes
- elements to be added
public GISNode getNearestNode(double lat, double lon)
Returns the node in this network that is the closest to the given latitude and longitude
- Parameters:
lat
- latitudelon
- longitude- Returns:
- nearest node to the specified coords
public Agent getSpace()
Description copied from interface:
INetwork
Returns the space where the markup element is defined
- Returns:
- the space associated with this element
public double getPlainDistance(Point firstPoint, Point secondPoint)
Description copied from interface:
INetwork
Straight line distance between two points.
- Specified by:
getPlainDistance
in interfaceINetwork<GISNode,
GISRoute> - Specified by:
getPlainDistance
in classAbstractNetwork<GISNode,
GISRoute, ShapeGISMap> - Returns:
- distance between two points
@AnyLogicInternalAPI public final Class<? extends ExtAgentWithSpatialMetrics> getCompatibleAgentExtensionClass()
Description copied from interface:
INetwork
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.