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

Marginal cost storage #603

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Marginal cost storage #603

wants to merge 3 commits into from

Conversation

fneum
Copy link
Member

@fneum fneum commented Apr 13, 2023

Closes # (if applicable).

Changes proposed in this Pull Request

Adds marginal cost on storage unit and store energy filling level.

TODO

  • native variant
  • pyomo variant
  • include cost in statistics module

Checklist

  • Code changes are sufficiently documented; i.e. new functions contain docstrings and further explanations may be given in doc.
  • Unit tests for new features were added (if applicable).
  • Newly introduced dependencies are added to environment.yaml, environment_docs.yaml and setup.py (if applicable).
  • A note for the release notes doc/release_notes.rst of the upcoming release is included.
  • I consent to the release of this PR's code under the MIT license.

@codecov
Copy link

codecov bot commented Apr 13, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (bc18a48) 76.58% compared to head (a6c781b) 76.58%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #603   +/-   ##
=======================================
  Coverage   76.58%   76.58%           
=======================================
  Files          24       24           
  Lines        6277     6287   +10     
  Branches     1325     1328    +3     
=======================================
+ Hits         4807     4815    +8     
- Misses       1189     1190    +1     
- Partials      281      282    +1     
Impacted Files Coverage Δ
pypsa/optimization/optimize.py 88.50% <100.00%> (+0.36%) ⬆️

... and 5 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

if not n.stores.empty:
e_marginal_cost = n.stores.e_marginal_cost
var = m["Store-e"]
objective.append((var * e_marginal_cost).sum())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just thinking if the marginals costs should be weighted by snapshot weightings?

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.

None yet

2 participants