TSP.TourFlag| Constructor and Description |
|---|
TspNearestNeighbor(NetworkExplorer ne, LinkCostCalculator[] lccs, NodeCostCalculator[] nccs, ShortestPath spAlgorithm) |
| Modifier and Type | Method and 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.
|
public TspNearestNeighbor(NetworkExplorer ne, LinkCostCalculator[] lccs, NodeCostCalculator[] nccs, ShortestPath spAlgorithm)
public TspPath tspPath(PointOnNet[][] points, TSP.TourFlag tourFlag, LODNetworkConstraint constraint, TspConstraint tspConstraint) throws LODNetworkException
TSPtspPath in interface TSPpoints - 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 constraintLODNetworkExceptionpublic Matrix<LogicalSubPath> shortestPaths(PointOnNet[][] startPoints, PointOnNet[][] endPoints, LODNetworkConstraint constraint, TSP.TourFlag tourFlag) throws LODNetworkException
LODNetworkExceptionpublic void setNetworkAnalyst(NetworkAnalyst analyst)
TSPsetNetworkAnalyst in interface TSP