Skip to content

Directed TSP with invalid indices #45

@bouldrini

Description

@bouldrini

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions