Class NetworkAnalyst


  • public class NetworkAnalyst
    extends java.lang.Object
    This class is the single entry point to all the network analysis operations supported by NDM LOD. To get an instance of this class, use
        NetworkAnalyst analyst = LODNetworkManager.getNetworkAnalyst(networkIO);
      
    where networkIO is an NetworkIO object for the network of interest.

    Users can define their own link cost calculators or node cost calculators. Note that if you choose to use your own link or node cost calculators, you must set both link and node cost calculators in pairs, that is, there must be the same number of link cost calculators as that of the node cost calculators, and the ith link cost calculator must correspond to the ith node cost calculator.

    Since:
    11gR1
    • Method Detail

      • getNetworkExplorer

        public NetworkExplorer getNetworkExplorer()
        Returns the network explorer used by this network analyst.
      • setNetworkExplorer

        public void setNetworkExplorer​(NetworkExplorer ne)
      • setNetworkUpdates

        public void setNetworkUpdates​(java.util.HashMap<java.lang.Integer,​NetworkUpdate> networkUpdates)
        Sets the network update objects. These objects will be super imposed to the static network information during network analysis.
        Parameters:
        networkUpdates - network update objects for different link levels
      • setNetworkUpdate

        public void setNetworkUpdate​(java.util.HashMap<java.lang.Integer,​NetworkUpdate> networkUpdates)
        Sets the network update objects. These objects will be super imposed to the static network information during network analysis.
        Parameters:
        networkUpdates - network update objects for different link levels
      • getGoalNodeFilters

        public LODGoalNode[] getGoalNodeFilters()
        Returns the default goal node filters to be applied to all analysis functions.
        Returns:
      • getNetworkConstraints

        public LODNetworkConstraint[] getNetworkConstraints()
        Returns the default network constraints to be applied to all analysis functions.
        Returns:
      • getLinkLevelSelector

        public LinkLevelSelector getLinkLevelSelector()
        Returns the link level selector to be used by all analysis functions.
        Returns:
      • getShortestPathAlgorithm

        public ShortestPath getShortestPathAlgorithm()
        Returns the default shortest path algorithm.
        Returns:
      • setShortestPathAlgorithm

        public void setShortestPathAlgorithm​(ShortestPath spAlgorithm)
        Sets the default shortest path algorithm.
        Parameters:
        spAlgorithm -
      • getKShortestPathsAlgorithm

        public KShortestPaths getKShortestPathsAlgorithm()
        Returns the default k-shortest paths algorithm.
        Returns:
      • setKShortestPathsAlgorithm

        public void setKShortestPathsAlgorithm​(KShortestPaths kspAlgorithm)
        Sets the default k-shortest paths algorithm.
        Parameters:
        kspAlgorithm -
      • getPairwiseShortestPathsAlgorithm

        public PairwiseShortestPaths getPairwiseShortestPathsAlgorithm()
        Returns the default pairwise shortest paths algorithm.
        Returns:
      • setPairwiseShortestPathsAlgorithm

        public void setPairwiseShortestPathsAlgorithm​(PairwiseShortestPaths pwspAlgorithm)
        Sets the default pairwise shortest paths algorithm.
        Parameters:
        pwspAlgorithm -
      • getPairwiseCostCalculator

        public PairwiseCostCalculator getPairwiseCostCalculator()
        Returns the default pairwise cost calculator.
        Returns:
      • setPairwiseCostCalculator

        public void setPairwiseCostCalculator​(PairwiseCostCalculator pwcc)
        Sets the default pairwise cost calculator.
        Parameters:
        pwcc -
      • getTspAlgorithm

        public TSP getTspAlgorithm()
        Returns the default TSP algorithm.
        Returns:
      • setTspAlgorithm

        public void setTspAlgorithm​(TSP tspAlgorithm)
        Sets the default TSP algorithm.
        Parameters:
        tspAlgorithm -
      • resetCostCalculators

        public void resetCostCalculators()
        Restores the default settings of link cost calculators and node cost calculators, which uses the DefaultLinkCostCalculator as the primary link cost calculator and the DefaultNodeCostCalculator as the primary node cost calculator. No secondary cost calculators are set.
      • setLinkCostCalculator

        public void setLinkCostCalculator​(LinkCostCalculator calculator)
        Sets the primary link cost calculator, and removes all secondary link cost calculators. The primary link cost calculator is used to calculate the objective cost during network analysis.
        Parameters:
        calculator - link cost calculator
      • getLinkCostCalculator

        public LinkCostCalculator getLinkCostCalculator()
        Returns the primary link cost calculator. The primary link cost calculator is used to calculate the objective cost during network analysis.
        Returns:
        link cost calculator
      • setNodeCostCalculator

        public void setNodeCostCalculator​(NodeCostCalculator calculator)
        Sets the primary node cost calculator, and removes all secondary node cost calculators. The primary node cost calculator is used to calculate the objective cost during network analysis.
        Parameters:
        calculator - node cost calculator
      • getNodeCostCalculator

        public NodeCostCalculator getNodeCostCalculator()
        Returns the primary node cost calculator. The primary node cost calculator is used to calculate the objective cost during network analysis.
        Returns:
        node cost calculator
      • setLinkCostCalculators

        public void setLinkCostCalculators​(LinkCostCalculator[] calculators)
        Sets the link cost calculators. The first element in the array is the primary link cost calculator, which is used in calculating the objective cost during network analysis. The rest of the elements in the the array are secondary cost calculators, which can be used in network constraints.
        Parameters:
        calculators - link cost calculators
      • getLinkCostCalculators

        public LinkCostCalculator[] getLinkCostCalculators()
        Returns the link cost calculators. The first element in the array is the primary link cost calculator, which is used in calculating the objective cost during network analysis. The rest of the elements in the the array are secondary cost calculators, which can be used in network constraints.
        Returns:
        link cost calculators
      • setNodeCostCalculators

        public void setNodeCostCalculators​(NodeCostCalculator[] calculators)
        Sets the node cost calculators. The first element in the array is the primary node cost calculator, which is used in calculating the objective cost during network analysis. The rest of the elements in the the array are secondary cost calculators, which can be used in network constraints.
        Parameters:
        calculators - node cost calculators
      • getNodeCostCalculators

        public NodeCostCalculator[] getNodeCostCalculators()
        Returns the node cost calculators. The first element in the array is the primary node cost calculator, which is used in calculating the objective cost during network analysis. The rest of the elements in the the array are secondary cost calculators, which can be used in network constraints.
        Returns:
        node cost calculators
      • nearestNeighbors

        public LogicalSubPath[] nearestNeighbors​(PointOnNet startPoint,
                                                 int numberOfNeighbors,
                                                 LODNetworkConstraint constraint,
                                                 LODGoalNode goalNodeFilter)
                                          throws LODNetworkException
        Finds the nearest neighbors from the start point. Both the search and the target link level are set to the lowest link level
        Parameters:
        startPoint - start point on the network
        numberOfNeighbors - number of neighbors to be returned
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths to the nearest neighbors from the start point
        Throws:
        LODNetworkException
      • nearestNeighbors

        public LogicalSubPath[] nearestNeighbors​(PointOnNet startPoint,
                                                 int numberOfNeighbors,
                                                 int targetLinkLevel,
                                                 LODNetworkConstraint constraint,
                                                 LODGoalNode goalNodeFilter)
                                          throws LODNetworkException
        Finds the nearest neighbors from the start point. The search uses the lowest link level.
        Parameters:
        startPoint - start point on the network
        numberOfNeighbors - number of neighbors to be returned
        targetLinkLevel - maximum outgoing link level of the neighbors
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths to the nearest neighbors from the start point
        Throws:
        LODNetworkException
      • nearestNeighbors

        public LogicalSubPath[] nearestNeighbors​(PointOnNet startPoint,
                                                 int numberOfNeighbors,
                                                 int searchLinkLevel,
                                                 int targetLinkLevel,
                                                 LODNetworkConstraint constraint,
                                                 LODGoalNode goalNodeFilter)
                                          throws LODNetworkException
        Finds the nearest neighbors from the start point.
        Parameters:
        startPoint - start point on the network
        numberOfNeighbors - number of neighbors to be returned
        searchLinkLevel - the link level to search for neighbors
        targetLinkLevel - maximum outgoing link level of the neighbors
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths to the nearest neighbors from the start point
        Throws:
        LODNetworkException
      • nearestNeighbors

        public LogicalSubPath[] nearestNeighbors​(PointOnNet[] startPoints,
                                                 int numberOfNeighbors,
                                                 int searchLinkLevel,
                                                 int targetLinkLevel,
                                                 LODNetworkConstraint constraint,
                                                 LODGoalNode goalNodeFilter)
                                          throws LODNetworkException
        Finds the nearest neighbors from the start point candidates.
        Parameters:
        startPoints - start point candidates on the network
        numberOfNeighbors - number of neighbors to be returned
        searchLinkLevel - the link level to search for neighbors
        targetLinkLevel - maximum outgoing link level of the neighbors
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths to the nearest neighbors from the start point candidates
        Throws:
        LODNetworkException
      • nearestNeighborsLight

        public LogicalLightSubPath[] nearestNeighborsLight​(PointOnNet[] startPoints,
                                                           int numberOfNeighbors,
                                                           int searchLinkLevel,
                                                           int targetLinkLevel,
                                                           LODNetworkConstraint constraint,
                                                           LODGoalNode goalNodeFilter)
                                                    throws LODNetworkException
        Finds the nearest neighbors from the start point candidates.
        Parameters:
        startPoints - start point candidates on the network
        numberOfNeighbors - number of neighbors to be returned
        searchLinkLevel - the link level to search for neighbors
        targetLinkLevel - maximum outgoing link level of the neighbors
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths to the nearest neighbors from the start point candidates
        Throws:
        LODNetworkException
      • nearestReachingNeighbors

        public LogicalSubPath[] nearestReachingNeighbors​(PointOnNet endPoint,
                                                         int numberOfNeighbors,
                                                         LODNetworkConstraint constraint,
                                                         LODGoalNode goalNodeFilter)
                                                  throws LODNetworkException
        Finds the nearest reaching neighbors to the end point. Both the search and the target link levels are set to the lowest link level.
        Parameters:
        endPoint - end point on the network
        numberOfNeighbors - number of neighbors to be returned
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths from the nearest reaching neighbors to the end point
        Throws:
        LODNetworkException
      • nearestReachingNeighbors

        public LogicalSubPath[] nearestReachingNeighbors​(PointOnNet endPoint,
                                                         int numberOfNeighbors,
                                                         int targetLinkLevel,
                                                         LODNetworkConstraint constraint,
                                                         LODGoalNode goalNodeFilter)
                                                  throws LODNetworkException
        Finds the nearest reaching neighbors to the end point. The search uses the lowest link level.
        Parameters:
        endPoint - end point on the network
        numberOfNeighbors - number of neighbors to be returned
        targetLinkLevel - maximum incoming link level of the neighbors
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths from the nearest reaching neighbors to the end point
        Throws:
        LODNetworkException
      • nearestReachingNeighbors

        public LogicalSubPath[] nearestReachingNeighbors​(PointOnNet endPoint,
                                                         int numberOfNeighbors,
                                                         int searchLinkLevel,
                                                         int targetLinkLevel,
                                                         LODNetworkConstraint constraint,
                                                         LODGoalNode goalNodeFilter)
                                                  throws LODNetworkException
        Finds the nearest reaching neighbors to the end point.
        Parameters:
        endPoint - end point on the network
        numberOfNeighbors - number of neighbors to be returned
        searchLinkLevel - the preferred link level to search for neighbors
        targetLinkLevel - maximum incoming link level of the neighbors
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths from the nearest reaching neighbors to the end point candidates
        Throws:
        LODNetworkException
      • nearestReachingNeighbors

        public LogicalSubPath[] nearestReachingNeighbors​(PointOnNet[] endPoints,
                                                         int numberOfNeighbors,
                                                         int searchLinkLevel,
                                                         int targetLinkLevel,
                                                         LODNetworkConstraint constraint,
                                                         LODGoalNode goalNodeFilter)
                                                  throws LODNetworkException
        Finds the nearest reaching neighbors to the end point candidates.
        Parameters:
        endPoints - end point candidates on the network
        numberOfNeighbors - number of neighbors to be returned
        searchLinkLevel - the preferred link level to search for neighbors
        targetLinkLevel - maximum incoming link level of the neighbors
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths from the nearest reaching neighbors to the end point candidates
        Throws:
        LODNetworkException
      • nearestReachingNeighborsLight

        public LogicalLightSubPath[] nearestReachingNeighborsLight​(PointOnNet[] endPoints,
                                                                   int numberOfNeighbors,
                                                                   int searchLinkLevel,
                                                                   int targetLinkLevel,
                                                                   LODNetworkConstraint constraint,
                                                                   LODGoalNode goalNodeFilter)
                                                            throws LODNetworkException
        Finds the nearest reaching neighbors to the end point candidates.
        Parameters:
        endPoints - end point candidates on the network
        numberOfNeighbors - number of neighbors to be returned
        searchLinkLevel - the preferred link level to search for neighbors
        targetLinkLevel - maximum incoming link level of the neighbors
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths from the nearest reaching neighbors to the end point candidates
        Throws:
        LODNetworkException
      • withinCost

        public LogicalSubPath[] withinCost​(PointOnNet startPoint,
                                           double cost,
                                           LODNetworkConstraint constraint,
                                           LODGoalNode goalNodeFilter)
                                    throws LODNetworkException
        Finds the nodes within the given cost from the start point. Both the search and the target link levels are set to the lowest link level.
        Parameters:
        startPoint - start point
        cost - cost bound
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths to the target nodes from the start point
        Throws:
        LODNetworkException
      • withinCost

        public LogicalSubPath[] withinCost​(PointOnNet startPoint,
                                           double cost,
                                           int targetLinkLevel,
                                           LODNetworkConstraint constraint,
                                           LODGoalNode goalNodeFilter)
                                    throws LODNetworkException
        Finds the nodes within the given cost from the start point. The search uses the lowest link level.
        Parameters:
        startPoint - start point
        cost - cost bound
        targetLinkLevel - maximum outgoing link level of the targets
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths to the target nodes from the start point
        Throws:
        LODNetworkException
      • withinCost

        public LogicalSubPath[] withinCost​(PointOnNet startPoint,
                                           double cost,
                                           int searchLinkLevel,
                                           int targetLinkLevel,
                                           LODNetworkConstraint constraint,
                                           LODGoalNode goalNodeFilter)
                                    throws LODNetworkException
        Finds the nodes within the given cost from the start point.
        Parameters:
        startPoint - start point
        cost - cost bound
        searchLinkLevel - the link level to search for targets
        targetLinkLevel - maximum outgoing link level of the targets
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths to the target nodes from the start point
        Throws:
        LODNetworkException
      • withinCost

        public LogicalSubPath[] withinCost​(PointOnNet[] startPoints,
                                           double cost,
                                           int searchLinkLevel,
                                           int targetLinkLevel,
                                           LODNetworkConstraint constraint,
                                           LODGoalNode goalNodeFilter,
                                           boolean returnBoundaryNodesOnly)
                                    throws LODNetworkException
        Finds the nodes within the given cost from the start point candidates.
        Parameters:
        startPoints - start point candidates
        cost - cost bound
        searchLinkLevel - the link level to search for targets
        targetLinkLevel - maximum outgoing link level of the targets
        constraint - network constraint
        goalNodeFilter - goal node implementation
        returnBoundaryNodesOnly - whether to return the boundary nodes only
        Returns:
        paths to the target nodes from the start point
        Throws:
        LODNetworkException
      • withinCostLight

        public LogicalLightSubPath[] withinCostLight​(PointOnNet[] startPoints,
                                                     double cost,
                                                     int searchLinkLevel,
                                                     int targetLinkLevel,
                                                     LODNetworkConstraint constraint,
                                                     LODGoalNode goalNodeFilter,
                                                     boolean returnBoundaryNodesOnly)
                                              throws LODNetworkException
        Finds the nodes within the given cost from the start point candidates.
        Parameters:
        startPoints - start point candidates
        cost - cost bound
        searchLinkLevel - the link level to search for targets
        targetLinkLevel - maximum outgoing link level of the targets
        constraint - network constraint
        goalNodeFilter - goal node implementation
        returnBoundaryNodesOnly - whether to return the boundary nodes only
        Returns:
        paths to the target nodes from the start point
        Throws:
        LODNetworkException
      • withinReachingCost

        public LogicalSubPath[] withinReachingCost​(PointOnNet endPoint,
                                                   double cost,
                                                   LODNetworkConstraint constraint,
                                                   LODGoalNode goalNodeFilter)
                                            throws LODNetworkException
        Finds the nodes within the given cost to the end point. Both the search and the target link levels are set to the lowest link level.
        Parameters:
        endPoint - end point
        cost - cost bound
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths from the target nodes to the end point
        Throws:
        LODNetworkException
      • withinReachingCost

        public LogicalSubPath[] withinReachingCost​(PointOnNet endPoint,
                                                   double cost,
                                                   int targetLinkLevel,
                                                   LODNetworkConstraint constraint,
                                                   LODGoalNode goalNodeFilter)
                                            throws LODNetworkException
        Finds the nodes within the given cost to the end point. The search uses the lowest link level.
        Parameters:
        endPoint - end point
        cost - cost bound
        targetLinkLevel - maximum incoming link level of the targets
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths from the target nodes to the end point
        Throws:
        LODNetworkException
      • withinReachingCost

        public LogicalSubPath[] withinReachingCost​(PointOnNet endPoint,
                                                   double cost,
                                                   int searchLinkLevel,
                                                   int targetLinkLevel,
                                                   LODNetworkConstraint constraint,
                                                   LODGoalNode goalNodeFilter)
                                            throws LODNetworkException
        Finds the nodes within the given cost to the end point.
        Parameters:
        endPoint - end point
        cost - cost bound
        searchLinkLevel - the link level to search for targets
        targetLinkLevel - maximum incoming link level of the targets
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths from the target nodes to the end point
        Throws:
        LODNetworkException
      • withinReachingCost

        public LogicalSubPath[] withinReachingCost​(PointOnNet[] endPoints,
                                                   double cost,
                                                   int searchLinkLevel,
                                                   int targetLinkLevel,
                                                   LODNetworkConstraint constraint,
                                                   LODGoalNode goalNodeFilter,
                                                   boolean returnBoundaryNodesOnly)
                                            throws LODNetworkException
        Finds the nodes within the given cost to the end point candidates.
        Parameters:
        endPoints - end point candidates
        cost - cost bound
        searchLinkLevel - the link level to search for targets
        targetLinkLevel - maximum incoming link level of the targets
        constraint - network constraint
        goalNodeFilter - goal node implementation
        returnBoundaryNodesOnly - whether to return the boundary nodes only
        Returns:
        paths from the target nodes to the end point
        Throws:
        LODNetworkException
      • withinReachingCostLight

        public LogicalLightSubPath[] withinReachingCostLight​(PointOnNet[] endPoints,
                                                             double cost,
                                                             int searchLinkLevel,
                                                             int targetLinkLevel,
                                                             LODNetworkConstraint constraint,
                                                             LODGoalNode goalNodeFilter,
                                                             boolean returnBoundaryNodesOnly)
                                                      throws LODNetworkException
        Finds the nodes within the given cost to the end points.
        Parameters:
        endPoints - end points
        cost - cost bound
        searchLinkLevel - the link level to search for targets
        targetLinkLevel - maximum incoming link level of the targets
        constraint - network constraint
        goalNodeFilter - goal node implementation
        returnBoundaryNodesOnly - whether to return the boundary nodes only
        Returns:
        paths from the target nodes to the end point
        Throws:
        LODNetworkException
      • withinCostInternalNoReverse

        protected LogicalLightSubPath[] withinCostInternalNoReverse​(PointOnNet[] startPoints,
                                                                    double cost,
                                                                    int direction,
                                                                    int searchLinkLevel,
                                                                    int targetLinkLevel,
                                                                    LODNetworkConstraint constraint,
                                                                    LODGoalNode goalNodeFilter,
                                                                    boolean returnFullPath,
                                                                    boolean returnBoundaryNodesOnly)
                                                             throws LODNetworkException
        Finds the nodes within the given cost from/to the input points.
        Parameters:
        startPoints -
        cost -
        direction -
        searchLinkLevel - preferred link level to search on
        targetLinkLevel - target link level
        constraint -
        goalNodeFilter -
        returnFullPath - if true, return full path information; otherwise, omit the node and link IDs in the returned path
        returnBoundaryNodesOnly - whether to return the boundary nodes only
        Returns:
        Throws:
        LODNetworkException
      • fastWithinCostPolygon

        public JGeometry fastWithinCostPolygon​(PointOnNet[] startPoints,
                                               double cost,
                                               LODNetworkConstraint constraint,
                                               LODGoalNode goalNodeFilter)
                                        throws LODNetworkException
        Returns the polygon covering the nodes, links or partial links that are within the given cost from the start point candidates. X and Y of Node need to be predefined in UserData.
        Parameters:
        startPoints - start point candidates
        cost - cost range
        constraint - network constraint
        goalNodeFilter - goal node filter
        Returns:
        Throws:
        LODNetworkException
      • fastWithinCostPolygon

        public JGeometry fastWithinCostPolygon​(PointOnNet[] startPoints,
                                               double cost,
                                               LODNetworkConstraint constraint,
                                               LODGoalNode goalNodeFilter,
                                               boolean isLowAccuracy)
                                        throws LODNetworkException
        Returns the polygon covering the nodes, links or partial links that are within the given cost from the start point candidates. X and Y of Node need to be predefined in UserData.
        Parameters:
        startPoints - start point candidates
        cost - cost range
        constraint - network constraint
        goalNodeFilter - goal node filter
        isLowAccuracy - use low accuracy to improve 25% running time within 25% area error when driving cost is small(E.g. less than 1800s)
        Returns:
        Throws:
        LODNetworkException
      • fastWithinReachingCostPolygon

        public JGeometry fastWithinReachingCostPolygon​(PointOnNet[] endPoints,
                                                       double cost,
                                                       LODNetworkConstraint constraint,
                                                       LODGoalNode goalNodeFilter)
                                                throws LODNetworkException
        Returns the polygon covering the nodes, links or partial links that are within the given cost to the end point candidates.
        Parameters:
        endPoints - end point candidates
        cost - cost range
        constraint - network constraint
        goalNodeFilter - goal node filter
        Returns:
        Throws:
        LODNetworkException
      • fastWithinReachingCostPolygon

        public JGeometry fastWithinReachingCostPolygon​(PointOnNet[] endPoints,
                                                       double cost,
                                                       LODNetworkConstraint constraint,
                                                       LODGoalNode goalNodeFilter,
                                                       boolean isLowAccuracy)
                                                throws LODNetworkException
        Returns the polygon covering the nodes, links or partial links that are within the given cost to the end point candidates.
        Parameters:
        endPoints - end point candidates
        cost - cost range
        constraint - network constraint
        goalNodeFilter - goal node filter
        isLowAccuracy - use low accuracy to improve 25% running time within 25% area error when driving cost is small(E.g. less than 1800s)
        Returns:
        Throws:
        LODNetworkException
      • withinCostPolygon

        public JGeometry withinCostPolygon​(PointOnNet[] startPoints,
                                           double cost,
                                           LODNetworkConstraint constraint,
                                           LODGoalNode goalNodeFilter)
                                    throws LODNetworkException
        Returns the polygon covering the nodes, links or partial links that are within the given cost from the start point candidates.
        Parameters:
        startPoints - start point candidates
        cost - cost range
        constraint - network constraint
        goalNodeFilter - goal node filter
        Returns:
        Throws:
        LODNetworkException
      • withinCostPolygon

        public JGeometry withinCostPolygon​(PointOnNet[] startPoints,
                                           double cost,
                                           LODNetworkConstraint constraint,
                                           LODGoalNode goalNodeFilter,
                                           int accuracyLevel)
                                    throws LODNetworkException
        Returns the polygon covering the nodes, links or partial links that are within the given cost from the start point candidates.
        Parameters:
        startPoints - start point candidates
        cost - cost range
        constraint - network constraint
        goalNodeFilter - goal node filter
        accuracyLevel - Use one of the constants: ACCURACY_LEVEL_LOWEST, ACCURACY_LEVEL_LOW, ACCURACY_LEVEL_MEDIUM, ACCURACY_LEVEL_HIGH, or ACCURACY_LEVEL_HIGHEST.
        Returns:
        Throws:
        LODNetworkException
      • withinReachingCostPolygon

        public JGeometry withinReachingCostPolygon​(PointOnNet[] endPoints,
                                                   double cost,
                                                   LODNetworkConstraint constraint,
                                                   LODGoalNode goalNodeFilter)
                                            throws LODNetworkException
        Returns the polygon covering the nodes, links or partial links that are within the given cost to the end point candidates.
        Parameters:
        endPoints - end point candidates
        cost - cost range
        constraint - network constraint
        goalNodeFilter - goal node filter
        Returns:
        Throws:
        LODNetworkException
      • withinReachingCostPolygon

        public JGeometry withinReachingCostPolygon​(PointOnNet[] endPoints,
                                                   double cost,
                                                   LODNetworkConstraint constraint,
                                                   LODGoalNode goalNodeFilter,
                                                   int accuracyLevel)
                                            throws LODNetworkException
        Returns the polygon covering the nodes, links or partial links that are within the given cost to the end point candidates.
        Parameters:
        endPoints - end point candidates
        cost - cost range
        constraint - network constraint
        goalNodeFilter - goal node filter
        accuracyLevel - Use one of the constants: ACCURACY_LEVEL_LOWEST, ACCURACY_LEVEL_LOW, ACCURACY_LEVEL_MEDIUM, ACCURACY_LEVEL_HIGH, or ACCURACY_LEVEL_HIGHEST.
        Returns:
        Throws:
        LODNetworkException
      • traceOut

        public LogicalSubPath[] traceOut​(PointOnNet startPoint,
                                         double cost,
                                         LODNetworkConstraint constraint,
                                         LODGoalNode goalNodeFilter)
                                  throws LODNetworkException
        Finds the nodes and partial links within the given cost from the start point. Both the search and the target link levels are set to the lowest link level.
        Parameters:
        startPoint - start point
        cost - cost bound
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths to the target nodes and links from the start point
        Throws:
        LODNetworkException
      • traceOut

        public LogicalSubPath[] traceOut​(PointOnNet startPoint,
                                         double cost,
                                         int targetLinkLevel,
                                         LODNetworkConstraint constraint,
                                         LODGoalNode goalNodeFilter)
                                  throws LODNetworkException
        Finds the nodes and partial links within the given cost from the start point. The search uses the lowest link level.
        Parameters:
        startPoint - start point
        cost - cost bound
        targetLinkLevel - maximum outgoing link level of the targets
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths to the target nodes and links from the start point
        Throws:
        LODNetworkException
      • traceOut

        public LogicalSubPath[] traceOut​(PointOnNet startPoint,
                                         double cost,
                                         int searchLinkLevel,
                                         int targetLinkLevel,
                                         LODNetworkConstraint constraint,
                                         LODGoalNode goalNodeFilter)
                                  throws LODNetworkException
        Finds the nodes and partial links within the given cost from the start point.
        Parameters:
        startPoint - start point
        cost - cost bound
        searchLinkLevel - the link level to search on
        targetLinkLevel - maximum outgoing link level of the targets
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths to the target nodes and links from the start point
        Throws:
        LODNetworkException
      • traceOut

        public LogicalSubPath[] traceOut​(PointOnNet[] startPoints,
                                         double cost,
                                         int searchLinkLevel,
                                         int targetLinkLevel,
                                         LODNetworkConstraint constraint,
                                         LODGoalNode goalNodeFilter,
                                         boolean returnBoundaryPointsOnly)
                                  throws LODNetworkException
        Finds the nodes and partial links within the given cost from the start point candidates.
        Parameters:
        startPoints - start points
        cost - cost bound
        searchLinkLevel - the link level to search on
        targetLinkLevel - maximum outgoing link level of the targets
        constraint - network constraint
        goalNodeFilter - goal node implementation
        returnBoundaryPointsOnly - whether to return boundary points only
        Returns:
        paths to the target nodes and links from the start point candidates
        Throws:
        LODNetworkException
      • traceOutLight

        public LogicalLightSubPath[] traceOutLight​(PointOnNet[] startPoints,
                                                   double cost,
                                                   int searchLinkLevel,
                                                   int targetLinkLevel,
                                                   LODNetworkConstraint constraint,
                                                   LODGoalNode goalNodeFilter,
                                                   boolean returnBoundaryPointsOnly)
                                            throws LODNetworkException
        Finds the nodes and partial links within the given cost from the start points.
        Parameters:
        startPoints - start points
        cost - cost bound
        searchLinkLevel - the link level to search on
        targetLinkLevel - maximum outgoing link level of the targets
        constraint - network constraint
        goalNodeFilter - goal node implementation
        returnBoundaryPointsOnly - whether to return boundary points only
        Returns:
        paths to the target nodes and links from the start point candidates
        Throws:
        LODNetworkException
      • traceIn

        public LogicalSubPath[] traceIn​(PointOnNet endPoint,
                                        double cost,
                                        LODNetworkConstraint constraint,
                                        LODGoalNode goalNodeFilter)
                                 throws LODNetworkException
        Finds the nodes and partial links within the given cost to the end point. Both the search and the target link levels are set to the lowest link level.
        Parameters:
        endPoint - end point
        cost - cost bound
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths from the target nodes and links to the start point
        Throws:
        LODNetworkException
      • traceIn

        public LogicalSubPath[] traceIn​(PointOnNet endPoint,
                                        double cost,
                                        int targetLinkLevel,
                                        LODNetworkConstraint constraint,
                                        LODGoalNode goalNodeFilter)
                                 throws LODNetworkException
        Finds the nodes and partial links within the given cost to the end point. The search uses the lowest link level.
        Parameters:
        endPoint - end point
        cost - cost bound
        targetLinkLevel - maximum incoming link level of the targets
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths from the target nodes and links to the start point
        Throws:
        LODNetworkException
      • traceIn

        public LogicalSubPath[] traceIn​(PointOnNet endPoint,
                                        double cost,
                                        int searchLinkLevel,
                                        int targetLinkLevel,
                                        LODNetworkConstraint constraint,
                                        LODGoalNode goalNodeFilter)
                                 throws LODNetworkException
        Finds the nodes and partial links within the given cost to the end point.
        Parameters:
        endPoint - end point
        cost - cost bound
        searchLinkLevel - the link level to search on
        targetLinkLevel - maximum incoming link level of the targets
        constraint - network constraint
        goalNodeFilter - goal node implementation
        Returns:
        paths from the target nodes and links to the end point
        Throws:
        LODNetworkException
      • traceIn

        public LogicalSubPath[] traceIn​(PointOnNet[] endPoints,
                                        double cost,
                                        int searchLinkLevel,
                                        int targetLinkLevel,
                                        LODNetworkConstraint constraint,
                                        LODGoalNode goalNodeFilter,
                                        boolean returnBoundaryPointsOnly)
                                 throws LODNetworkException
        Finds the nodes and partial links within the given cost to the end point candidates.
        Parameters:
        endPoints - end point candidates
        cost - cost bound
        searchLinkLevel - the link level to search on
        targetLinkLevel - maximum incoming link level of the targets
        constraint - network constraint
        goalNodeFilter - goal node implementation
        returnBoundaryPointsOnly - whether to return boundary points only
        Returns:
        paths from the target nodes and links to the end point candidates
        Throws:
        LODNetworkException
      • traceInLight

        public LogicalLightSubPath[] traceInLight​(PointOnNet[] startPoints,
                                                  double cost,
                                                  int searchLinkLevel,
                                                  int targetLinkLevel,
                                                  LODNetworkConstraint constraint,
                                                  LODGoalNode goalNodeFilter,
                                                  boolean returnBoundaryPointsOnly)
                                           throws LODNetworkException
        Finds the nodes and partial links within the given cost to the end point candidates.
        Parameters:
        startPoints - start point candidates
        cost - cost bound
        searchLinkLevel - the link level to search on
        targetLinkLevel - maximum outgoing link level of the targets
        constraint - network constraint
        goalNodeFilter - goal node implementation
        returnBoundaryPointsOnly - whether to return boundary points only
        Returns:
        paths to the target nodes and links from the end point candidates
        Throws:
        LODNetworkException
      • traceOutInternalNoReversePath

        protected LogicalLightSubPath[] traceOutInternalNoReversePath​(PointOnNet[] startPoints,
                                                                      double cost,
                                                                      int direction,
                                                                      int searchLinkLevel,
                                                                      int targetLinkLevel,
                                                                      LODNetworkConstraint constraint,
                                                                      LODGoalNode goalNodeFilter,
                                                                      boolean returnFullPath,
                                                                      boolean returnBoundaryPointsOnly)
                                                               throws LODNetworkException
        Finds the nodes and partial links within the given cost from/to the start/end point candidates.
        Parameters:
        startPoints - start/end point candidates
        cost - cost bound
        direction - search direction
        searchLinkLevel - the link level to search on
        targetLinkLevel - maximum outgoing link level of the targets
        constraint - network constraint
        goalNodeFilter - goal node implementation
        returnBoundaryPointsOnly - whether to return boundary points only
        Returns:
        paths to/from the target nodes and links from/to the start/end point candidates
        Throws:
        LODNetworkException
      • findConnectedNodes

        public OrderedLongSet findConnectedNodes​(int searchMethod,
                                                 PointOnNet[] points,
                                                 int linkLevel,
                                                 LODNetworkConstraint constraint,
                                                 LODGoalNode goalNode)
                                          throws LODNetworkException
        Finds the nodes connected to the given points.
        Parameters:
        searchMethod - search method. It can take the following values:
      • NetworkAnalyst.BREADTH_FIRST_SEARCH, or
      • NetworkAnalyst.DEPTH_FIRST_SEARCH.
      • points -
        linkLevel - link level to search on
        constraint -
        goalNode -
        Returns:
        Throws:
        LODNetworkException
      • findReachableNodes

        public OrderedLongSet findReachableNodes​(int searchMethod,
                                                 PointOnNet[] startPoints,
                                                 int linkLevel,
                                                 LODNetworkConstraint constraint,
                                                 LODGoalNode goalNode)
                                          throws LODNetworkException
        Finds the nodes reachable from the given points.
        Parameters:
        searchMethod - search method. It can take the following values:
      • NetworkAnalyst.BREADTH_FIRST_SEARCH, or
      • NetworkAnalyst.DEPTH_FIRST_SEARCH.
      • startPoints - start points
        Returns:
        node IDs reachable from the given node
        Throws:
        LODNetworkException
      • findReachingNodes

        public OrderedLongSet findReachingNodes​(int searchMethod,
                                                PointOnNet[] endPoints,
                                                int linkLevel,
                                                LODNetworkConstraint constraint,
                                                LODGoalNode goalNode)
                                         throws LODNetworkException
        Finds the nodes that can reach the given points.
        Parameters:
        searchMethod - search method. It can take the following values:
      • NetworkAnalyst.BREADTH_FIRST_SEARCH, or
      • NetworkAnalyst.DEPTH_FIRST_SEARCH.
      • endPoints - end points
        linkLevel - link level to search on
        Returns:
        node IDs that can reach the given node ID
        Throws:
        LODNetworkException
      • isReachable

        public boolean isReachable​(long startNodeId,
                                   long endNodeId,
                                   int linkLevel,
                                   LODNetworkConstraint constraint)
                            throws LODNetworkException
        Checks whether there is a path from the start node to the end node using the given link level for long-haul search.
        Parameters:
        startNodeId - start node ID
        endNodeId - end node ID
        linkLevel - maximum link level to search on
        Returns:
        true, if there exists a path from the start node to the end node; false, otherwise.
        Throws:
        LODNetworkException
      • isReachable

        public boolean isReachable​(PointOnNet[] startPoints,
                                   PointOnNet[] endPoints,
                                   int linkLevel,
                                   LODNetworkConstraint constraint)
                            throws LODNetworkException
        Checks whether there is a path from the start node to the end node using the given link level for long-haul search.
        Parameters:
        startPoints - start points
        endPoints - end points
        linkLevel - maximum link level to search on
        Returns:
        true, if there exists a path from the start node to the end node; false, otherwise.
        Throws:
        LODNetworkException
      • findConnectedComponents

        public OrderedLongSet[] findConnectedComponents​(int linkLevel)
                                                 throws LODNetworkException
        Finds the connected components for the given link level.
        Parameters:
        linkLevel - maximum link level to search on
        Returns:
        the connected components
        Throws:
        LODNetworkException
      • findConnectedComponentsInPartition

        public int findConnectedComponentsInPartition​(int partitionId,
                                                      int linkLevel,
                                                      int startComponentId,
                                                      java.util.ArrayList<oracle.spatial.network.lod.AnalysisUtility.NodeComponent> nodeComponentArray)
                                               throws LODNetworkException
        Find the connected components within a partition, with all the external nodes and boundary links included. This method writes the node id - component id assignment information into the input array, and returns the maximum component ID that has been used so far.
        Parameters:
        partitionId - ID of the partition in which the connected component is computed
        linkLevel - link level on which the connected component is computed
        startComponentId - start component ID to be used. All component IDs being assigned to the nodes in the partition must be no smaller than the start component ID.
        nodeComponentArray - empty list where the result node ID - component ID pair is written into
        Returns:
        the maximum component ID that has been used so far.
        Throws:
        LODNetworkException
      • shortestPath

        public LogicalSubPath shortestPath​(PointOnNet[] startPoints,
                                           PointOnNet[] endPoints,
                                           LODNetworkConstraint constraint,
                                           ShortestPath algorithm)
                                    throws LODNetworkException
        Finds the shortest path using the input algorithm.
        Parameters:
        startPoints - start point candidates on the network
        endPoints - end point on candidates the network
        constraint - network constraint
        algorithm - shortest path algorithm, such as Dijkstra or A*
        Returns:
        shortest path from the start point to the end point
        Throws:
        LODNetworkException
      • reverseShortestPath

        public LogicalSubPath reverseShortestPath​(PointOnNet[] endPoints,
                                                  PointOnNet[] startPoints,
                                                  LODNetworkConstraint constraint,
                                                  ShortestPath algorithm)
                                           throws LODNetworkException
        Finds the shortest path using the input algorithm, using reverse search direction.
        Parameters:
        startPoints - start point candidates on the network
        endPoints - end point on candidates the network
        constraint - network constraint
        algorithm - shortest path algorithm, such as Dijkstra or A*
        Returns:
        shortest path from the start point to the end point
        Throws:
        LODNetworkException
      • shortestPathDijkstra

        public LogicalSubPath shortestPathDijkstra​(PointOnNet startPoint,
                                                   PointOnNet endPoint,
                                                   LODNetworkConstraint constraint)
                                            throws LODNetworkException
        Finds the shortest path on the minimum link level using Dijkstra algorithm.
        Parameters:
        startPoint - start point on the network
        endPoint - end point on the network
        constraint - network constraint
        Returns:
        shortest path from the start point to the end point
        Throws:
        LODNetworkException
      • shortestPathDijkstraMaxLevel

        public LogicalSubPath shortestPathDijkstraMaxLevel​(PointOnNet startPoint,
                                                           PointOnNet endPoint,
                                                           LODNetworkConstraint constraint)
                                                    throws LODNetworkException
        Finds the shortest path using Dijkstra algorithm where the long-haul path is computed on the maximum link level.
        Parameters:
        startPoint - start point
        endPoint - end point
        constraint - network constraint
        Returns:
        shortest path from the start node to the end node
        Throws:
        LODNetworkException
      • shortestPathDijkstra

        public LogicalSubPath shortestPathDijkstra​(PointOnNet startPoint,
                                                   PointOnNet endPoint,
                                                   int searchLinkLevel,
                                                   LODNetworkConstraint constraint)
                                            throws LODNetworkException
        Finds the shortest path using Dijkstra algorithm where the long-haul path is computed on the given link level.
        Parameters:
        startPoint - start point on the network
        endPoint - end point on the network
        constraint - network constraint
        Returns:
        shortest path from the start point to the end point
        Throws:
        LODNetworkException
      • shortestPathDijkstra

        public LogicalSubPath shortestPathDijkstra​(PointOnNet[] startPoints,
                                                   PointOnNet[] endPoints,
                                                   int searchLinkLevel,
                                                   LODNetworkConstraint constraint)
                                            throws LODNetworkException
        Finds the shortest path using Dijkstra algorithm where the long-haul path is computed on the given link level.
        Parameters:
        startPoints - candidate start points on the network
        endPoints - candidate end points on the network
        constraint - network constraint
        Returns:
        shortest path from the start point to the end point
        Throws:
        LODNetworkException
      • shortestPathDijkstra

        public LogicalSubPath shortestPathDijkstra​(PointOnNet[] startPoints,
                                                   PointOnNet[] endPoints,
                                                   int searchLinkLevel,
                                                   int maxHighLevelNodesToConsider,
                                                   LODNetworkConstraint constraint)
                                            throws LODNetworkException
        Finds the shortest path using Dijkstra algorithm where the long-haul path is computed on the given link level.
        Parameters:
        startPoints - candidate start points on the network
        endPoints - candidate end points on the network
        constraint - network constraint
        Returns:
        shortest path from the start point to the end point
        Throws:
        LODNetworkException
      • shortestPathAStar

        public LogicalSubPath shortestPathAStar​(PointOnNet startPoint,
                                                PointOnNet endPoint,
                                                LODNetworkConstraint constraint,
                                                HeuristicCostFunction hcf,
                                                double[] costThresholds)
                                         throws LODNetworkException
        Finds the shortest path using A* algorithm using dynamic link level selector. The prefered search link level of the dynamic link level selector is set to the maximum link level of the network.
        Parameters:
        startPoint - start point on the network
        endPoint - end point on the network
        constraint - network constraint
        hcf - Heuristic cost function implementation
        Returns:
        shortest path from the start point to the end point
        Throws:
        LODNetworkException
      • shortestPathAStar

        public LogicalSubPath shortestPathAStar​(PointOnNet startPoint,
                                                PointOnNet endPoint,
                                                int searchLinkLevel,
                                                LODNetworkConstraint constraint,
                                                HeuristicCostFunction hcf,
                                                double[] costThresholds)
                                         throws LODNetworkException
        Finds the shortest path using A* algorithm with dynamic link level selector.
        Parameters:
        startPoint - start point on the network
        endPoint - end point on the network
        searchLinkLevel - prefered link level to compute long-haul path
        constraint - network constraint
        hcf - Heuristic cost function implementation
        Returns:
        shortest path from the start point to the end point
        Throws:
        LODNetworkException
      • shortestPathHierarchical

        public LogicalSubPath shortestPathHierarchical​(PointOnNet[] startPoints,
                                                       PointOnNet[] endPoints,
                                                       int searchLinkLevel,
                                                       int maxHighLevelNodesToConsider,
                                                       LODNetworkConstraint constraint,
                                                       ShortestPath algorithm)
                                                throws LODNetworkException
        Finds the shortest path from the start point candidates to the end point candidates. This method takes advantage of multi-leveled network, by routing the start/end points to the nearest higher level network, and then navigate on the higher level network only.
        Parameters:
        startPoints - start point candidates on the network
        endPoints - end point candidates on the network
        maxHighLevelNodesToConsider - maximum high level nodes to consider
        constraint - network constraint
        algorithm - basic single-level shortest path algorithm, such as Dijkstra or A*.
        Returns:
        shortest path from the start point candidates to the end point candidates
        Throws:
        LODNetworkException
      • tsp

        public TspPath tsp​(PointOnNet[][] pointsToVisit,
                           TSP.TourFlag tourFlag,
                           int linkLevel,
                           LODNetworkConstraint constraint)
                    throws LODNetworkException
        Returns the traveling salesman tour covering the given points.
        Parameters:
        pointsToVisit - points to visit on the tour
        tourFlag - a flag indicating whether the tour should be open or closed, and if the tour is open, whether the tour should have fixed start or end point.
        constraint - network constraint
        Returns:
        traveling salesman tour
        Throws:
        LODNetworkException
      • tsp

        public TspPath tsp​(PointOnNet[][] pointsToVisit,
                           TSP.TourFlag tourFlag,
                           int linkLevel,
                           LODNetworkConstraint constraint,
                           TSP algorithm)
                    throws LODNetworkException
        Returns the traveling salesman tour covering the input points.
        Parameters:
        pointsToVisit - points to visit on the tour.
        tourFlag - a flag indicating whether the tour should be open or closed, and if the tour is open, whether the tour should have fixed start or end point.
        constraint - network constraint
        algorithm - tsp algorithm
        Returns:
        traveling salesman tour
        Throws:
        LODNetworkException
      • tsp

        public TspPath tsp​(PointOnNet[][] pointsToVisit,
                           TSP.TourFlag tourFlag,
                           LODNetworkConstraint networkConstraint)
                    throws LODNetworkException
        Returns the traveling salesman tour covering the input points.
        Parameters:
        pointsToVisit - points to visit on the tour
        tourFlag - a flag indicating whether the tour should be open or closed, and if the tour is open, whether the tour should have fixed start or end point.
        networkConstraint - network constraint
        Returns:
        traveling salesman tour
        Throws:
        LODNetworkException
      • tsp

        public TspPath tsp​(PointOnNet[][] pointsToVisit,
                           TSP.TourFlag tourFlag,
                           LODNetworkConstraint networkConstraint,
                           TspConstraint tspConstraint)
                    throws LODNetworkException
        Returns the traveling salesman tour covering the input points.
        Parameters:
        pointsToVisit - points to visit on the tour
        tourFlag - a flag indicating whether the tour should be open or closed, and if the tour is open, whether the tour should have fixed start or end point.
        networkConstraint - network constraint
        tspConstraint - TSP constraint
        Returns:
        traveling salesman tour
        Throws:
        LODNetworkException
      • tsp

        public TspPath tsp​(PointOnNet[][] pointsToVisit,
                           TSP.TourFlag tourFlag,
                           LODNetworkConstraint networkConstraint,
                           TSP algorithm)
                    throws LODNetworkException
        Returns the traveling salesman tour covering the input points.
        Parameters:
        pointsToVisit - points to visit on the tour.
        tourFlag - a flag indicating whether the tour should be open or closed, and if the tour is open, whether the tour should have fixed start or end point.
        networkConstraint - network constraint
        algorithm - tsp algorithm
        Returns:
        traveling salesman tour
        Throws:
        LODNetworkException
      • tsp

        public TspPath tsp​(PointOnNet[][] pointsToVisit,
                           TSP.TourFlag tourFlag,
                           LODNetworkConstraint networkConstraint,
                           TspConstraint tspConstraint,
                           TSP algorithm)
                    throws LODNetworkException
        Returns the traveling salesman tour covering the input points.
        Parameters:
        pointsToVisit - points to visit on the tour.
        tourFlag - a flag indicating whether the tour should be open or closed, and if the tour is open, whether the tour should have fixed start or end point.
        networkConstraint - network constraint
        algorithm - tsp algorithm
        Returns:
        traveling salesman tour
        Throws:
        LODNetworkException
      • kShortestPaths

        public LogicalSubPath[] kShortestPaths​(PointOnNet[] startPoint,
                                               PointOnNet[] endPoint,
                                               int k,
                                               LODNetworkConstraint constraint)
                                        throws LODNetworkException
        Returns K shortest loopless paths from the start point candidates to the end point candidates.
        Parameters:
        startPoint - start point candidates
        endPoint - end point candidates
        k - number of loopless paths to be returned
        constraint - network constraint
        Returns:
        K shortest loopless paths from the start point to the end point
        Throws:
        LODNetworkException
      • kShortestPathsBfs

        public LogicalSubPath[] kShortestPathsBfs​(PointOnNet[] startPoint,
                                                  PointOnNet[] endPoint,
                                                  int k,
                                                  double maxToMinBound,
                                                  long timeout,
                                                  LODNetworkConstraint constraint,
                                                  PathFilter pathFilter)
                                           throws LODNetworkException
        Returns K shortest loopless paths from the start point candidates to the end point candidates.
        Parameters:
        startPoint - start point candidates
        endPoint - end point candidates
        k - number of loopless paths to be returned
        constraint - network constraint
        Returns:
        K shortest loopless paths from the start point to the end point
        Throws:
        LODNetworkException
      • kShortestPathsDijkstra

        public LogicalSubPath[] kShortestPathsDijkstra​(PointOnNet[] startPoint,
                                                       PointOnNet[] endPoint,
                                                       int k,
                                                       double maxToMinBound,
                                                       long timeout,
                                                       LODNetworkConstraint constraint,
                                                       PathFilter pathFilter)
                                                throws LODNetworkException
        Returns K shortest paths from the start point candidates to the end point candidates.
        Parameters:
        startPoint - start point candidates
        endPoint - end point candidates
        k - number of loopless paths to be returned
        constraint - network constraint
        Returns:
        K shortest loopless paths from the start point to the end point
        Throws:
        LODNetworkException
      • reverseKShortestPathsBfs

        public LogicalSubPath[] reverseKShortestPathsBfs​(PointOnNet[] startPoint,
                                                         PointOnNet[] endPoint,
                                                         int k,
                                                         double maxToMinBound,
                                                         long timeout,
                                                         LODNetworkConstraint constraint,
                                                         PathFilter pathFilter)
                                                  throws LODNetworkException
        Returns K shortest loopless paths from the start point candidates to the end point candidates.
        Parameters:
        startPoint - start point candidates
        endPoint - end point candidates
        k - number of loopless paths to be returned
        constraint - network constraint
        Returns:
        K shortest loopless paths from the start point to the end point
        Throws:
        LODNetworkException
      • reverseKShortestPathsDijkstra

        public LogicalSubPath[] reverseKShortestPathsDijkstra​(PointOnNet[] startPoint,
                                                              PointOnNet[] endPoint,
                                                              int k,
                                                              double maxToMinBound,
                                                              long timeout,
                                                              LODNetworkConstraint constraint,
                                                              PathFilter pathFilter)
                                                       throws LODNetworkException
        Returns K shortest loopless paths from the start point candidates to the end point candidates.
        Parameters:
        startPoint - start point candidates
        endPoint - end point candidates
        k - number of loopless paths to be returned
        constraint - network constraint
        Returns:
        K shortest loopless paths from the start point to the end point
        Throws:
        LODNetworkException
      • kShortestPaths

        public LogicalSubPath[] kShortestPaths​(PointOnNet[] startPoint,
                                               PointOnNet[] endPoint,
                                               int k,
                                               LODNetworkConstraint constraint,
                                               KShortestPaths kspAlgorithm)
                                        throws LODNetworkException
        Returns K shortest loopless paths from the start point candiates to the end point candidates.
        Parameters:
        startPoint - start point candidates
        endPoint - end point candidates
        k - number of loopless paths to be returned
        constraint - network constraint
        kspAlgorithm - K-shortest paths algorithm
        Returns:
        K shortest loopless paths from the start point to the end point
        Throws:
        LODNetworkException
      • reverseKShortestPaths

        public LogicalSubPath[] reverseKShortestPaths​(PointOnNet[] endPoint,
                                                      PointOnNet[] startPoint,
                                                      int k,
                                                      LODNetworkConstraint constraint)
                                               throws LODNetworkException
        Returns K shortest loopless paths from the start point candidates to the end point candidates, using reverse search direction.
        Parameters:
        startPoint - start point candidates
        endPoint - end point candidates
        k - number of loopless paths to be returned
        constraint - network constraint
        Returns:
        K shortest loopless paths from the start point to the end point
        Throws:
        LODNetworkException
      • reverseKShortestPaths

        public LogicalSubPath[] reverseKShortestPaths​(PointOnNet[] endPoint,
                                                      PointOnNet[] startPoint,
                                                      int k,
                                                      LODNetworkConstraint constraint,
                                                      KShortestPaths kspAlgorithm)
                                               throws LODNetworkException
        Returns reverse K shortest loopless paths from the start point candiates to the end point candidates, using reverse search direction.
        Parameters:
        startPoint - start point candidates
        endPoint - end point candidates
        k - number of loopless paths to be returned
        constraint - network constraint
        kspAlgorithm - K-shortest paths algorithm
        Returns:
        K shortest loopless paths from the start point to the end point
        Throws:
        LODNetworkException
      • networkBuffer

        public NetworkBuffer networkBuffer​(PointOnNet[] startPoints,
                                           double cost,
                                           LODNetworkConstraint constraint)
                                    throws LODNetworkException
        Computes network buffer within the given cost from the start point candidates.
        Parameters:
        startPoints - start point candidates
        cost - cost range of the network buffer
        constraint - network constraint
        Returns:
        network buffer within the given cost from the start point candidates
        Throws:
        LODNetworkException
      • reachingNetworkBuffer

        public NetworkBuffer reachingNetworkBuffer​(PointOnNet[] endPoints,
                                                   double cost,
                                                   LODNetworkConstraint constraint)
                                            throws LODNetworkException
        Computes network buffer within the given cost to the end point candidates.
        Parameters:
        endPoints - end point candidates
        cost - cost range of the network buffer
        constraint - network constraint
        Returns:
        network buffer within the given cost to the end point candidates
        Throws:
        LODNetworkException
      • allDetourShortestPathsWithCostLimit

        public LogicalSubPath[] allDetourShortestPathsWithCostLimit​(PointOnNet[] startPoints,
                                                                    PointOnNet[] endPoints,
                                                                    double maxCost,
                                                                    LODNetworkConstraint constraint)
                                                             throws LODNetworkException
        Finds all paths from the start points to the end points with the following properties:
      • The cost of the path is smaller than or equal to the given cost bound
      • The subpath from the start points to any intermediate node on the path is the shortest possible path from the start points to that node.
      • The subpath from any intermediate node to the end points is the shortest possible path from that node to the end points.
Parameters:
startPoints - start point candidates
endPoints - end point candidates
maxCost - cost bound
constraint - network constraint
Returns:
Throws:
LODNetworkException
Parameters:
startPoints - start point candidates
endPoints - end point candidates
maxDepth - depth bound
constraint - network constraint
Returns:
Throws:
LODNetworkException