Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable EQ constraint on locations #1163

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/configtables/solving.csv
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ agg_p_nom_limits,,,Configure per carrier generator nominal capacity constraints
-- file,file,path,Reference to ``.csv`` file specifying per carrier generator nominal capacity constraints for individual countries and planning horizons. Defaults to ``data/agg_p_nom_minmax.csv``.
constraints ,,,
-- CCL,bool,"{'true','false'}",Add minimum and maximum levels of generator nominal capacity per carrier for individual countries. These can be specified in the file linked at ``electricity: agg_p_nom_limits`` in the configuration. File defaults to ``data/agg_p_nom_minmax.csv``.
-- EQ,bool/string,"{'false',`n(c| )``; i.e. ``0.5``-``0.7c``}",Require each country or node to on average produce a minimal share of its total consumption itself. Example: ``EQ0.5c`` demands each country to produce on average at least 50% of its consumption; ``EQ0.5`` demands each node to produce on average at least 50% of its consumption.
-- EQ,bool/string,"{'false',`n(c|l| )``; i.e. ``0.5``-``0.7c``-``0.2l``}",Require each country or node to on average produce a minimal share of its total consumption itself. Example: ``EQ0.5c`` demands each country to produce on average at least 50% of its consumption; ``EQ0.5`` demands each node to produce on average at least 50% of its consumption; ``EQ0.2l`` demands each location to produce on average at least 20% of its consumption (particularly useful for sector coupeled models).
-- BAU,bool,"{'true','false'}",Add a per-``carrier`` minimal overall capacity; i.e. at least ``40GW`` of ``OCGT`` in Europe; configured in ``electricity: BAU_mincapacities``
-- SAFE,bool,"{'true','false'}",Add a capacity reserve margin of a certain fraction above the peak demand to which renewable generators and storage do *not* contribute. Ignores network.
solver,,,
Expand Down
2 changes: 2 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Upcoming Release

* Bugfix: Correctly read in threshold capacity below which to remove components from previous planning horizons in :mod:`add_brownfield`.

* Enable EQ-constraint on locations, which allows it to be executed for the sector-coupeled model with a more richer technology-mix than solar rooftop

PyPSA-Eur 0.11.0 (25th May 2024)
=====================================

Expand Down
4 changes: 4 additions & 0 deletions scripts/solve_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,10 @@ def add_EQ_constraints(n, o, scaling=1e-1):
ggrouper = n.generators.bus.map(n.buses.country)
lgrouper = n.loads.bus.map(n.buses.country)
sgrouper = n.storage_units.bus.map(n.buses.country)
elif o[-1] == "l":
ggrouper = n.generators.bus.map(n.buses.location)
lgrouper = n.loads.bus.map(n.buses.location)
sgrouper = n.storage_units.bus.map(n.buses.location)
else:
ggrouper = n.generators.bus
lgrouper = n.loads.bus
Expand Down
Loading