> ## 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](/docs/rosters/roster-constraints). The reason is shown on the roster page — start there.

## Check these, in order

<Steps>
  <Step title="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](/docs/rosters/creating-a-roster).
  </Step>

  <Step title="Too much approved leave">
    A lot of approved leave in the period can leave no one available on certain days. Check the [Leave Calendar](/docs/leave/calendar) for the date range.
  </Step>

  <Step title="Staffing requirements too high">
    Each [Shift Requirement](/docs/shifts/overview) sets a required headcount and a minimum number of seniors. If either is higher than what your team can supply every day, generation fails.
  </Step>

  <Step title="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](/docs/rosters/roster-constraints#work-and-rest-rules).
  </Step>

  <Step title="Senior-to-junior ratio">
    If your organisation uses seniority ratios, check that enough senior doctors are active and included in the roster.
  </Step>

  <Step title="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.
  </Step>
</Steps>

## Fix and retry

<CardGroup cols={2}>
  <Card title="Add more doctors" icon="user-plus">
    Gives the engine more options to work with.
  </Card>

  <Card title="Loosen a rule" icon="sliders">
    Raise max consecutive work days, or lower minimum rest days.
  </Card>

  <Card title="Approve outstanding leave" icon="circle-check">
    So the engine has a complete, accurate picture before it runs.
  </Card>

  <Card title="Shorten the period" icon="calendar-minus">
    A very long date range multiplies every constraint's effect.
  </Card>
</CardGroup>

Use [Retrying a failed roster](/docs/rosters/retrying-a-failed-roster) 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](/docs/auto-duty-planning/running-a-planning-cycle#if-generation-fails) for the Planning Cycle version, including the structural-configuration-problem case that retrying alone won't fix.
</Note>
