Package oracle.spatial.network.lod
Class DynamicLinkLevelSelector
- java.lang.Object
-
- oracle.spatial.network.lod.DynamicLinkLevelSelector
-
- All Implemented Interfaces:
LinkLevelSelector,XMLConfigurable
public class DynamicLinkLevelSelector extends java.lang.Object implements LinkLevelSelector, XMLConfigurable
This implementation of LinkLevelSelector dynamically assigns link level to the next node according to the distance from the next node to the start/end point.- Since:
- 11gR2
-
-
Field Summary
Fields Modifier and Type Field Description static intUNKNOWN_LINK_LEVEL
-
Constructor Summary
Constructors Constructor Description DynamicLinkLevelSelector()Default constructor.DynamicLinkLevelSelector(NetworkAnalyst analyst, int maxLinkLevel, HeuristicCostFunction costFunction, double[] costThresholds, int numHighLevelNeighbors, double costMultiplier, LODNetworkConstraint constraint)Returns a dynamic link level selector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetLinkLevelToExpand(LODAnalysisInfo ai)Returns the link level for the next node to expand on.int[]getUserDataCategories()Returns the required user data categories.java.lang.StringgetXMLSchema()Returns the XML schema for the input parameter.voidinit(org.w3c.dom.Element parameter)Initializes the XML configurable object with the input parameter.booleanrequiresAnalysisInfo()Whether analysis info is required.voidreset(HeavyPointOnNet[][] points)Resets the attributes of this link level selector according to the input points of interest.voidsetNetworkAnalyst(NetworkAnalyst analyst)This method allows caller to pass the network analyst object to this link level selector, so that the link level selector can call the analysis functions provided by the network analyst, or access the network explorer associated with the network analyst.
-
-
-
Field Detail
-
UNKNOWN_LINK_LEVEL
public static final int UNKNOWN_LINK_LEVEL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DynamicLinkLevelSelector
public DynamicLinkLevelSelector()
Default constructor. After this object is created using this default constructor, method init(Element) should be called to initialize it.
-
DynamicLinkLevelSelector
public DynamicLinkLevelSelector(NetworkAnalyst analyst, int maxLinkLevel, HeuristicCostFunction costFunction, double[] costThresholds, int numHighLevelNeighbors, double costMultiplier, LODNetworkConstraint constraint) throws LODNetworkException
Returns a dynamic link level selector.- Parameters:
maxLinkLevel- maximum link level to expand oncostFunction- heuristic cost functioncostThresholds- cost threshold. If the heuristic cost from the start node to the end node is less than the costThresholds[i], then the link level to expand on is set to the link level i+1.numHighLevelNeighbors- number of high level nodes to consider while computing the start and end cost threshold. The higher the value of this parameter, the more low level expansion will be used.costMultiplier- cost multiplier used to compute the start and end cost threshold. The higher the value of this parameter, the more low level expansions will be used.- Throws:
LODNetworkException
-
-
Method Detail
-
init
public void init(org.w3c.dom.Element parameter)
Description copied from interface:XMLConfigurableInitializes the XML configurable object with the input parameter.- Specified by:
initin interfaceXMLConfigurable- Parameters:
parameter- an XML element containing the necessary information to initialize the object.
-
getXMLSchema
public java.lang.String getXMLSchema()
Description copied from interface:XMLConfigurableReturns the XML schema for the input parameter.- Specified by:
getXMLSchemain interfaceXMLConfigurable- Returns:
-
reset
public void reset(HeavyPointOnNet[][] points) throws LODNetworkException
Description copied from interface:LinkLevelSelectorResets the attributes of this link level selector according to the input points of interest.- Specified by:
resetin interfaceLinkLevelSelector- Parameters:
points- points of interest. Each member of the array is an array of equivalent points. For example, in a road network, equivalent points can be the points on either side of a two way road.- Throws:
LODNetworkException
-
getLinkLevelToExpand
public int getLinkLevelToExpand(LODAnalysisInfo ai) throws LODNetworkException
Description copied from interface:LinkLevelSelectorReturns the link level for the next node to expand on.- Specified by:
getLinkLevelToExpandin interfaceLinkLevelSelector- Parameters:
ai- analysis information- Returns:
- Throws:
LODNetworkException
-
requiresAnalysisInfo
public boolean requiresAnalysisInfo()
Description copied from interface:LinkLevelSelectorWhether analysis info is required.- Specified by:
requiresAnalysisInfoin interfaceLinkLevelSelector- Returns:
- true is analysis info cannot be null; false, otherwise.
-
getUserDataCategories
public int[] getUserDataCategories()
Description copied from interface:LinkLevelSelectorReturns the required user data categories.- Specified by:
getUserDataCategoriesin interfaceLinkLevelSelector- Returns:
-
setNetworkAnalyst
public void setNetworkAnalyst(NetworkAnalyst analyst)
Description copied from interface:LinkLevelSelectorThis method allows caller to pass the network analyst object to this link level selector, so that the link level selector can call the analysis functions provided by the network analyst, or access the network explorer associated with the network analyst. If network analyst is not needed by the link level selector, the link level selector can choose to do nothing with this method.- Specified by:
setNetworkAnalystin interfaceLinkLevelSelector
-
-