Differentiable Electricity-Market Clearing for Gradient-Based Planning

Luca Mungo, Maarten P. Scholl, Arnau Quera-Bofarull
9/2/2026
cs.LGcs.CY

No confident code implementation found for this paper.

Abstract

Planning a large data center is difficult because a facility big enough to matter changes the electricity prices it will pay. Those prices are set by market clearing, a constrained optimization problem solved anew in every operating condition. However, simulating the market tells a planner how a candidate plan performs but not how to improve it. Here we treat market clearing as a differentiable optimization layer: each forward pass solves the market, and reverse-mode automatic differentiation propagates the planning cost back through the cleared prices to the plan. After validating these gradients against finite differences, we apply them to a concrete problem: allocating 50 MW of data-center load across six candidate buses in two synthetic networks, under a fixed cost per active site, evaluated over 36 operating states. Judged against exhaustive enumeration of all site combinations, gradient optimization recovers the continuous allocations almost exactly, with worst-case objective gaps of 2.3\% and 8.5\% of the cost difference between the best and worst single site. Its one systematic error is instructive: near the costs at which a site should close, the smooth relaxation of the discrete site count shrinks the site rather than closing it, so discrete transitions arrive late. Differentiable market clearing thus turns market-aware planning into a problem gradients can search.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{mungo2026differentiable,
  title  = {Differentiable Electricity-Market Clearing for Gradient-Based Planning},
  author = {Luca Mungo and Maarten P. Scholl and Arnau Quera-Bofarull},
  year   = {2026},
  eprint = {2609.02646},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.02646v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.02646.svg)](https://codeofpaper.com/paper/2609.02646)

Discussion