Skip to content
Blog

The only constant is change: How PlanningAI keeps schedules alive in real-time

Plans rarely survive reality, no matter how perfect they are. Employee sick calls, broken trucks, or no-show customers can wreck your carefully built schedule before lunchtime. That’s why our PlanningAI optimization algorithms replan in real-time. In this post, Tom Cools will enlighten you on how this works. 

Over the past few weeks, I’ve had a lot of great conversations with developers, planners, and other professionals at various conferences. Usually, they’re pretty impressed by what PlanningAI (and Operations Research in general) can do and has been doing for decades. However, there is one particular question which always bubbles up: “What if something happens and the plan no longer works?”

Excellent question!

One of my university professors imprinted the following quote into my brain: “Change is the only constant”, which is a quote often attributed to the Greek philosopher Heraclitus, who figured it out way back around 500 BC. Yes, dealing with change has been ruining carefully crafted plans since humans first tried organizing anything.

Generated by ChatGPT.

In the realm of planning and optimization, change can present itself in different ways: An employee calls in sick, a truck decides today is a great day for a breakdown, or a customer ghosts their appointment. Suddenly that beautifully optimized solution becomes irrelevant, sometimes before you’ve even finished your morning coffee.

We are forced to face reality: the real world doesn’t care about our perfectly optimized schedules. Or as another philosopher and occasional boxer put it: “Everyone has a plan 'til they get punched in the mouth” - Mike Tyson

# Rolling with the punches

The quote “change is the only constant” isn’t just a sad pointing out of facts. It basically calls upon us to stay flexible in our plans and adapt to new circumstances, because change will come.

That sounds nice doesn’t it… “just adapt to change”. It’s a bit more involved than that.

The first thing we should do is an impact analysis: “What does a certain change mean for our business”? In the case of an employee getting sick, we should ask ourselves, “How critical is this employee?” and “What if we do not replace them?”

The simplest option is to not solve the problem at all, but that often isn’t a feasible path forward. Usually, the plan needs to be adapted, which leads us to the next question.

# How much can the plan change?

When a plan is already in motion, abrupt changes can cause chaos. For example, if field technicians are out solving issues, you can't just send them racing off to handle emergencies every hour.

One approach to deal with this is to freeze a part of the plan and let a solver re-optimize the schedule. This will make sure that as much of the plan as possible stays the same. In the field technicians case, we might freeze any assignments for the next hour.

Freezing assignments isn’t always the best approach as it’s sometimes difficult to determine what should and should not be ignored when re-planning. Instead, we could use a Minimize Disruption Constraint. This constraint will compare any newly generated solution with the previous active plan and penalize that solution for each change. This approach nudges the solver to keep as much of the original plan intact as possible.

These disruption constraints can be flexible, penalizing immediate schedule changes more heavily than those further out. That means you can smoothly adapt schedules while keeping your team happy.

These two mechanisms, Freezing and Minimize Disruption Constraints, could also be used together, where you might freeze the next hour as you absolutely want no abrupt changes but do accept some disruption afterwards. This combines minimal immediate chaos and manageable long-term adjustments, the best of both worlds.

# Communicating changes

Adapting the schedule is only the start. You still need to communicate the changes clearly to everybody involved. If you have on-call staff, the phone-call to come to work shouldn't be a surprise. If you need to call upon someone who normally wouldn’t be working, that’s another thing.

In these situations, 2 things are fundamentally different from regular planning.

  1. If people are unexpectedly going to be asked to work, you should probably call them first if they are ok with that before planning them in. They might be out of town or otherwise engaged.
  2. In these situations, achieving an optimal plan becomes secondary to maintaining clear communication and avoiding chaotic changes.

In Timefold Solver this use case is a first-class citizen. With the Assignment Recommendation capability, Timefold Solver combines a greedy algorithm with incremental score calculation to swiftly identify the best available options for fitting the change in the existing schedule.

The recommendations also give some insight into the impact on the overall schedule, so a manager can make an informed decision on who to call into work. This human-in-the-loop approach brings together the power of AI with human intuition which is essential for successful planning.

After the crisis has been resolved the new plan could be re-optimized using the freezing and disruption minimizing constraints.

# Embracing change

The move to real-time planning isn’t just technical. It’s philosophical. It means embracing change not as a problem to be avoided, but as a constant to be managed.

In a way, this is the real power of PlanningAI. Not just building smart plans but building resilient plans that stay smart, even when the world decides to punch you in the mouth.

Let’s make plans that adapt.

Continue reading