Back
Tech 7 min read - 26 Jun. 26 - Updated 1 Jul. 26 - Bilal Ben Nasr

Scheduling and routing: leveraging optimisation solvers and LLMs

Recent developments in artificial intelligence are creating many expectations for automating complex tasks, including meeting fundamental operational needs such as schedule management and route planning. However, LLMs at the heart of generative AI were not built to solve these combinatorial problems. Until summer 2024, LLMs were wrong about a question as simple as "how many Rs in strawberry?" (they answered two, instead of three). The bug was corrected, but not resolved: if you ask current models the question, you will see that they circumvent the problem by spelling the word letter by letter before counting – the structural cause is still there. Another family of AI algorithms, solvers, has been solving precisely these problems for decades, with mathematical guarantees and measured gains in production. These optimal solution search algorithms are based on mathematical foundations, and to use them, one must translate their real-world problem into their language, which is close to mathematical language. This has made solvers less accessible over previous decades. Today, LLMs make solvers more accessible than ever by allowing us to use our natural language as an intermediary.

1. Three problems, three sources of gains

Assignment: who does what?

The simplest problem in this family: distributing tasks among people or machines, for example, files among managers, interventions among technicians, missions among agents, etc. On a large scale and faced with complexity that evolves exponentially depending on the number of available agents and tasks to assign, manual assignment management reaches its limit much more quickly than with algorithms that search more intelligently and automatically.
Without optimisation:
  • a spreadsheet-based distribution, relying on experience that 'works', without knowing if it's good;
  • some overtime hours focused on the same people, others under-loaded;
  • HR rules respected 'in principle', until an audit proves otherwise;
  • a last-minute cancellation = an hour of re-planning under pressure.
With a solver:
  • fewer overtime hours : workload mathematically balanced, not by eye
  • HR rules guaranteed by design : a non-compliant assignment cannot come out of the algorithm
  • optimal replacement in a few seconds, by re-organising the minimum number of people

Task scheduling: how to optimally distribute tasks?

The same thing with the time dimension: hospital service, 3×8 shifts, production line, allocation of docks or rooms.
Without optimisation:
  • gaps and duplicates discovered too late;
  • costly resources used at 70% due to poor sequencing;
  • schedules published late, challenged, redone;
  • no way to test a scenario (« and with 4 teams? ») without days of work.
With a solver:
  • each resource utilisation point gained is reflected in the profit and loss account ;
  • fair and defensible schedules, each decision justified by an explicit constraint;
  • some simulations in a few minutes : change an assumption, rerun, compare.

Routes: what order of visit, how to minimise distances travelled?

Serve tens or hundreds of points with a fleet, under capacity and time slot constraints.
Without optimisation:
  • routes built by habit, which cross and double back;
  • missed time slots, penalties;
  • one too many vehicles deployed 'for safety';
  • each morning's unexpected event absorbs the planner for an hour.
With a solver:
  • typically 5 à 15 % de kilomètres parcourus en moins thanks to optimal routes;
  • some time slots respected by design, thanks to a route per vehicle optimised according to all parameters;
  • a re-optimisation in a few seconds with each unforeseen event.
Industry reference: ORION, UPS's optimisation system, saves according to the group's public figures approximately 100 million miles per year, or 300 to 400 M$ annually.

The common point

These three problems fall underoptimisation combinatoire sous contraintes : non-negotiable rules, a quantified objective, and a explosion combinatoire. Ordering 10 stops: 3.6 million possibilities. 15 stops: 1,300 billion. 20 stops: more than the number of seconds elapsed since the Big Bang.
Hence a structural observation: 'manual' almost always means 'far from optimal'. Not due to incompetence, but because the problem exceeds what a brain or a spreadsheet can explore.

À 20 arrêts, plus de combinaisons que de secondes depuis le Big Bang.

2. Why a LLM alone is not enough

