Ejemplo n.º 1
0
 /// <summary>
 /// Creates a new TSP router.
 /// </summary>
 public TSPRouter(IDirectedWeightMatrixAlgorithm <float> weightMatrixAlgorithm, float turnPenalty, int first, int?last = null,
                  SolverBase <float, TSProblem, TSPObjective, Itinero.Optimization.Tours.Tour, float> solver           = null)
 {
     _turnPenalty           = turnPenalty;
     _first                 = first;
     _last                  = last;
     _weightMatrixAlgorithm = weightMatrixAlgorithm;
     _solver                = solver;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Solvers this problem using the given solver.
 /// </summary>
 public Tour Solve(Itinero.Optimization.Algorithms.Solvers.ISolver <float, SequenceDirectedProblem, SequenceDirectedObjective, Tour, float> solver)
 {
     return(solver.Solve(this, new SequenceDirectedObjective()));
 }