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
global_constraint: add operational limit constraint #618
Conversation
Can you explain a little more about how it works? I don't yet understand why it is better than a Store. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #618 +/- ##
=======================================
Coverage 76.64% 76.65%
=======================================
Files 24 24
Lines 6290 6330 +40
Branches 1331 1338 +7
=======================================
+ Hits 4821 4852 +31
- Misses 1188 1194 +6
- Partials 281 284 +3
☔ View full report in Codecov by Sentry. |
The reason is that modelling stores is quite extensive. You have intertemporal constraints with auxiliary variables (soc, charge, discharge). If you limit the total energy output of one single generator (or a generator carrier fleet) instead of setting up a store with an initial soc which depletes over time, you save a lot of complexity. So (reducing to generators) the constraint is just saying where |
Ah, I see that makes sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Nicely tested, so it was easy to review.
At some point, we need to update the documentation of the GlobalConstraint component: https://pypsa.readthedocs.io/en/latest/components.html#global-constraints |
I don't see any place that caters for selecting investment_periods. Will this still need to be introduced as a parameter? |
Analogous to
primary_energy_limit
but directly working on carrier output. This will help to replace some stores in pypsa-eur (sector-coupled) by light-weight constrained generators.Checklist
doc
.environment.yaml
,environment_docs.yaml
andsetup.py
(if applicable).doc/release_notes.rst
of the upcoming release is included.