Choreography: routing and allocation under real constraints
AI optimizes routing and allocation fast, but the mathematically perfect optimization can be operationally impossible. This lesson shows how to audit the real constraint before you run any plan AI considered optimal.
You ask AI to build the cheapest delivery route for the day, with fifteen stops. In seconds it returns a sequence that saves 40 kilometers over yesterday's route, pretty, round, looks perfect. Except this route sends the truck down an avenue with a heavy vehicle traffic restriction after eight in the morning, and the third stop is a customer who only receives cargo between ten and eleven, a window the "optimal" route blows past by twenty minutes. On paper, the route is the best possible. On the street, it doesn't run.
AI suggested the "optimal" allocation of working capital across three suppliers to maximize early payment discounts, ignoring that one of the contracts has an exclusivity clause that forbids paying two competing suppliers in the same week. The plan looked perfect on the spreadsheet and broke a clause nobody had told AI about.
They asked AI to optimize the distribution of cases among the team's lawyers, balancing workload. It allocated perfectly by case volume, except it ignored that two of the cases require the same lawyer due to a conflict of interest with another case, a constraint that only exists in the firm's history, not in any spreadsheet AI saw.
AI optimized budget allocation across channels to maximize projected reach, ignoring that one of the channels has a minimum quarterly investment contract already signed. The "efficient" allocation would cut that channel to zero, violating a contractual commitment that wasn't in the data it received.
AI optimized the month's on call medical schedule, minimizing the total number of swaps. The optimal result put the same professional on two consecutive shifts without the minimum rest interval required by regulation, a legal constraint that wasn't explicit in the request.
They asked AI to prioritize and allocate squads across features to maximize value delivered in the quarter. The optimal allocation ignored that two features depend on the same API only one team can change at a time, a technical sequencing constraint AI had no way of knowing without being told.
AI optimized the distribution of accounts among salespeople to balance revenue potential. The optimal plan gave the biggest account to a salesperson who's already at the limit of simultaneous accounts he can serve well, a capacity constraint that exists in practice and in no CRM.
At the distribution center, AI received the request to optimize the allocation of seven drivers to twenty two deliveries for the day, minimizing total route time. It returned an elegant distribution, with the lowest combined time of all the options tested. The problem showed up at nine in the morning: one of the drivers, under the "optimal" allocation, would end up with a ten hour straight shift, exceeding the maximum workday allowed by law and by the collective agreement. Another driver would end up allocated to two deliveries that, together, exceed his vehicle's weight capacity, not volume, weight. AI optimized exactly what was asked, total time, but nobody told it there was a workday limit and a weight limit. The manager only caught it in time because he checked the allocation line by line before dispatch, comparing it against the constraint list he keeps in a separate spreadsheet.
They asked AI to optimize the year's internal audit schedule, minimizing travel between units. The optimal schedule grouped two audits in the same week that, by internal policy, need to be conducted by different auditors and never in parallel in the same region, a segregation constraint that wasn't in the request.
AI optimized server instance allocation across services to minimize cloud cost. The optimal plan reduced one service's capacity below the redundancy minimum required by the client's SLA contract, a contractual constraint that wasn't in the cost numbers it received.
They asked AI to optimize the week's usability testing schedule, maximizing sessions per day. The optimal schedule booked back to back sessions with no break to transcribe observations while they're still fresh, a research quality constraint that wasn't explicit in the request.
They asked AI to optimize squad allocation across three initiatives for the quarter, maximizing combined expected impact. The optimal allocation concentrated everything on a single key person who's already committed to another critical project, an availability constraint that only exists in the manager's head, not in any system.
There's a silent trap in every optimization: the result can be perfect on paper and impossible on the street. AI is great at finding the best combination within what you told it. The problem is when you didn't tell it everything, and it will never notice that on its own, because for AI, if nobody mentioned a constraint exists, that constraint simply doesn't exist.
The core idea of this lesson. AI optimizes combinatorics incredibly well: routing, allocation, cargo distribution, it tests more combinations in minutes than you'd test by hand in a day. But it only optimizes within the constraints you gave it. If a real constraint (maximum workday, delivery window, weight capacity, exclusivity contract, safety rule) didn't make it into the request, the "optimal" plan can violate that exact constraint, with the same confidence as a correct plan. That's why, before you run any plan AI considered optimal, you audit it against your list of real constraints, written down by hand.
01What AI optimizes well: the combinatorics
Routing, allocation, and cargo distribution are, at their core, combinatorics problems: there are many ways to arrange the pieces, and you want the best one by some criterion, shortest distance, lowest cost, shortest total time. Testing these combinations by hand is slow and, in practice, nobody tests all of them, you test two or three variations and pick the one that looks best.
AI really changes that game. It tests hundreds of combinations in seconds and returns the one that optimizes the criterion you asked for. That's a real gain, and it's exactly where it should be used: generating and comparing variations is mechanical search work, and search at volume is the machine's strength, not yours.
02What stays yours: listing the real constraints
Here's the point the whole lesson revolves around. Before you request any optimization, you need to list, in writing, the constraints the plan MUST respect, because AI doesn't make up those constraints on its own. If you don't say it, it optimizes as if they don't exist.
Think of the constraints that show up every week in a real operation:
- Maximum driver or employee workday, set by law and by collective agreement, not by common sense.
- Delivery or service window, the customer only receives or is only served within a specific time.
- Real vehicle or resource capacity, weight and volume kept separate, because a plan can fit in volume and blow past weight.
- Exclusivity or sequencing contract, things that exist in a signed document, not in a system AI queries.
- Safety rule, two cargoes that can't travel together, two cases that require different people due to a conflict of interest.
This list doesn't come from anywhere magical. It comes from you, from whoever knows the operation inside out, and it needs to be written down before you request the optimization, not checked after looking at the pretty result.
03The core danger: optimal on paper can be impossible in practice
Here lives the risk that gives this lesson its name. AI delivers the most efficient plan by the requested criterion, with the same confidence as always, whether it's operationally possible or not. A shorter route can cross a street with a heavy truck traffic restriction. An "efficient" allocation can blow past a driver's workday. A distribution plan can put two cargoes together that can't travel in the same vehicle under safety policy.
Notice that the route on the right isn't the "best" by the original distance criterion. It's the best by the criteria that actually matter, including the ones that didn't fit into the first request. This isn't AI's failure, it's the request's failure: it optimized exactly what was described, and what was described was incomplete. Keep this sentence, because it applies to almost every optimization disaster: the machine doesn't get the math wrong, it answers exactly the question you asked, and the problem lives in the question.
04Auditing the constraint, before you run any plan
The defense is simple to describe and easy to skip when you're in a rush. Before you accept any plan AI considered optimal, you check it against your list of real constraints, written down beforehand, not against the "seems reasonable" feeling the pretty plan gives off.
The checklist has three steps. First, list the real constraints in writing, before requesting the optimization, not after seeing the result. Second, check each constraint on the list against the plan AI returned, one by one, without skipping any just because the rest looks right. Third, for each constraint violated, calculate the real cost of running it anyway, a fine, labor risk, a broken contract, and decide whether it's worth adjusting the plan or knowingly accepting the cost.
The economic frame closes the argument. The efficiency gain from a route a few kilometers shorter is small next to the cost of a driver blowing past their workday and becoming a labor liability, or a broken exclusivity contract that costs the entire relationship with a partner. Mathematical optimization is only worth it within the real world's constraint; outside it, the gain on paper becomes a loss in practice.
Do it now
Take a real routing, allocation, or distribution decision you make often, your real task or another one.
- Before requesting any optimization from AI, write down in writing the real constraints the plan needs to respect: workday, time window, weight and volume capacity, contract, safety rule, whatever applies to your case.
- Ask AI for the optimization, giving the criterion you want to minimize or maximize, but WITHOUT yet mentioning the constraint list, just to see what it returns off the bat.
- Check AI's plan against each item on your list, one by one. Mark which constraints the plan violated.
- Redo the request explicitly including the constraints that were missing, and compare the two plans. The second one is usually a bit less "efficient" on paper, and infinitely more possible in practice.
Practice
1. In AI powered routing or allocation optimization, what stays yours and AI doesn't do on its own?
2. Why can an 'optimal' route or allocation delivered by AI be operationally impossible?
For the board
On the blind spotfor the AI, a constraint nobody mentioned simply does not exist.
On what is yourslisting the real constraints before running it. The AI optimises the combinatorics, it does not discover reality.
On the impossible optimumthe machine answers the question you asked. A plan that violates a constraint comes out with the same air of certainty as a correct one.
Thanks for the feedback. It helps sharpen the next lesson.