Method explained

MILP optimisation for energy systems: what it is and why it matters

Mixed-Integer Linear Programming (MILP) is the mathematical method used to optimise multi-energy system design. This page explains what MILP is, why it is used for energy planning, and how it compares to other approaches.

Definition

What is Mixed-Integer Linear Programming?

Mixed-Integer Linear Programming (MILP) is a mathematical optimisation method used in engineering, logistics, and operations research. It finds the best solution to a problem that involves both continuous decisions — how much capacity to install, how much energy to dispatch each hour — and binary decisions — whether to install a particular technology at all.

It does this by solving a system of linear equations and inequalities subject to constraints, with some variables restricted to integer values.

MILP has been used in industrial engineering for decades. It underpins production scheduling, supply chain optimisation, and network routing problems. In energy systems, it has become the standard method for technology selection and dispatch optimisation because energy planning involves precisely the mix of continuous and binary decisions that MILP handles well.

Two types of decision in one model

Binary decisions

Install a heat pump at this site — yes or no? Install battery storage — yes or no? These are not continuous variables; they are on/off choices that determine which technologies are present in the final system.

Continuous decisions

How large should the heat pump be (kW)? How much energy should it dispatch each hour (MWh)? These are real-valued quantities that the model optimises across a full reference year at hourly resolution.

Why it fits

Why MILP is the right method for energy system design

Designing an energy system for a district or campus requires deciding which technologies to install, how much of each to install, and how to operate them hour by hour across a reference year. The first decision is binary; the second and third are continuous. MILP handles all three simultaneously.

This matters because technology interactions — sector coupling — mean that these decisions cannot be made correctly in sequence. The right heat pump size depends on the solar PV capacity, which depends on the battery size, which depends on the grid tariff structure, which depends on the heat pump schedule. A MILP model holds all of these relationships inside a single optimisation run.

The model finds the configuration that satisfies all constraints — energy balance, capacity limits, grid constraints — while minimising the objective: cost, CO₂, or a Pareto combination of both. This is what makes it the natural engine for multi-energy hub modelling at district scale.

MILP is not AI

MILP is a deterministic mathematical method from operations research. It does not learn from data, does not use neural networks, and does not produce probabilistic outputs. The same inputs always produce the same outputs, and every result is traceable to its underlying equations. This auditability is important for engineering applications where results need to be explained to clients, regulators, or procurement bodies.

MILP is not simulation

Simulation tools evaluate a defined system and show how it performs. MILP optimisation searches across a space of possible systems to find the one that best meets your targets. For feasibility and planning work — where the goal is to identify the right system, not just evaluate a pre-specified one — optimisation is the appropriate method.

MILP versus heuristic search

Heuristic methods (genetic algorithms, simulated annealing) explore large solution spaces but cannot guarantee optimality. MILP, under appropriate conditions, finds the provably optimal solution and provides a bound on how far any solution is from optimal. For infrastructure decisions involving long-lived capital, that guarantee matters.

MILP versus spreadsheet modelling

Spreadsheet models can only evaluate the combinations the engineer explicitly constructs. MILP searches the full design space automatically, including combinations that would not occur to a practitioner building scenarios manually. This is how it finds configurations that manual analysis misses.

Computational challenge

Scale, solve times, and published solutions

For realistic district energy problems — multiple buildings, multiple energy carriers, hourly resolution over a full year — MILP models can be large. A district-scale problem with 20 buildings, 15 technology candidates, and 8,760 hourly time steps involves hundreds of thousands of variables and constraints.

Published research from the ETH Domain has addressed this with multi-scale decomposition and rolling-horizon methods that reduce computation time by 10–100x compared to brute-force single-period models (Marquant et al., Applied Energy, 2017). Grid-aware formulations have also been validated: including electrical grid constraints in the MILP model was shown to enable 40% more renewable integration and reduce operational emissions by 18% compared to grid-naive approaches (Morvaj et al., Applied Energy, 2016).

These methods make it practical to run detailed district-scale optimisation within normal project timelines — not as a research exercise, but as a routine part of a feasibility study or energy master plan. For the broader planning context in which these runs sit, see the page on district energy planning software .

In practice

Sympheny uses MILP as the core of its optimisation engine

Sympheny uses MILP implemented with the Gurobi solver — one of the leading commercial MILP solvers used in industrial engineering and academic research worldwide. Each project run evaluates 50,000+ technology and capacity combinations.

Results are fully deterministic and auditable: every optimised scenario can be traced back to its input constraints. There is no AI in the calculation loop. The same inputs always produce the same outputs, and every recommendation can be explained in terms of the underlying equations.

Sympheny's V3 platform includes Sense — a proprietary energy hub solver built on top of Gurobi that delivers faster execution, more flexible hub topologies, and richer constraint handling than the previous solver generation.

The engine is a commercial application of methods developed over ten years of research at Empa and the ETH Domain, including the multi-scale methods described in peer-reviewed journals. For more detail on the research lineage, see the research-backed optimisation page .

Common questions

Frequently asked questions

What is MILP and why is it used for energy system optimisation?

Mixed-Integer Linear Programming (MILP) is a mathematical optimisation method that handles problems combining binary decisions (install or don't install a technology) with continuous decisions (how much capacity, how much to dispatch each hour). Energy system design involves both types of decision simultaneously, making MILP well-suited to the problem.

Is MILP the same as AI or machine learning?

No. MILP is a deterministic mathematical method from operations research. It does not learn from data, does not use neural networks, and does not produce probabilistic outputs. The same inputs always produce the same outputs, and every result is traceable to its underlying equations. This distinguishes it from AI-based approaches and makes it particularly appropriate for engineering applications where auditability matters.

What are the limitations of MILP for energy planning?

For large problems — many buildings, many technologies, full hourly resolution over a year — MILP models can be computationally expensive. Research has addressed this through multi-scale decomposition and rolling-horizon methods that reduce solve times significantly. Sympheny's engine incorporates these techniques to make detailed district-scale optimisation practical within normal project timelines.

How does MILP compare to simulation-based energy tools?

Simulation tools evaluate a defined system and show how it performs. MILP optimisation tools search across a space of possible systems to find the one that best meets your targets. For feasibility and planning work — where the goal is to identify the right system, not just evaluate a pre-specified one — MILP-based optimisation is the more appropriate method.

What solver does Sympheny use for MILP?

Sympheny uses Gurobi, one of the leading commercial MILP solvers used in industrial engineering and academic research. Sympheny's V3 platform includes Sense, a proprietary energy hub solver built on top of Gurobi that delivers faster execution, more flexible hub topologies, and richer constraint handling than the previous solver generation.

See it working

See Sympheny's MILP engine on a project like yours

Book a 30-minute demo. We'll run the optimiser on a project setup like yours so you can see the design space search, the Pareto front, and the auditable outputs.