Modifier and Type | Class and Description |
---|---|
static class |
TspImpl.NetworkTspConstraint |
TSP.TourFlag
Constructor and Description |
---|
TspImpl() |
TspImpl(PairwiseCostCalculator pwcc, TspOptimizer optimizer, ShortestPath spAlgorithm, int direction) |
Modifier and Type | Method and Description |
---|---|
int |
getDirection() |
NetworkAnalyst |
getNetworkAnalyst() |
PairwiseCostCalculator |
getPairwiseCostCalculator() |
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.
|
public TspImpl()
public TspImpl(PairwiseCostCalculator pwcc, TspOptimizer optimizer, ShortestPath spAlgorithm, int direction)
public void setDirection(int direction)
public int getDirection()
public void setPairwiseCostCalculator(PairwiseCostCalculator pwcc)
public PairwiseCostCalculator getPairwiseCostCalculator()
public void setTspOptimizer(TspOptimizer optimizer)
public TspOptimizer getTspOptimizer()
public void setShortestPathAlgorithm(ShortestPath spAlgorithm)
public ShortestPath getShortestPathAlgorithm()
public void setNetworkAnalyst(NetworkAnalyst analyst)
TSP
setNetworkAnalyst
in interface TSP
public NetworkAnalyst getNetworkAnalyst()
public TspPath tspPath(PointOnNet[][] points, TSP.TourFlag tourFlag, LODNetworkConstraint networkConstraint, TspConstraint tspConstraint) throws LODNetworkException
TSP
tspPath
in interface TSP
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 constraintLODNetworkException