The Wainwright Problem
Alfred Wainwright catalogued 214 fells in the English Lake District. This project asks: what's the shortest walking route that visits every one of them? It's a real-world variant of the Travelling Salesman Problem, built on an actual walking graph (OpenStreetMap paths plus elevation data) rather than straight-line distances.
Methods compared
The same build (summit graph, distances, ascent/descent) is solved with several different approaches below, so routes can be compared on distance, cost, and runtime.
Mixed-Integer Linear Programming (MILP)
Formulates the route as a set of linear constraints and solves for a provably optimal (or near-optimal, within a time budget) ordering using a branch-and-bound solver. Here this is done with HiGHS, called via SciPy. Gives strong guarantees on solution quality but can be slow to converge on large instances. Read more on Wikipedia.
Simulated Annealing
A probabilistic local-search metaheuristic inspired by annealing in metallurgy. It explores nearby route variations, occasionally accepting worse ones (with a probability that cools over time) to escape local minima. Fast and scalable, but with no optimality guarantee. Read more on Wikipedia.
Concorde TSP solver
An optional step using the well-known Concorde solver (via pyconcorde) to order summits as an instance of the Travelling Salesman Problem, using a tunable distance/cost metric between fells. Read more on Wikipedia.
Route comparison viewer
Open full screen ↗Interactive map and sortable table of all computed routes, filtered by objective, method, and source run. Use the map's full screen button, or the link above to open it in its own tab.