ANLAnalytics & AIStop 6 of 6
AI + optimization
Why prediction and optimization are stronger together, and how agents connect them into a decision process.
Read atChange any time
AI and optimization solve two different halves of a supply chain decision.
AI and machine learning predict and understand. “Next week’s demand will be about 120,000 units, probably between 110,000 and 135,000.” “This supplier is likely to deliver late.” “This contract has a price-escalation clause.”
Optimization decides under constraints. Given that demand, which plants should make how much, which warehouses should receive it, and which trucks should move it, at the lowest cost while meeting 95% service, staying within capacity and respecting minimum batches?
Each one alone falls short:
- A forecast with no optimization leaves people to work out the plan by hand, often badly.
- An optimization fed a single wrong number produces an excellent plan for the wrong future.
Together they make a decision pipeline: predict → optimize → act. Better still, the optimization uses the range of predictions, not just the middle number, so the plan holds up if demand comes in at 135,000 rather than 120,000. That’s optimization under uncertainty, using scenarios or probabilistic forecasts.
Agents add a third layer: they notice the trigger (“demand jumped 15%”), gather the data, call the forecasting and optimization tools, explain the recommendation in plain language, and route it for approval.
A compact way to remember it: AI predicts and understands, optimization decides within constraints, agents orchestrate and explain, and people approve what matters.
Words to use
- Predict-then-optimize
- Using model predictions as inputs to an optimization that chooses the decision.
- Prescriptive analytics
- Analytics that recommends what to do, not just what will happen.
- Optimization under uncertainty
- Choosing plans that perform well across a range of possible inputs.
Point forecast or range?
Demand scenarios: 110,000 units (25% likely), 120,000 (50%) and 135,000 (25%). Each unit sold earns ₹40. Each unit left over costs ₹15 (holding and markdowns). Each unit short costs the lost ₹40 plus a ₹10 penalty.
Expected profit for three production plans:
| Produce | Expected profit |
|---|---|
| 110,000 | ₹42.9 lakh |
| 120,000 (the point forecast) | ₹46.25 lakh |
| 135,000 | ₹46.44 lakh |
Planning on the point forecast of 120,000 is not the best choice. Because a shortage costs more than a leftover, the best plan leans towards the high scenario. In newsvendor terms the critical ratio is (40 + 10) / (40 + 10 + 15) ≈ 0.77, well above the median.
The difference here is modest, but it grows with the asymmetry of costs and the width of the range, and in network or capacity decisions it can decide whether a plan survives a bad month.
The predict-optimize-act pipeline
- Predict: forecasts with ranges (quantiles or scenarios), lead-time distributions, supplier risks.
- Optimize: a model that uses those ranges, through scenarios (stochastic programming), protection against bad cases (robust optimization), or simple quantile rules where they fit.
- Act: release orders and plans, with explanations: which constraints bind, what extra capacity would be worth (shadow prices), and how sensitive the plan is.
- Learn: compare outcomes with predictions and plans, and update both models.
Train predictions for the decision
Standard practice trains forecasts to minimize prediction error, then feeds them to an optimizer. But the decision cares only about errors that change the decision. Smart “predict, then optimize” (Elmachtoub and Grigas, 2022) trains the prediction model to minimize the cost of the resulting decisions instead, which can give better decisions even when the forecasts look slightly less accurate by conventional measures.
Prescriptive analytics
Bertsimas and Kallus (2020) showed how to go from data and machine learning directly to decisions: use methods such as nearest neighbours or tree ensembles to find past situations similar to today’s, and optimize against the outcomes observed in those situations. This uses rich data (weather, promotions, events) without having to forecast every quantity separately.
Machine learning inside solvers
Learning also helps optimization itself: predicting good starting solutions, choosing which variables to branch on, tuning solver settings, or learning fast heuristics for problems solved repeatedly, such as daily routing. The optimizer still guarantees feasibility; learning makes it faster.
Language models and optimization
Language models can help translate a planner’s description into a draft optimization model, explain results in plain language, and answer “why” questions about a plan using its shadow prices and binding constraints. Formulations they produce still need expert checking: a constraint in the wrong direction gives a confident, wrong plan.
Earning planners’ trust
- Explain: show binding constraints, trade-offs and what changes the answer.
- Compare: run the new approach alongside the current method and show results over time.
- Allow overrides, recorded with reasons, and learn from them.
- Start where the value is clear and the decision repeats often, then expand.
Interview kit
Practise it out loud
Answer each question yourself before opening the model answer.
AI and optimization are complementary. AI predicts and interprets, like demand, delays, risks and contract terms; optimization chooses the best feasible decision under constraints like capacity, cost and service. I’d connect them predict-then-optimize, ideally feeding the forecast’s uncertainty into the optimization so plans stay robust, with agents orchestrating triggers, data gathering and explanation, and humans approving high-impact decisions.
Will AI replace optimization in supply chains?
No, they do different jobs. AI is strong at prediction, pattern recognition and understanding unstructured information; optimization is built to find the best feasible decision under hard constraints, with guarantees. The strongest systems use AI to produce inputs and orchestrate, and optimization to decide.
Why feed a forecast range rather than a single number into optimization?
Because a plan optimized for one number can fail when reality differs. Using scenarios or quantiles lets the optimization choose plans that hold up across likely outcomes, for example keeping some flexible capacity, at a small cost in the base case.
Connected stops
Where this idea feeds in, or gets its inputs from.
Sources and further reading
- Bertsimas, D. & Kallus, N. (2020). From predictive to prescriptive analytics. Management Science, 66(3), 1025–1044.
- Elmachtoub, A. N. & Grigas, P. (2022). Smart "predict, then optimize". Management Science, 68(1), 9–26.