Planning horizon and replanning
Answers to common questions about planning and replanning in the Employee Shift Scheduling model.
- How far ahead should I plan?
- Should I book each job as it comes in, or plan everything together?
- How often should I replan, and what should trigger replanning?
- Which part of the plan should I fix or publish?
- How do I replan without changing what’s already planned or promised?
- How do I fill an extra or uncovered shift at short notice?
- How do I handle sickness and other last-minute absences?
- Should I keep spare capacity for emergencies?
- What do I do with rules that span longer than my planning window?
How far ahead should I plan?
Plan far enough ahead to see your capacity and place flexible work, but keep the detailed plan open until close to the day. Many organizations plan four to six weeks ahead.
Most organizations plan in layers:
-
A rough plan a month or more ahead, to see whether you have enough capacity and to place work with flexible deadlines, such as scheduled maintenance.
-
A detailed plan a week to a few days ahead, which you publish to the people doing the work.
-
Replanning during the day, for urgent work and other changes.
You don’t need all three layers from the start. Start with the one that matters most to your business, and add the others later.
A longer horizon gives the model more freedom. For instance, if a task must happen within the next 30 days, the model can choose the day that fits best with the rest of the work. A day-ahead plan can’t do that.
A longer horizon also has costs:
-
Plans far in the future are more likely to change before the work happens.
-
Committing to work far in advance leaves less room for urgent work that comes in later.
-
Longer planning periods make datasets larger, so they take longer to solve.
Should I book each job as it comes in, or plan everything together?
Plan everything together. Add work to the dataset as soon as you know about it, and let the model refine the plan as the day gets closer.
When you book each job as it comes in and keep it fixed, every fixed booking removes options from the model. You end up with a schedule, but not an optimized one.
Waiting until the last moment to plan isn’t the answer either. You’ll have more accurate information, but less room to fit the work in, and less slack when work runs longer than expected.
Some work does need an answer straight away, for instance when a customer is on the phone and wants an appointment. If the model offers recommendations, use them to find the best options in the current plan without changing the rest of it. Then pin the option you choose, so the next solve keeps it.
For more information, see Resource recommendations.
How often should I replan, and what should trigger replanning?
There’s no single right frequency. It depends on how quickly your work changes, how urgent new work is, and how much change the people doing the work can accept.
A common pattern is:
-
Regularly, for the coming weeks: plan the next period, for instance weekly, to see whether you have enough capacity.
-
Every evening, for the next day: replan the next day, starting from the current plan.
-
During the day, when something changes: replan when urgent work comes in, someone is unavailable, or work runs longer than expected.
How often to replan during the day depends on how urgent new work is. If new work must start within an hour or two, replan as soon as it arrives. Otherwise, collect changes and replan at a fixed interval, for instance every 30 or 60 minutes.
Each replan can change the plan for the people doing the work. To keep assignments you’ve already communicated, you can pin them, so the model doesn’t change them. If some changes are acceptable, some models can discourage changes instead, so the model only changes communicated assignments when the improvement is worth it.
Your own system usually triggers replans, for instance with a scheduled task or when it receives new work. A button that lets planners replan when they need to is also common. If many users can trigger a replan, limit how often replans can run, and consider how to handle race conditions such as one person starting a replan while a previous replan is still solving.
When you start, replan when planners ask for it. Alternatively, consider replanning at a set interval that works for your business needs, such as once a night, or once a week. Add automatic replans during the day when your planners trust the results.
For more information, see Handling changes to your planning data.
Which part of the plan should I fix or publish?
Plan over a longer period, but publish only the part people need to act on, and keep the rest open. For instance, plan a full month, but publish only the next week.
-
The published part is the work you’ve communicated to the people doing the work, or to your customers. You can pin the published assignments, so the model doesn’t change them when you replan.
-
The unpublished part stays open, so the model can rearrange it when work or availability changes.
Store each plan the model returns in your own system as a draft, so planners can review it before you publish it. When planners change the plan by hand, you can send their changes back as pinned assignments in the next dataset, so the model keeps them.
Decide early which part of the plan is fixed, which part stays open, and who can still change each part. These decisions shape how you integrate the model with your own systems.
For more information, see Real-time planning.
How do I replan without changing what’s already planned or promised?
Include the current plan in the next dataset. The model starts from the existing assignments, but it can still change any shift assignment that isn’t pinned.
To protect the plan:
-
Specific shifts: set
pinnedtotrueon shifts whose employee must not change, for instance shifts you’ve already published. -
The rest of the plan: add
disruptionRulesto employee contracts. The model then only changes an existing shift assignment when the improvement is worth the change. Use a higherdisruptionWeightfor contracts where changes are more disruptive.
Keep the near future fixed, for instance today and tomorrow, and let later work change, so the model still has room to improve the plan.
For more information, see Real-time planning.
How do I fill an extra or uncovered shift at short notice?
There are two ways, depending on whether the rest of the plan can change.
Without changing the rest of the plan: request recommendations for the shift. The model returns the employees who fit the shift best, in order, without changing any other shift assignment. Use this when someone calls in sick and a planner needs to find a replacement straight away. Assign the employee you choose. You can pin the shift in the next dataset, so the model keeps the assignment.
By replanning: add the shift to the dataset, or remove the unavailable employee’s assignment, and replan, with the rest of the plan protected as described in How do I replan without changing what’s already planned or promised?. The model can then move other shift assignments to make room. For examples, see Real-time planning.
How do I handle sickness and other last-minute absences?
Update the dataset to match what’s happening, then replan with the rest of the plan protected, as described in How do I replan without changing what’s already planned or promised?.
-
Make the employee unavailable: remove their
availableTimeSpansfor that period, and add anunavailableTimeSpansentry. -
Pin the shift assignments that shouldn’t change, but don’t pin the shifts the absent employee was assigned to.
-
Replan, so the model assigns the absent employee’s shifts to other employees.
To find a replacement for one shift without replanning, use recommendations, as described in How do I fill an extra or uncovered shift at short notice?.
For an example, see Real-time planning due to illness.
Should I keep spare capacity for emergencies?
Yes, it is always recommended to keep spare capacity if possible, especially if your business regularly gets urgent work that must be done the same day.
The model fills the capacity you give it. If the plan for the day is full, there’s no room for urgent work, and fitting it in means moving work you’ve already planned. Recommendations and replanning can show you whether urgent work fits, but they can’t create capacity that isn’t there.
To reserve capacity, keep some time or some people free:
-
Standby resources: schedule some people to work as normal, but leave them out of the dataset, so the model doesn’t assign them work. They’re available to cover absences or urgent work on the day.
-
Part of some resources' time: leave part of their time out of the dataset, for instance one person’s afternoon.
-
Unavailable time: instead of leaving time out, mark it as unavailable, so the model doesn’t assign work to it.
On the day, when someone is absent or urgent work comes in, add the standby resources or the reserved time to the dataset and replan. If you don’t need them, add them anyway, so the model can use them for other work.
How much capacity to reserve depends on how much urgent work and how many absences you usually get. Look at what happened on recent days, and adjust the reserved time as you learn.
What do I do with rules that span longer than my planning window?
Include the shifts employees have already worked in the dataset, as historic shifts.
For instance, a rule of a maximum of eight night shifts in four weeks needs to know how many night shifts employees worked before the planning window starts. Include enough historic shifts to cover the earliest rolling window that overlaps the planning window; the required history depends on the rule’s window, not on how many weeks you are planning.
Shifts that end before the planning window starts are treated as historic. The rules use them to count what employees have already worked. Most constraints skip violations involving only historic shifts, but period rules can still report violations for periods overlapping the planning window, even when those periods contain only historic shifts. Pin each historic shift to the employee who worked it, otherwise the model raises a validation warning. Set the planning window explicitly when your dataset includes historic shifts.
Sending past shifts covers most rules that span longer than the planning window. If a rule also depends on work after the planning window, you can plan a longer period and publish only the start of the plan, as described in Which part of the plan should I fix or publish?.
For more information, see Historic shifts.