Package oracle.spatial.network.lod
Class TspNearestNeighbor
- java.lang.Object
-
- oracle.spatial.network.lod.TspNearestNeighbor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface oracle.spatial.network.lod.TSP
TSP.TourFlag
-
-
Constructor Summary
Constructors Constructor Description TspNearestNeighbor(NetworkExplorer ne, LinkCostCalculator[] lccs, NodeCostCalculator[] nccs, ShortestPath spAlgorithm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setNetworkAnalyst(NetworkAnalyst analyst)
This method allows caller to pass the network analyst object to this TSP algorithm implementation, so that the algorithm can call the analysis functions provided by the network analyst, or access the network explorer associated with the network analyst.Matrix<LogicalSubPath>
shortestPaths(PointOnNet[][] startPoints, PointOnNet[][] endPoints, LODNetworkConstraint constraint, TSP.TourFlag tourFlag)
TspPath
tspPath(PointOnNet[][] points, TSP.TourFlag tourFlag, LODNetworkConstraint constraint, TspConstraint tspConstraint)
Returns the traveling salesman tour with the optimal or suboptimal cost.
-
-
-
Constructor Detail
-
TspNearestNeighbor
public TspNearestNeighbor(NetworkExplorer ne, LinkCostCalculator[] lccs, NodeCostCalculator[] nccs, ShortestPath spAlgorithm)
-
-
Method Detail
-
tspPath
public TspPath tspPath(PointOnNet[][] points, TSP.TourFlag tourFlag, LODNetworkConstraint constraint, TspConstraint tspConstraint) throws LODNetworkException
Description copied from interface:TSP
Returns the traveling salesman tour with the optimal or suboptimal cost.- Specified by:
tspPath
in interfaceTSP
- Parameters:
points
- points to visit on the TSP 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 constrainttspConstraint
- tsp constraint- Throws:
LODNetworkException
-
shortestPaths
public Matrix<LogicalSubPath> shortestPaths(PointOnNet[][] startPoints, PointOnNet[][] endPoints, LODNetworkConstraint constraint, TSP.TourFlag tourFlag) throws LODNetworkException
- Throws:
LODNetworkException
-
setNetworkAnalyst
public void setNetworkAnalyst(NetworkAnalyst analyst)
Description copied from interface:TSP
This method allows caller to pass the network analyst object to this TSP algorithm implementation, so that the algorithm 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 shortest path algorithm, the algorithm can choose to do nothing with this method.- Specified by:
setNetworkAnalyst
in interfaceTSP
-
-