Planning horizon and replanning
Answers to common questions about planning and replanning in the Pick-up and Delivery Routing 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 fit an urgent job into today’s plan?
- How do I handle sickness, no-shows, and stops that run over?
- Should I keep spare capacity for emergencies?
- Does the model use real-time traffic?
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 stop that isn’t pinned.
To protect the plan:
-
Everything before a point in time: set
freezeTime, for instance to the current time. Stops before that time can’t change, so drivers keep the stops they’ve started or are traveling to. -
Whole driver shifts: pin a shift when none of its stops should change.
-
Specific stops: pin them, for instance when a pick-up time is confirmed with a customer, or a driver has already loaded the goods.
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 Pinning stops.
How do I fit an urgent job into today’s plan?
There are two ways:
By previewing an insertion: request recommendations for the job. The request doesn’t update the current plan, but the recommended itineraries can change existing unpinned stop times. Use this when a customer is on the phone and needs an answer straight away. Protect promised stop times as described in How do I replan without changing what’s already planned or promised? before requesting recommendations, and preserve that protection when adding the job with the chosen time window to the next dataset. For an example, see Implementing the recommendation.
By replanning: add the job to the dataset with a high priority 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 stops to make room, for instance by giving them to another driver.
How do I handle sickness, no-shows, and stops that run over?
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?.
Set freezeTime to the current time, so stops that have already happened don’t change.
-
A driver is ill before their shift starts: remove their shift from the dataset. The model reassigns their jobs to other drivers.
-
A driver goes home during their shift: keep all completed stops and any remaining stops they’ll still complete in their itinerary, remove the other stops from that itinerary, and pin the shift. The model can reassign the removed, unfinished jobs.
-
A customer isn’t there: set the pick-up stop’s
durationto the time the driver waited, remove the job’s delivery stop from the job and itinerary, and remove any job-level or remaining stop-level demands for goods that weren’t picked up. -
A stop runs over: increase the stop’s
durationto how long the stop will now take. The model moves later stops if they no longer fit.
For examples, see Driver ill, No-show, and Extended stop.
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.
Does the model use real-time traffic?
No. The model calculates travel times from road network data, without live traffic information, such as current traffic jams or incidents.
When a delay affects the plan during the day, update the dataset and replan, as described in How do I handle sickness, no-shows, and stops that run over?.
For more information, see Maps service and Designing better routing plans with traffic awareness.