Experiments 13

Compute Crunch

Four puzzles on AI infrastructure planning, each paired with a linear, mixed-integer, or stochastic solver in OR-Tools: route global demand, wire Loudoun County substations under DC power flow, schedule multi-year construction, and order turbines before demand is known.

Python · OR-Tools · FastAPI · Linear programmingView source 

Cheapest isn’t best1/2

Loading the world…

Notes on how it works

Notes

Act 1: Global routing

A linear program solved with GLOP in Google’s OR-Tools assigns megawatts from data centers to cities subject to site capacity, route latency (great-circle distance × 1.4 at 2/3 c), and an optional carbon cap. Unserved city demand costs $1,400/MWh; deferred training costs $500/MWh. Dual values measure the marginal savings from adding 1 MW at a site or 1 tonne under the carbon cap. Chapter 3 adds discrete 25 MW capacity blocks solved with SCIP.

minimize
  • Σ price · x + 1400 · unserved + 500 · unserved training
subject to
  • Σ x into each city + unserved = demand
  • Σ x out of each site ≤ capacity
  • Σ carbon · x ≤ cap chapter 2
  • x ≥ 0, only on routes within the latency limit

Act 2: Loudoun County grid

Two 500 kV hubs and seven substations simplified from OpenStreetMap’s Loudoun County transmission network, modeled with DC power flow where line reactance is proportional to length. SCIP solves the mixed-integer decisions (campus placement, new lines, and optimal transmission switching via big-M constraints) and GLOP solves the resulting power flow. Chapter 2 demonstrates Braess’s paradox, where adding a line overloads a parallel path and opening a breaker increases deliverable power.

minimize
  • Σ price · supply + 1400 · dark + Σ land · campus + Σ cost · new line
subject to
  • supply − load + dark = flow out − flow in, at every bus
  • flow = (θa − θb) / km, on every line in service
  • −limit ≤ flow ≤ limit
  • each campus on exactly one substation chapter 1
  • each line in or out of service, at most one new chapter 2

Act 3: Multi-year schedule

A single mixed-integer program plans 2027–2030 on the Act 2 grid. One crew can start one upgrade per year, and capacity comes online only after each project’s lead time. Turbine rentals and breaker states are chosen annually to minimize average hourly cost across the four-year window.

Act 4: Two-stage stochastic planning

First-stage turbine orders are placed before customer signings are known; second-stage rush orders adjust once a scenario is realized. Chapter 1 computes the value of the stochastic solution (VSS) over planning for average demand, Chapter 2 minimizes worst-case cost via robust optimization, and Chapter 3 computes the expected value of perfect information (EVPI).

Sources

  • Dietrich Braess, “Über ein Paradoxon aus der Verkehrsplanung,” Unternehmensforschung 12 (1968): 258–268.
  • Dirk Witthaut and Marc Timme, “Braess’s paradox in oscillator networks, desynchronization and power outage,” New Journal of Physics 14 (2012): 083036.
  • Emily B. Fisher, Richard P. O’Neill, and Michael C. Ferris, “Optimal transmission switching,” IEEE Transactions on Power Systems 23, no. 3 (2008): 1346–1355.
  • John R. Birge and François Louveaux, Introduction to Stochastic Programming, 2nd ed. (Springer, 2011).
  • Aharon Ben-Tal, Laurent El Ghaoui, and Arkadi Nemirovski, Robust Optimization (Princeton University Press, 2009).
  • Map data © OpenStreetMap contributors, available under the ODbL.