# How does the rota calculation work?

You enter the stands, the shifts and the availability. The software builds a rota that meets the mandatory rules first, then improves fairness and wishes. It says as soon as a feasible plan exists, and why when it finds none.

## Three levels of demand

1. **Mandatory rules**, never broken: the legal frame, incompatibilities, imposed assignments.
2. **Coverage**: every seat to fill is held.
3. **Quality**: fairness, wishes, fewer days in a row, unbroken days.

A level is never paid for with the one above it. This frame is detailed on [the Labour Code and rotas](/en/labour-code/).

## What it shows on the way

As soon as a feasible plan exists, the Calculate tab of the Planning page says so. The rest only improves quality, and a button stops the run and keeps that plan. The three levels of the score are drawn live, so you see when it levels off. To watch it run on your team, [send us your data](/en/contact/).

## How long it takes

For a team of about 150 people, a plan that holds every mandatory rule usually arrives in under a minute.

The solver then keeps going for a few minutes to satisfy as many people as it can: fairness, wishes, continuous days. It stops by itself once it finds nothing better, and after a quarter of an hour at most. You can stop it sooner: the best plan found is kept. The time budget is set in [the guide to tuning the solver](/en/docs/install/tune-the-solve/).

## Three ways to start it

- **Calculate the rota** starts from the saved plan.
- **Fix after a change** freezes what holds and recalculates only the reopened seats.
- **Start over from scratch** drops what was there, and says so first.

Before it starts, the page says what the solver will receive: locks, adjustments, consignes, disabled rules. The step by step is in [the guide to running the solver](/en/docs/rules/solve-the-schedule/).

## When it finds nothing

It names the rule that blocks, on which shifts and for whom. Usually someone is missing on a Saturday evening. The staffing check says so before the first run, with the smallest team that works and the skills to train. To read these blockages, follow [understanding a rota that gets stuck](/en/docs/rules/understand-a-stuck-schedule/).

## After publication

Once the rota is sent, every person moved costs the solver: a late recalculation moves as few people as it can. On the day, an absence restarts nothing: the empty seat appears with replacements that already meet the rules.

## What runs underneath

Since version 3.0.0, a search engine written for this rota looks for the plan. It is not taken at its word: every plan is scored again by [Timefold Solver](https://timefold.ai/), and a difference fails the run. The rules' code is open and [documented](/en/docs/build/why-these-rules/). The software is free: you can [host it yourself](/en/self-hosting/). To hand the big runs to a faster machine, see [solving on another machine](/en/docs/install/solve-on-another-machine/).

Want to see it on your own data? https://planning.sylvain.dev/en/contact/ planning@sylvain.dev
