Optimiser not delivering results
Your optimisation model runs for hours, or its plans go unused. We fix how it’s written, usually on the software you already own.
- Free 30-minute call
- No commitment
- You own the code
In short: An optimiser that doesn’t deliver is a model that runs for hours or returns plans the team can’t use. The usual cause is the formulation, how the problem is written as maths. The fix is rewriting the model, often on the existing solver.
What the problem looks like.
Your optimisation model runs for hours when you need minutes, or returns plans your team can’t use. The blame usually lands on the software. The cause is almost always the formulation, meaning how the model is written.
A model you work around
The model looked good on test data. On your own data it runs past the planning deadline, so you start without it. Other days it finishes, with a plan that’s worse than one you’d build by hand. Some nights it reports “infeasible”, meaning no plan can keep every rule, and nobody knows which rule clashes. So the spreadsheet comes back, next to software you still pay for.
Three ways an optimisation model fails
Runtime failure: the model runs for hours when the operation needs minutes. A faster computer rarely fixes it, because the model lets the solver chase options that could never win, or check plans that are really the same.
Solution-quality failure: the model returns feasible plans, meaning plans that keep every rule, and they’re still worse than yours. The objective function, the score the model tries to improve, misses what your operation values. Say it counts kilometres and ignores overtime.
Infeasibility failure: on your own data the model says “infeasible”, and nobody can say why. Some rules are stricter than the ones you actually follow, others are coded wrongly or contradict each other. Until you find the clash, you can’t plan.
What each problem costs you
- Runtime failure: the model runs for hours when you need minutes.
The plan comes too late. By the time it’s ready, new orders have come in and it no longer fits the day.
- Solution-quality failure: feasible plans that are worse than your own.
You pay for optimisation and still earn less than you could.
- Infeasibility failure: the model says “infeasible” on your own data, and nobody knows why.
Planning stops, and you fall back to spreadsheets at short notice.
What changes with a proper fix
Today, the overnight run is still going when the morning shift starts, so you build the plan by hand again. With our fix, the model finishes in the time you have for planning, on the solver you already own. You open a plan you’d sign, check it and release it.
The objective now counts the costs you actually pay, so the plans make sense to the people using them. How much time you gain depends on your model, and our first review, the diagnostic, tells you what’s realistic.
Read the solver log before you change anything
Most of these models are MIPs, mixed-integer programs with yes-or-no decisions in them. While a MIP solver works, it prints two numbers. One is the cost of the best plan found so far. The other is the bound, a value no plan can beat. Gurobi’s support staff give the same first advice we do: find out which of the two is stuck.
If the bound barely moves for an hour, the formulation is weak, and better hardware won’t change that. If the bound is fine but good plans arrive late, the search needs help, such as yesterday’s plan as a start. Also run the model with a few random seeds. A seed is a starting number that slightly changes the path the solver takes. Runs that are otherwise identical can differ widely in time. Gurobi advises comparing several runs before you judge any change.
When the model says infeasible
Don’t hunt for the clash by deleting rules one at a time. Gurobi can compute an IIS, short for irreducible inconsistent subsystem. That’s a set of rules that can’t all hold, where dropping any one of them makes the rest work. CPLEX calls its version the conflict refiner. Both shrink thousands of rules to a handful.
The documentation adds two caveats. A model can hold several such conflicts, and the one reported isn’t always the smallest. So you fix one, run again and repeat. We build this check into the model, so you see in plain words which rule blocks the plan.
What we change in the formulation
A solver judges each option against an estimate of the best plan still possible. It gets that estimate from a simplified copy of your model that allows fractions, such as half a truck. In optimisation, it’s called the LP relaxation, LP for linear programming. We rewrite the model so the estimate gets tighter, and the solver drops bad options early.
Big-M terms often weaken that estimate. They switch a rule on or off with a very large number, the “M”. We replace them with indicator constraints, which say directly that a rule applies only in some cases. Symmetry means that many plans are really the same, for example when two identical trucks swap routes. We remove it with extra rules like “use truck A before truck B”. And we rewrite the objective around your costs.
How a project runs.
Each of the three phases ends with something you can check before we go any further.
-
Understand
We start with your operation. What do you plan, where does it go wrong, and what would a better week look like? Then we tell you straight whether optimisation can help, and sometimes the answer is no.
- A written assessment
- A clear go or no-go
-
Model
We write your decisions, goals and rules into a mathematical model, which is just a precise description of how your operation works. Then we run it on your own data. You see side by side what each plan costs and what it delivers, and pick the one that fits your priorities.
- A documented model
- Results on your own data
-
Implement
We test with your data and go through the results with your team. Once they trust it, we connect the model to your systems, so it runs every day without anyone stepping in by hand.
- Source code and documentation
- Training for your team
What people ask first.
Something else? Ask us directly.
Look at which number stalls in the log. The MIP gap is the distance between two numbers: the best plan found so far, called the incumbent, and the best bound, a value no plan can beat. If the best bound hardly moves, the formulation is usually the problem. The LP relaxation is weak, so the solver can’t drop bad options early. If the bound moves but the incumbent improves only late, the search needs help. One way is a warm start: you give the solver yesterday’s plan to start from. Gurobi’s support staff recommend making this split before you touch any parameters.
Ask the solver for a conflict. Gurobi computes an IIS, a set of rules that can’t all hold, where removing any one makes the set feasible. CPLEX offers the conflict refiner. A model can hold several conflicts, so fix one, run again and repeat. Then ask whether each rule in the conflict matches how your operation works in practice.
Small changes can send the solver down a different search path: other data, another order of the rules, or another random seed. A seed is a starting number for the search. In optimisation, this is called performance variability. Gurobi advises running several seeds before you decide that a change helped or hurt. If solve times swing a lot, the formulation is often the cause. That’s where we’d start.
Sometimes, a little. Gurobi’s staff suggest starting from the default settings and changing parameters only when the log shows why. Parameters change how the solver searches. They can’t turn a weak formulation into a strong one. In our view, an afternoon spent on the formulation usually beats a week of tuning.
Almost never. When a model takes hours instead of minutes, the formulation is usually the cause. Usually one of three things is wrong. The model’s estimate of the best possible plan is too rough, which is called a weak LP relaxation. The model checks many plans that are really the same, which is called symmetry. Or it switches rules on and off with very large numbers, the big-M terms. The solver gets the blame for all three.
We start with a diagnostic. We check the constraints, which are the rules your model enforces. And we analyse its LP relaxation, the simplified copy of your model that gives the solver its estimate. We look for symmetry and for valid inequalities, extra rules that tighten the estimate without removing any workable plan. We also check whether Benders decomposition would help: it splits one big problem into a main decision and smaller sub-problems. Most models can be saved with targeted fixes. A full rebuild is the exception.
Usually not. We’re solver-agnostic, meaning we favour no particular solver. We work with Gurobi, CPLEX, HiGHS, OR-Tools or CP-SAT. We pick the tool that fits the structure of your problem. Often that’s the solver you already pay for.
Similar pages.
Terms on this page
Every abbreviation explained in plain words, in our article “Metrics and methods”.
- LPLinear programming
- MILPMixed-integer linear programming
- LP relaxation
- Optimality gap (MIP gap)
- CP-SATCP-SAT solver
- IISIrreducible inconsistent subsystem
- Gurobi
- CPLEXIBM CPLEX
- HiGHSHiGHS
- OR-ToolsGoogle OR-Tools
Tell us what you’re planning.
In a free 30-minute call with a specialist, you find out whether optimisation can help.
- Free, no commitment
- You talk to a specialist directly
- A clear go or no-go