Skip to content

Disable power grid expansion if line volume limit already hit#840

Merged
fneum merged 3 commits intomasterfrom
disable-lvlimit-if-hit
Jan 3, 2024
Merged

Disable power grid expansion if line volume limit already hit#840
fneum merged 3 commits intomasterfrom
disable-lvlimit-if-hit

Conversation

@fneum
Copy link
Copy Markdown
Member

@fneum fneum commented Jan 3, 2024

No description provided.

nworbmot and others added 3 commits January 3, 2024 13:33
@fneum fneum merged commit c237862 into master Jan 3, 2024
@fneum fneum deleted the disable-lvlimit-if-hit branch January 3, 2024 12:50
thogin added a commit to thogin/pypsa-eur that referenced this pull request Mar 6, 2026
…ibility

When brownfield carries forward s_nom_opt from a previous horizon as
s_nom_min, solver floating-point tolerance can make s_nom_min exceed
s_nom_max by a tiny amount (e.g., 0.00013 MW on a 33,585 MW line).
This creates an infeasible constraint that crashes the solver.

Extends the fix from PRs PyPSA#840 and PyPSA#952 (which handle global transmission
constraints) to also cover per-line s_nom_max and DC link p_nom_max.
lkstrp added a commit that referenced this pull request Mar 25, 2026
…ibility (#2115)

* fix: clamp s/p_nom_max in brownfield to prevent floating-point infeasibility

When brownfield carries forward s_nom_opt from a previous horizon as
s_nom_min, solver floating-point tolerance can make s_nom_min exceed
s_nom_max by a tiny amount (e.g., 0.00013 MW on a 33,585 MW line).
This creates an infeasible constraint that crashes the solver.

Extends the fix from PRs #840 and #952 (which handle global transmission
constraints) to also cover per-line s_nom_max and DC link p_nom_max.

* fix: clip H2/gas retrofit remaining capacity to non-negative

When barrier solutions without crossover produce slightly imprecise
p_nom_opt values, the already-retrofitted H2 pipeline capacity can
marginally exceed the original pipe capacity. This makes
remaining_capacity negative, setting p_nom_max < p_nom_min = 0,
which causes infeasibility at the next planning horizon.

Observed on 115-cluster myopic runs with BarConvTol=1e-4:
  H2 pipeline retrofitted ES2 7 -> FR2 1: p_nom_max = -0.000649 MW
  H2 pipeline retrofitted GB1 3 -> GB1 7: p_nom_max = -0.000169 MW

Apply the same clip(lower=0) pattern used for AC lines and DC links.

---------

Co-authored-by: Fabian Neumann <[email protected]>
Co-authored-by: Lukas Trippe <[email protected]>
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.

2 participants