https://github.com/phoenixsmaug/tsp
A comparison of various solvers for the Travelling Salesman Problem.
https://github.com/phoenixsmaug/tsp
backtracking branch-and-bound integer-programming tsp tsp-solver
Last synced: about 1 month ago
JSON representation
A comparison of various solvers for the Travelling Salesman Problem.
- Host: GitHub
- URL: https://github.com/phoenixsmaug/tsp
- Owner: PhoenixSmaug
- License: mit
- Created: 2025-04-25T11:59:25.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2026-01-26T13:42:00.000Z (2 months ago)
- Last Synced: 2026-01-27T02:56:27.223Z (about 2 months ago)
- Topics: backtracking, branch-and-bound, integer-programming, tsp, tsp-solver
- Language: Julia
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Various solvers for the Travelling Salesman Problem
The [Travelling Salesman Problem (TSP)](https://en.m.wikipedia.org/wiki/Travelling_salesman_problem) is a famously hard combinatorial optimization problem. Here two solvers are implemented:
* An efficient solver, which uses the [Miller-Tucker-Zemlin Encoding](https://phabe.ch/2021/09/19/tsp-subtour-elimination-by-miller-tucker-zemlin-constraint/) to translate TSP into an Integer Programming problem and solves that with the commercial state-of-the-art solver Gurobi
* A standalone solver which implements the [Held-Karp algorithm](https://en.wikipedia.org/wiki/Held%E2%80%93Karp_algorithm) to solve TSP with dynamic programming
* A simple branch-and-bound solver for educational purposes, who can prune backtracking branches as soon as their lower bound is bigger than the current maximum
Using `benchmark()`, one can compare the performances on the [TSPLIB95 Dataset](http://comopt.ifi.uni-heidelberg.de/software/TSPLIB95/). `benchmark.log` also provides pre-recorded results measured with an Intel i9-10980HK and 32 GB of memory.
(c) Mia Müßig