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
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.constraint
- network constrainttspConstraint
- tsp constraintLODNetworkException
public Matrix<LogicalSubPath> shortestPaths(PointOnNet[][] startPoints, PointOnNet[][] endPoints, LODNetworkConstraint constraint, TSP.TourFlag tourFlag) throws LODNetworkException
LODNetworkException
public void setNetworkAnalyst(NetworkAnalyst analyst)
TSP
setNetworkAnalyst
in interface TSP