Skip to content
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

TSP (with additional side constraints) #49

Open
ruthmair opened this issue May 4, 2023 · 0 comments
Open

TSP (with additional side constraints) #49

ruthmair opened this issue May 4, 2023 · 0 comments

Comments

@ruthmair
Copy link
Member

ruthmair commented May 4, 2023

Why this Mod?

  • TSP is a well-known combinatorial problem and can arise as subproblem of more complicated problems, e.g., from routing and scheduling.
  • Formulating the TSP as MILP is not trivial because of subtour elimination. Many people use Big-M formulations but cut formulations perform usually better (since resulting bounds are better).
  • Optionally, side constraints might be considered, e.g., node time windows, resource restrictions on total tour, precedence relations.
  • The mod will not be state-of-the-art in terms of performance (best TSP solver is Concorde, variants are usually solved via sophisticated branch-and-cut algorithms with many additional sets of valid inequalities). Still, the performance will be sufficient to solve instances with up to a few hundred nodes for the basic TSP, probably much less for variants.

What will the API be?

Input data for the basic TSP is just the complete cost/distance matrix (numpy.ndarray)
tour, objective = solve_tsp(distance_matrix)
Symmetric costs/distances allow a more efficient formulation (reducing symmetry) so a differentiation might make sense.

Variants with additional side constraints might require a time matrix for arcs, time windows for edges, other resource matrices for arcs, node pairs representing precedence relations, etc.
In those cases it makes sense to use a graph representation, e.g., via a pandas dataframe.

Additional context

@ruthmair ruthmair changed the title TSP (with additional side constraints?) TSP (with additional side constraints) May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant