Package oracle.spatial.network.lod
Class TspImpl
- java.lang.Object
-
- oracle.spatial.network.lod.TspImpl
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TspImpl.NetworkTspConstraint
-
Nested classes/interfaces inherited from interface oracle.spatial.network.lod.TSP
TSP.TourFlag
-
-
Constructor Summary
Constructors Constructor Description TspImpl()
TspImpl(PairwiseCostCalculator pwcc, TspOptimizer optimizer, ShortestPath spAlgorithm, int direction)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getDirection()
NetworkAnalyst
getNetworkAnalyst()
PairwiseCostCalculator
getPairwiseCostCalculator()
protected static LogicalSubPath[]
getPaths(int[] tspOrder, PointOnNet[][] tspPoints, Matrix<LogicalSubPath> pairwisePaths, LODNetworkConstraint constraint, ShortestPath spAlgorithm, int direction)
ShortestPath
getShortestPathAlgorithm()
TspOptimizer
getTspOptimizer()
void
setDirection(int direction)
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.void
setPairwiseCostCalculator(PairwiseCostCalculator pwcc)
void
setShortestPathAlgorithm(ShortestPath spAlgorithm)
void
setTspOptimizer(TspOptimizer optimizer)
TspPath
tspPath(PointOnNet[][] points, TSP.TourFlag tourFlag, LODNetworkConstraint networkConstraint, TspConstraint tspConstraint)
Returns the traveling salesman tour with the optimal or suboptimal cost.
-
-
-
Constructor Detail
-
TspImpl
public TspImpl()
-
TspImpl
public TspImpl(PairwiseCostCalculator pwcc, TspOptimizer optimizer, ShortestPath spAlgorithm, int direction)
-
-
Method Detail
-
setDirection
public void setDirection(int direction)
-
getDirection
public int getDirection()
-
setPairwiseCostCalculator
public void setPairwiseCostCalculator(PairwiseCostCalculator pwcc)
-
getPairwiseCostCalculator
public PairwiseCostCalculator getPairwiseCostCalculator()
-
setTspOptimizer
public void setTspOptimizer(TspOptimizer optimizer)
-
getTspOptimizer
public TspOptimizer getTspOptimizer()
-
setShortestPathAlgorithm
public void setShortestPathAlgorithm(ShortestPath spAlgorithm)
-
getShortestPathAlgorithm
public ShortestPath getShortestPathAlgorithm()
-
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
-
getNetworkAnalyst
public NetworkAnalyst getNetworkAnalyst()
-
tspPath
public TspPath tspPath(PointOnNet[][] points, TSP.TourFlag tourFlag, LODNetworkConstraint networkConstraint, 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.networkConstraint
- network constrainttspConstraint
- tsp constraint- Throws:
LODNetworkException
-
getPaths
protected static LogicalSubPath[] getPaths(int[] tspOrder, PointOnNet[][] tspPoints, Matrix<LogicalSubPath> pairwisePaths, LODNetworkConstraint constraint, ShortestPath spAlgorithm, int direction) throws LODNetworkException
- Throws:
LODNetworkException
-
-