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

Add storage_costs to GenericStorage #962

Merged
merged 8 commits into from
Aug 11, 2023
Merged

Add storage_costs to GenericStorage #962

merged 8 commits into from
Aug 11, 2023

Conversation

p-snft
Copy link
Member

@p-snft p-snft commented Jul 31, 2023

Implement parameter storage_costs for GenericStorage: storage_costs might exist, e.g. if space can be rented depending on the stored energy. So, this might be seen as an alternative to investment optimisation. A second use case is to incentivise using the storage in the last time step if the storage is not periodic. This can be done by giving storage_costs=n_time_steps * [0] + [-energy_price], so that stored energy in the last time step is valued with the energy price.

@p-snft p-snft self-assigned this Jul 31, 2023
@p-snft p-snft marked this pull request as ready for review August 1, 2023 09:11
@p-snft p-snft requested a review from a team August 1, 2023 09:11
@p-snft p-snft added this to the v0.5.1 milestone Aug 1, 2023
Comment on lines 614 to 616
storage_costs += self.storage_content[n, 0] * n.storage_costs[0]
for t in m.TIMESTEPS:
storage_costs += self.storage_content[n, t+1] * n.storage_costs[t+1]
Copy link
Contributor

Choose a reason for hiding this comment

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

The earlier described behavior probably results somehow from having the cumulated sum of costs over all timsteps. Maybe a note should be added that it might be complicated to directly steer the behavior?!

Copy link
Member Author

Choose a reason for hiding this comment

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

The way it is designed is intended: The cost is applied for having energy in the storage. I made the docstring more specific. (If there was cost for storing, you would give that to the inflow, instead.)

@nailend
Copy link
Contributor

nailend commented Aug 2, 2023

Could you please briefly explain, what you want to show in your example? Especially with your choice of setting the storage_costs to -1/4 of the marginal costs? It's not quite clear to me.

@p-snft
Copy link
Member Author

p-snft commented Aug 8, 2023

Could you please briefly explain, what you want to show in your example? Especially with your choice of setting the storage_costs to -1/4 of the marginal costs? It's not quite clear to me.

I decided to go to a more practical example. The original one arose from the script I wrote to check the behaviour of the new functionality.

@p-snft p-snft requested a review from nailend August 9, 2023 08:57
Comment on lines +6 to +8
+0.1 GenericStorageBlock_storage_content(storage_no_invest_1)
+0.1 GenericStorageBlock_storage_content(storage_no_invest_2)
+0.1 GenericStorageBlock_storage_content(storage_no_invest_3)
Copy link
Contributor

@nailend nailend Aug 11, 2023

Choose a reason for hiding this comment

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

Apparently there is no period index for the storage block. Maybe this should be fixed for the sake of consistency? Not sure if this needs to be addressed in a separate issue though?!

Copy link
Member Author

Choose a reason for hiding this comment

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

As the storage content is given in absolute values, only the limit (which might change from period to period) needs to have the index. I will leave it as it is.

Copy link
Contributor

@nailend nailend left a comment

Choose a reason for hiding this comment

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

Thanks for the updated example, I think it adds to a better understanding.

@p-snft p-snft merged commit d89ef93 into dev Aug 11, 2023
12 checks passed
@p-snft p-snft deleted the features/storage_costs branch September 28, 2023 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants