
I let an optimizer loose on my neighbourhood model and it became an energy trader
When I let an optimisation model with perfect knowledge of the whole year loose on my neighbourhood, with net metering on, it stopped designing a neighbourhood and started trading: import cheap, export expensive, let the battery dance on it. Sizing the installation became irrelevant. The same net metering that earlier only distorted the business case now dominated the entire outcome.
An optimizer with a crystal ball
Image above: AI impression, not a construction drawing.
Beside the ordinary simulation, which asks hour by hour "what happens?", I built a second engine that asks a different question: "what is optimal?" It is an optimisation model that picks the cheapest installation with perfect knowledge of the whole year. Give it a crystal ball, and it knows every hour in advance what the sun does, what the demand is, what the price is.
That sounds like the ideal tool to size a neighbourhood. And it is, until I flipped one switch I thought was harmless: net metering. The scheme where the power you feed back is offset one to one against what you draw. I turned it on, expected a slightly rosier picture, and got something else entirely.
It stopped building and started trading
With net metering on and a crystal ball, the model stopped designing a self-sufficient neighbourhood. It became a trader.
It saw it coming: import cheap now, export expensive later, and pocket the difference. The neighbourhood battery was no longer a buffer for its own solar, but an arbitrage instrument dancing on the price gap. Charge when the grid is cheap, discharge when it is expensive, repeat. The whole question the lab is about, how big does the installation need to be to supply the neighbourhood, became a side issue. Why bother? There is money to be made on the grid.
The model did nothing wrong. It did exactly what I asked: find the cheapest outcome. I just had not realised that with that one switch I had changed the question itself.
An assumption is never small on its own
Here is the lesson, and it is the most important the lab has taught me so far. I had that same net metering switched on in an earlier phase too. There it only distorted the battery business case, some annoying noise, nothing more. I had written it off as a small assumption.
But an assumption is never small on its own. It is small or large relative to the question you ask. At "what does this battery cost?", net metering was noise. At "what is the cheapest installation with perfect foresight?", that exact same net metering became the boss of the entire outcome. Same switch, different question, completely different effect.
That is why net metering is switched off on principle in this optimisation screen. Not because it cheats, but because it disappears in 2027 anyway, and because I want to size the neighbourhood, not beat the energy market.
What the model hands back for free
There is another reason I built this second model, and it is more useful than the trader story. An ordinary calculation gives you a number. An optimisation model gives you, for free, the price of every limit it runs into.
The question "what does one percentage point more self-sufficiency cost, here, for this neighbourhood?" is exactly where cooperatives and investors get stuck. The optimisation model answers it precisely, in euros. That figure, the price of the next percentage point, suddenly makes a subsidy or investment conversation concrete.
What this leans on: perfect foresight does not exist. The model looks ahead across the whole year with a crystal ball, so the outcome is an upper bound, the very best that smarter control could ever deliver. A real controller never quite reaches it. But the distance between "what happens?" and "what is optimal?" is itself the insight: that gap is exactly the value of looking ahead, and nobody else makes it visible.