What an MIT DFS Paper Taught My NHL Lineup Optimizer

An MIT NHL DFS paper found win probability was the only goalie predictor that mattered. So I rebuilt my NHL lineup optimizer around goalies.

Last week I came across a paper from three MIT operations research people — David Scott Hunter, Juan Pablo Vielma and Tauhid Zaman — called Picking Winners in Daily Fantasy Sports Using Integer Programming. It is about building a set of NHL DFS lineups with a solver, which is exactly what my free NHL lineup optimizer does, so I read it with a pencil in hand. They did not just run simulations: they entered real DraftKings contests and report that “we are able to rank in the top-ten multiple times in hockey and baseball contests with thousands of competing entries.” Then they donated the money — “around $15,000” — to the Greater Boston Food Bank, which I thought was a classy touch.

A good chunk of the paper is theorems and proofs about submodular functions. I skipped those. What I wanted was the strategy: what they stacked, what they found, and whether any of it should change my tool. One thing did, and it made the tool more than twice as fast.

Two bar charts. Seconds per lineup: 2.1 when the solver picks the goalie, 0.9 with the goalie fixed. Lineups built from 150 asked in 240 seconds: 70 versus 115.
Same FanDuel slate, same settings, same machine. Fixing the goalie before the solve cut the time per lineup by more than half.
Continue reading “What an MIT DFS Paper Taught My NHL Lineup Optimizer”

The Textbook Fix That Made My MILP Twice As Slow

The textbook move, when a mixed-integer program solves slowly, is to tighten the linear relaxation. Add the constraint that makes the LP bound closer to the integer optimum, give branch and bound less room to wander, watch it finish faster.

I did that to the stacking constraint in my hockey lineup optimizer last week. It got twice as slow. Same slate, same solver, same lineups out the other end — 2.20 seconds a lineup before, 4.38 after. I reverted it and left a comment telling future-me not to helpfully fix it again.

Bar chart of seconds per lineup by stacking formulation: naive 3.00, cover inequalities 2.20, two-sided counters 4.38
Three formulations of the same constraint, same slate and solver. The textbook tightening is the slowest of the three.

Continue reading “The Textbook Fix That Made My MILP Twice As Slow”

My Free Route Optimizer Now Tracks Three Capacities

The free vehicle routing optimizer at routing.kindoflost.com used to think about a vehicle’s capacity as a single number. Fine for a lot of routes, but real fleets rarely run out of just one thing. A cargo van can be full on volume with plenty of weight capacity left, or maxed out on weight while the cargo area still has room, or simply out of pallet slots. I added a fix: the tool now supports three independent vehicle capacity constraints per route, plus a route time limit you can set per vehicle instead of one setting for the whole fleet.

Vehicles sheet with capacity1, capacity2, capacity3, and route_time_limit columns
Continue reading “My Free Route Optimizer Now Tracks Three Capacities”

What Is a 4 on 4 off Schedule? (Free Builder)

The 4 on 4 off schedule is the easiest rotating shift pattern there is to explain to a new hire: work four consecutive shifts, then get four consecutive days off, on an 8-day cycle that just keeps repeating. No block-counting, no mid-cycle exception, nothing to memorize. The trade-off is what it does to the calendar — and that trade-off is the part most explanations of this pattern skip.

Line chart showing the start day of each 4-on-4-off work block drifting one weekday later every 8-day cycle, from Monday back to Monday after 8 cycles
Eight cycles, eight weekdays, back to Monday — the calendar cost of an 8-day pattern in a 7-day week.
Continue reading “What Is a 4 on 4 off Schedule? (Free Builder)”

Free Rota Planner (No Signup Required)

If you searched for a rota planner rather than a “scheduler,” you’re probably in the UK, Ireland, Australia, or New Zealand — Commonwealth English keeps “rota” and “roster” for the same thing American software calls a schedule. The vocabulary is different; the underlying problem, for a 24/7 team, is identical: cover every shift, honour rest between shifts, and don’t leave one person doing all the nights. This is a free rota planner built around a real solver rather than a grid you fill in by hand, and it makes no assumption about which side of the Atlantic you’re on.

Bar chart: days until a rota pattern repeats on the same weekdays - DuPont 28, Panama and Pitman 14, 4-on-4-off fixed 56, 4-on-4-off rotating 112
Every named rota pattern eventually lands back on the weekdays it started on — some take a lot longer than others.
Continue reading “Free Rota Planner (No Signup Required)”