There have been a few articles in the last couple years that have used traveling salesman problem solvers to find the fastest way to see all the national parks or 72 breweries in the US. I’m going to join the trend on a smaller geographic scale by plotting the fastest way to see 18 breweries (including one cider house) in the Boston area.
The fastest route takes about 2.5 hours of driving (by your designated driver or using a ride service, of course) from start to finish:
If you take 15 minutes at each brewery to have a beer, and it takes 2.5 hours to drive to each one, you could do it all in only 7 hours. Not bad, that’s less than a full day at work!
You won’t be able to drive this yourself if you have a beer at every stop, so you’ll either need to find a friend to drive you around for seven hours, or take something like a Lyft. I used the Lyft API to estimate how much it would cost, and it comes in at about $176. If you can split this with three friends, and you pay, say, $8 per drink, your total cost would be $188.
Am I going to do this? Probably not. I really don’t think I could stomach 17 beers and a cider in one day. And think of all the fun I could have programming in R for seven hours, instead. Yeah. Easy choice.
Here’s a list of all the breweries, in order. You could start your tour anywhere, but if I were doing this I’d start at Aeronaut, my favorite brewery around here. You’d also get to end at Bantam Cider Company to cap off very long night out on a different note.
- Aeuronaut Brewery
- Winter Hill Brewing Company
- Idle Hands Craft Ales
- Night Shift Brewing
- Bone Up Brewing Company
- Mystic Brewery
- Downeast Cider House
- Boston Beer Works
- Trillium Brewing Company
- Harpoon Brewery
- Dorchester Brewing Company
- Sam Adams Brewery
- Turtle Swamp Brewing
- John Harvards Brewery
- Lamplighter Brewing Company
- Cambridge Brewing Company
- Somerville Brewing Company
- Bantam Cider Company
If you want to want do this, here’s a Google Map with all the breweries entered in order. Good luck. Please drink responsibly.
P.S. Let me know if I missed any breweries in the area!
Do it yourself: All the code for this project is on Github. I used the Google Maps API for calculating a distance matrix between all the breweries and to get detailed directions between each point on the final tour. The optimal tour was calculated using the asymmetric traveling salesman problem solver from the TSP R package. The Lyft price estimate came from it’s public API. If you want to run the code yourself, you’ll need to get a Google Maps API key and a Lyft API key.