public class DynamicLinkLevelSelector extends java.lang.Object implements LinkLevelSelector, XMLConfigurable
Modifier and Type | Field and Description |
---|---|
static int |
UNKNOWN_LINK_LEVEL |
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
int |
getLinkLevelToExpand(LODAnalysisInfo ai)
Returns the link level for the next node to expand on.
|
int[] |
getUserDataCategories()
Returns the required user data categories.
|
java.lang.String |
getXMLSchema()
Returns the XML schema for the input parameter.
|
void |
init(org.w3c.dom.Element parameter)
Initializes the XML configurable object with the input parameter.
|
boolean |
requiresAnalysisInfo()
Whether analysis info is required.
|
void |
reset(HeavyPointOnNet[][] points)
Resets the attributes of this link level selector according to the input points of interest.
|
void |
setNetworkAnalyst(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.
|
public static final int UNKNOWN_LINK_LEVEL
public DynamicLinkLevelSelector()
public DynamicLinkLevelSelector(NetworkAnalyst analyst, int maxLinkLevel, HeuristicCostFunction costFunction, double[] costThresholds, int numHighLevelNeighbors, double costMultiplier, LODNetworkConstraint constraint) throws LODNetworkException
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.LODNetworkException
public void init(org.w3c.dom.Element parameter)
XMLConfigurable
init
in interface XMLConfigurable
parameter
- an XML element containing the necessary information to initialize the object.public java.lang.String getXMLSchema()
XMLConfigurable
getXMLSchema
in interface XMLConfigurable
public void reset(HeavyPointOnNet[][] points) throws LODNetworkException
LinkLevelSelector
reset
in interface LinkLevelSelector
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.LODNetworkException
public int getLinkLevelToExpand(LODAnalysisInfo ai) throws LODNetworkException
LinkLevelSelector
getLinkLevelToExpand
in interface LinkLevelSelector
ai
- analysis informationLODNetworkException
public boolean requiresAnalysisInfo()
LinkLevelSelector
requiresAnalysisInfo
in interface LinkLevelSelector
public int[] getUserDataCategories()
LinkLevelSelector
getUserDataCategories
in interface LinkLevelSelector
public void setNetworkAnalyst(NetworkAnalyst analyst)
LinkLevelSelector
setNetworkAnalyst
in interface LinkLevelSelector