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 classTspImpl.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 intgetDirection()NetworkAnalystgetNetworkAnalyst()PairwiseCostCalculatorgetPairwiseCostCalculator()protected static LogicalSubPath[]getPaths(int[] tspOrder, PointOnNet[][] tspPoints, Matrix<LogicalSubPath> pairwisePaths, LODNetworkConstraint constraint, ShortestPath spAlgorithm, int direction)ShortestPathgetShortestPathAlgorithm()TspOptimizergetTspOptimizer()voidsetDirection(int direction)voidsetNetworkAnalyst(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.voidsetPairwiseCostCalculator(PairwiseCostCalculator pwcc)voidsetShortestPathAlgorithm(ShortestPath spAlgorithm)voidsetTspOptimizer(TspOptimizer optimizer)TspPathtspPath(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:TSPThis 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:
setNetworkAnalystin interfaceTSP
-
getNetworkAnalyst
public NetworkAnalyst getNetworkAnalyst()
-
tspPath
public TspPath tspPath(PointOnNet[][] points, TSP.TourFlag tourFlag, LODNetworkConstraint networkConstraint, TspConstraint tspConstraint) throws LODNetworkException
Description copied from interface:TSPReturns the traveling salesman tour with the optimal or suboptimal cost.- Specified by:
tspPathin 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
-
-