> ## Documentation Index
> Fetch the complete documentation index at: https://www.planmyrounds.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Why did my Duty Plan generation fail?

> Diagnose a Failed Duty Plan — insufficient doctors, approved leave, staffing requirements, or scheduling rules that are too tight — and retry.

A roster generation fails when the engine cannot find a schedule that satisfies every [hard constraint](https://www.planmyrounds.com/docs/rosters/roster-constraints.md). The reason is shown on the roster page — start there.

## Check these, in order

**1. Not enough doctors**

Compare the number of active doctors in the roster against the total headcount your shifts need across the whole period. See the coverage check in [Creating a roster](https://www.planmyrounds.com/docs/rosters/creating-a-roster.md).

**2. Too much approved leave**

A lot of approved leave in the period can leave no one available on certain days. Check the [Leave Calendar](https://www.planmyrounds.com/docs/leave/calendar.md) for the date range.

**3. Staffing requirements too high**

Each [Shift Requirement](https://www.planmyrounds.com/docs/shifts/overview.md) sets a required headcount and a minimum number of seniors. If either is higher than what your team can supply every day, generation fails.

**4. Rest and work-pattern rules too tight**

Max consecutive work days, minimum rest days per week, and minimum rest hours between shifts are all hard constraints. See [Roster constraints](https://www.planmyrounds.com/docs/rosters/roster-constraints.md#work-and-rest-rules).

**5. Senior-to-junior ratio**

If your organisation uses seniority ratios, check that enough senior doctors are active and included in the roster.

**6. Conflicting constraints**

Rules can conflict with each other in a way that's only visible when you try to satisfy all of them at once — for example, a low max-consecutive-days setting combined with a high headcount requirement and a small team.

## Fix and retry

> **Add more doctors**
>
> Gives the engine more options to work with.

> **Loosen a rule**
>
> Raise max consecutive work days, or lower minimum rest days.

> **Approve outstanding leave**
>
> So the engine has a complete, accurate picture before it runs.

> **Shorten the period**
>
> A very long date range multiplies every constraint's effect.

Use [Retrying a failed roster](https://www.planmyrounds.com/docs/rosters/retrying-a-failed-roster.md) to relax the most common blockers and add doctors from the roster's own page, without rebuilding it from scratch.

> [!NOTE]
>
> Running an Auto Duty cycle instead? The same failure and retry flow applies — see [If generation fails](https://www.planmyrounds.com/docs/auto-duty-planning/running-a-planning-cycle.md#if-generation-fails) for the Planning Cycle version, including the structural-configuration-problem case that retrying alone won't fix.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.