Skip to content

Fix energy_grid_planning's substation capacity constraint - #108

Draft
chriscoey wants to merge 1 commit into
mainfrom
coey/energy-grid-capacity
Draft

chriscoey wants to merge 1 commit into
mainfrom
coey/energy-grid-capacity

Conversation

@chriscoey

Copy link
Copy Markdown
Member

Stage 5's substation capacity constraint compared the wrong totals, so the Pareto frontier the template prints and its docs quote solved a different problem from the one they describe.

What was wrong: the constraint bound one upgrade's and one request's variable in its where clause, outside its sums over the substation's upgrades and requests. For each substation and investment level it compared (sum of the upgrade variables) × (sum of the upgrade capacities) with (sum of the approval variables) × (sum of the requested MW).

Fix: each upgrade's capacity and each request's MW is weighted by its own variable. Listing InvestmentLevel in the objective's sum makes it say what the solver already computes, one term per request and level; results at 1.27.1 do not change. The README and runbook now match what the script prints.

Results, from a cloud run at the template's pinned relationalai[gnn]==1.27.1. An exhaustive search over every approval and upgrade choice reproduces both columns' approvals, MW and revenue at every budget, under the old constraint and the fixed one. Net value at $500M and $600M depends on which of several same-revenue upgrade sets the solver picks.

Budget Before: DCs, MW, net value After: DCs, MW, net value
$200M 4, 1,000, $164.85M 4, 960, $151.15M
$300M (knee) 5, 1,500, $264.35M 6, 1,530, $252.45M
$400M 6, 1,800, $309.60M 7, 1,900, $312.60M
$500M 7, 2,080, $353.45M 8, 2,180, $356.45M
$600M 8, 2,330, $394.95M 9, 2,430, $397.95M
Objective 1,579,200,000 1,562,600,000

The knee stays at $300M. xAI Colossus was approved from $300M and now never is. With both Dallas-Fort Worth upgrades the substation has 699.8 MW of headroom: xAI with Lambda Labs (700 MW) does not fit, and Google Metroplex with Lambda (600 MW, $108M/yr) earns more than xAI alone (500 MW, $105M/yr).

The capacity constraint bound the upgrade and approval variables in its
where clause, outside its sums over the substation's upgrades and
requests. For each substation and investment level it therefore compared
the sum of the upgrade variables times the sum of the upgrade capacities
with the sum of the approval variables times the sum of the requested MW.
Each upgrade's capacity and each request's MW is now weighted by its own
variable.

Listing InvestmentLevel in the objective's sum makes it say what the
solver already computes, one term per request and level.

The optimum moves from 1,579,200,000 to 1,562,600,000. The knee stays at
$300M, now with 6 data centers, 1,530 MW and $252M net value: Google
Metroplex and Lambda Labs at Dallas-Fort Worth are approved from $300M,
and xAI Colossus at no budget. The README and runbook state the new
results.
@github-actions

Copy link
Copy Markdown

The templates docs preview for this pull request has been deployed to Vercel!

✅ Preview: https://relationalai-docs-k1q1b7rya-relationalai.vercel.app/build/templates
🔍 Inspect: https://vercel.com/relationalai/relationalai-docs/J8TPcfNPozR8Hc6x7S2ermPTMgw8

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant