The Traveling Salesdog Problem
How I used numerical optimization to plan my greyhound’s week
Posted on May 4, 2026 by Adam Wespiser
Bebop, my Greyhound, is a big dog. 85lbs, and starting to slow down. Tall enough to sneak a bite of Easter ham off the counter from behind the island, and cute enough to get away with it. Greyhounds might look weird, yet their form strictly follows function. Track movement in an open field, chase it, and entertain the people watching.
As a puppy, he never stopped. Yet, the moment came when I noticed him take the first step slower, become more selective about play, and take longer to recover.
In light of this, I’ve started thinking about what the perfect routine would be: two walks a day, one run, minimal time over hard surfaces. He loves novelty, so different activities every day, and never the same activity two days in a row.
In other words, maximum variety and enrichment while minimizing the distance traveled from home.
Julia + JuMP
This task, how do we pick the best of several choices under constraint, is an optimization problem. Taking the activities we can do and their qualities into consideration, the question of dog enrichment can be solved with a mixed-integer linear program: a set of binary decisions (what we do and when) with an objective to minimize distance.
To solve this, I reached for Julia’s JuMP library. I’ve always liked Julia for its ergonomics and performance, and JuMP lets you write a model that looks almost exactly like the math.
... continue reading