The idea has been rigorously tested, including by the creators of these models. Four limitations, all structural:
  • Plausible, not optimal. Un LLM predicts plausible text; it does not calculate distances, nor compare solutions. Google DeepMind has measured it: from 50 points, LLMs struggle, with deviations from the optimum up to 20 times higher. Real-world cases have hundreds.
    Large Language Models as Optimizers, 2023
  • No quality measurement. A solver certifies « à au plus 2 % de l'optimum » thus showing what remains on the table. Un LLM cannot produce this information.
  • Neither reproducible, nor suitable for permanent corrections. Ask the same question twice, get two different schedules. But a schedule is dynamic: absences, cancellations, delays, it needs to be re-optimised in seconds, several times a day.
Le LLM est une IA du langage. Scheduling is a problem of combinatorics.

3. Specialised AI: solvers

Optimisation and operational research form one of the oldest branches of AI. Its tools, solvers, have been running in production for decades: UPS routes, airline crews, industrial scheduling.
The principle inverts the usual logic: you don't program the resolution, you declare the problem : constraints and objective. The solver explores the solution space by pruning billions of combinations, and delivers a solution valid by construction : a declared rule cannot be violated.
Three levels of tools, depending on the problem size:
  • OR-Tools / CP-SAT : Google's free open-source toolkit. Its CP-SAT engine has dominated the MiniZinc Challenge, a benchmark international competition, since 2018. For pure assignment, classical algorithms (Hungarian method) find the exact optimum in a fraction of a second. Effective for a large part of medium-sized optimisation problems (scheduling, assignment).
  • The OR-Tools Routing module = the specialised routing component: multi-vehicle, capacities, time windows, multi-depot. From a few tens to a few hundreds of points, it delivers very high-quality, reproducible solutions in seconds. To gauge the maturity of the field: the academic solver Concorde proved the exact optimum on 85 900 points, compared to the 50 points where LLMs fail.
  • SCIP - Branch and Price : More difficult to set up, but allows for solving certain large-scale problems (several hundreds or even thousands of agents, vehicles, teams, vehicles). Principle: decompose. It's broken down into manageable sub-problems (« a good route for a vehicle », « a good week for an agent ») and a master algorithm recombines these components with a guarantee of progress towards the global optimum. This is the method that has been scheduling crews for major airlines since the 1990s.

A routing problem solved by OR-Tools: guaranteed constraints, reproducible result.

Divide to optimise: the principle of Branch and Price.

4. The role of LLMs: making solvers accessible

If solvers have been working for so long, why are they still so little deployed? Because they were difficult to access: an expert was needed to translate the business into a mathematical model, and the tool was controlled using files and parameters.
This is precisely what LLMs are changing. The prevailing architecture combines the two: the LLM as the language layer, the solver as the resolution layer.
  • « Re-plan tomorrow without truck 7, prioritising late clients » → the LLM translates into parameters, the solver calculates, the guaranteed solution is returned.
  • A new business rule (« never more than two consecutive nights for new hires ») is expressed in natural language and becomes a formal constraint.
  • The LLM presents and explains the schedule to the teams, based on the solver's formal justifications.
The initial intuition was thus correct, twice: AI does solve these problems effectively, and the LLM is part of it. Simply, the LLM is the interface, the engine is a specialised AI that guarantees the result.

FAQ

What is a solver?

It is an AI algorithm specialised in constrained combinatorial optimisation. You don't program the solution for it: you declare the rules and the objective, and it explores the space of possibilities by pruning billions of combinations. It delivers a solution valid by construction (a declared rule cannot be violated) and certifiable (for example, « at most 2% from the optimum »). The reference open-source tools are: Google's OR-Tools / CP-SAT (open source), its Routing module for routes, and Branch and Price with SCIP for very large problems.

What concrete gains can be expected from routing and scheduling?

For routes, we typically observe 5 to 15% fewer kilometres for the same scope, sometimes an entire vehicle saved. Industry reference: UPS's ORION system saves approximately 100 million miles per year, representing $300 to $400 million annually according to the group's public figures. For scheduling, every gained resource utilisation point is directly reflected in the operating profit.

Do you have to choose between LLM and solver?

No, the two combine. The LLM acts as the language layer (translating a business request into parameters, expressing a new rule, explaining the schedule to the teams), while the solver remains the engine that calculates and guarantees the result. This is precisely what LLMs change: they make solvers accessible without an expert to translate the business into a mathematical model.

Do you want support to launch your digital project?

Submit your project now