How LeonGrid Builds a Fair Rotation Matrix in 1 Second
A look inside how LeonGrid's rotation engine builds a fair, anti-fatigue weekly rotation in under a second β and why the order it works in matters.
"Under a second" sounds like a marketing number until you see what it's actually replacing: the hour or two most team leaders spend manually checking restrictions, tracking fairness, and avoiding back-to-back hard stations β for every operator, every day, every week. This is a look at how the engine actually approaches that problem, and why the order of operations is what makes the result fair.
Building a weekly rotation matrix isn't really a scheduling problem, it's a constraint satisfaction problem: assign every operator to a station in every time slot, while simultaneously respecting restrictions, avoiding consecutive difficult assignments, and keeping the hardest stations evenly distributed across the team. Excel is good at calculations. It's not built to solve several interacting constraints at once β which is exactly why this part of the process is the one that eats the most time by hand.
Four Phases, in a Specific Order
The order the engine works in isn't arbitrary β each phase exists because doing it out of order creates exactly the problems covered in our guide on common Excel scheduling mistakes.
Phase 1 β Allocate high-demand stations to fully capable operators. The most demanding, "Very Difficult" stations get filled first, while the full pool of qualified operators is still available to choose from.
Phase 2 β Enforce restrictions immediately. Medical and training restrictions are applied next, while there's still plenty of vacancy to place restricted operators into compatible stations. Waiting until later β as often happens with manual scheduling β is what leads to restricted operators ending up in the wrong place simply because compatible slots ran out.
Phase 3 and 4 β Fill the remaining slots evenly. The rest of the Medium and Difficult stations are distributed across the remaining team, using a fairness pass that accounts for who's already carrying more demanding assignments.
Fairness Without a Fixed Order
One detail that matters more than it sounds: the engine uses stable pseudo-random keys per execution to shuffle the team before assigning stations. Without this, any algorithm risks defaulting to the same order every time β meaning the operators listed first would consistently get assigned first, and over time, patterns unrelated to actual fairness start to emerge. Shuffling per generation keeps the hardest assignments genuinely spread across the team, not biased by list order.
The Anti-Fatigue Check
Within each operator's day, the engine checks previous assignments before placing the next one β actively avoiding two Difficult or Very Difficult stations back to back. This is the same principle covered in why rotating difficult stations reduces workplace injuries: the goal is a sequence like Difficult β Medium β Difficult, giving genuine recovery time within the shift itself.
Why This Takes a Person an Hour, and a Computer a Second
None of these four phases are individually complicated. What makes them slow by hand is doing all of them, correctly, in the right order, for every operator, every day, across a full week β while also remembering what happened the day before and the week before. A constraint-solving algorithm doesn't get tired, doesn't lose track of who worked what yesterday, and doesn't have to hold the whole week in its head at once. That's the entire difference between an hour and a second.
Where the Spreadsheet Comes Back In
The output isn't locked inside a new system. Once generated, the rotation is copied and pasted straight back into your existing Excel or Google Sheets file β the same format your factory already trusts, with none of the manual constraint-checking that used to sit behind it.
The Bottom Line
The 1-second number isn't the point β it's what that second replaces: restrictions checked first, hard stations spread fairly and unpredictably across the team, and fatigue avoided by design rather than by memory. That's a genuinely different process than building a schedule by hand, even though the file it ends up in looks exactly the same.
