Skip to content

Python optimisation development

Optimisation code often works only as long as its author stays. We write Python models your own team can read, test and extend.

  • Free 30-minute call
  • No commitment
  • You own the code
Tools
Gurobi, OR-Tools, HiGHS, Pyomo, CVXPY, PuLP, CP-SAT, Python
Used in
Projects across all five problem families
Delivery
Documented source code, yours to keep

In short: Python optimisation development means building planning models in Python with libraries such as Pyomo, OR-Tools or PuLP. The model computes the best plan, and the code stays readable for the company’s own team.

The problem

The model runs every night, and you trust it. The engineer who wrote it left last year. Nobody else understands the code, so nobody changes it, even when the business rules do. Every workaround now lives in a spreadsheet next to the model.

What changes

Today, one person holds the model in their head. With our solution, your team holds it in readable, tested code. When a rule changes, your own engineer updates the model, runs the tests and sees that nothing else broke. When the project ends, your team keeps the model and can run and extend it.

How it works

Python is now the everyday language of operations research (OR), the maths of planning. We work with Python’s optimisation libraries, ready-made building blocks of code: Pyomo, OR-Tools, CVXPY and PuLP. We also run the solvers Gurobi and HiGHS straight from Python.

Pyomo, PuLP, OR-Tools or CVXPY?

Newcomers ask this on Operations Research Stack Exchange in many forms, and the answer follows from your problem. PuLP is a small library for linear and mixed-integer models, the ones with yes-or-no decisions. Note that recent PuLP no longer bundles the free CBC solver, so you install one yourself. Pyomo also handles non-linear models, where costs don’t grow in proportion. One practitioner on the same forum finds it slower at building large models. CVXPY only takes convex problems. In those, every small improvement also leads towards the best plan. On anything else, CVXPY stops with an error.

OR-Tools brings CP-SAT for scheduling and a routing library. HiGHS is free under the MIT licence, which matters if you ship the code inside your product. We pick the library that keeps your model readable and lets you swap the solver later.

The code is readable and covered by tests, small checks that run after every change. One test feeds in a tiny case with a known best plan. Others check that every plan keeps every rule. The code is written so the next engineer understands the formulation, meaning how the problem is set out as maths. The honest boundary: for small problems and teams that work in spreadsheets, an Excel model may serve you better. We’ll say so.

When it isn’t the answer

The honest boundary: for small problems and teams that work in spreadsheets, an Excel model may serve you better. We’ll say so.

Common questions.

Something else? Ask us directly.

Yes, if the model is written for it. With Pyomo or PuLP, changing the solver is mostly one line. Code written straight in gurobipy, Gurobi’s own Python package, is tied to Gurobi. You still have a way out: nearly every solver reads the MPS file format, as an answer on Operations Research Stack Exchange points out. So you can save the model as an MPS file and open it in another solver.

For most models, yes. Python only builds the model, and the solver does the heavy maths in compiled code. Building can become the bottleneck for very large models, and some libraries are slower at it than others. For a custom search that runs millions of moves, we write the part that runs most often in a faster language. The rest stays in Python.

Not necessarily. HiGHS is free under the MIT licence, and OR-Tools brings CP-SAT at no cost. Commercial solvers earn their price when your tests show they finish in time and the free ones don’t. We run that test on your data before you sign anything.

Sometimes they can, and then we’ll say so. Standard tools are built for an average problem, though. With Python optimisation development, we start from yours: its size, its rules and the exceptions nobody wrote down. That is why the plan fits your operation better.

You don’t need either to start. We build the model from the data you’ve got, messy or not, and cleaning it up is part of the job. You get a documented system your team can maintain, and we train them until they can run it long after we’ve left.

It starts with a free 30-minute call about your operation and the model that would fit it. Then we build a working prototype and run it on your numbers. You’ll see results before you commit to anything bigger.

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