Skip to content

Directed TSP with invalid indices #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bouldrini opened this issue Feb 23, 2024 · 0 comments
Open

Directed TSP with invalid indices #45

bouldrini opened this issue Feb 23, 2024 · 0 comments

Comments

@bouldrini
Copy link

bouldrini commented Feb 23, 2024

Hi,

I try using Itinero for solving a DTSP as shown below:

DirectedWeightMatrixAlgorithm directedWeightMatrixAlgorithm = new DirectedWeightMatrixAlgorithm(mRouter, Vehicle.Car.Fastest(), wgsCoordArray);

// wgsCoordArray has 15 elements in it

Itinero.Optimization.TSP.Directed.Solvers.HillClimbing3OptSolver directedhillClimbingSolver = new Itinero.Optimization.TSP.Directed.Solvers.HillClimbing3OptSolver();

directedTsprouter = new Itinero.Optimization.TSP.Directed.TSPRouter(directedWeightMatrixAlgorithm, 1.0f, 0, 15, directedhillClimbingSolver);

directedTsprouter.Run();
if (directedTsprouter.HasSucceeded)
    itineroTour = directedTsprouter.Tour; // {[0] -> 51 -> 11 -> 2 -> 39 -> 40 -> ... -> [12]}

Determination works fine but the result is unclear to me.
directedTsprouter.Tour contains obscure indices that do not correspond to the wgsCoordArray in any way.

I cannot find any hint in the documentation how to map the given indices back to the given wgsCoordArray.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant