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

Fix: Storage Investment #33

Merged
merged 21 commits into from
Jul 28, 2022
Merged

Fix: Storage Investment #33

merged 21 commits into from
Jul 28, 2022

Conversation

jnnr
Copy link
Member

@jnnr jnnr commented Jan 24, 2022

Storage investment with existing capacities leads to unexpected results, see rl-institut/oemoflex#42 (comment).

This PR

  • Introduces constraint tests for tabular facades,
  • fixes the described bug by passing the existing capacity to the investment object of the output flow,
  • calculates the maximum additional investment as the potential minus existing capacity/storage capacity.

TODO:

  • Resulting LP file for brown field is wrong again after updating to solph v0.4. The expected files have been checked thouroughly before and should be correct. update: locally, the constraint tests pass now
  • In facades, l. 122: Shouldn't the potential be set even when no costs are given? Or, alternatively, an Exception be raised? Will be set in any case. Done in 59aff4f
  • Check if new understanding of capacity_potential is consistent accross all facades
  • Write some lines to whatsnew.

@jnnr jnnr changed the base branch from master to dev January 24, 2022 16:05
@jnnr jnnr requested a review from henhuy May 23, 2022 15:28
henhuy
henhuy previously approved these changes May 25, 2022
Copy link
Collaborator

@henhuy henhuy left a comment

Choose a reason for hiding this comment

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

Hey @jnnr,
looks good to me.
I refactored _investment function a bit - so that it is not too nested!

@henhuy henhuy dismissed their stale review May 25, 2022 08:03

pytest fails - refactoring seemed to change something. I will check

@jnnr jnnr merged commit 26c1668 into dev Jul 28, 2022
@jnnr jnnr deleted the fix/storage-investment branch July 28, 2022 14:08
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