Skip to content

Commit

Permalink
enable EQ constraint on locations
Browse files Browse the repository at this point in the history
  • Loading branch information
martacki committed Jul 18, 2024
1 parent 3fba8da commit b83c180
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
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

0 comments on commit b83c180

Please sign in to comment.