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

NonConvex in Stratified Thermal Storage #181

Open
FrancisMe1 opened this issue Feb 18, 2022 · 4 comments
Open

NonConvex in Stratified Thermal Storage #181

FrancisMe1 opened this issue Feb 18, 2022 · 4 comments

Comments

@FrancisMe1
Copy link

Good afternoon to everybody,

I'm working with the Stratified Thermal Storage component and I'm having some troubles. I would like to implement an economy of scale for the component, in order to account for different costs at different sizes. How can I do it? The NonConvex options doesn't work for me, maybe I'm setting something wrong. The other option is to give different sizes in input with associated different costs, however I don't know how to set constraints on the minimum size for the choice (so for example I would like to tell Oemof to choose size A if the nominal storage capacity is between 0 and 1 and B if it is between 1 and 2.).
Can someone help me?

Thank you!

Francesca

@p-snft
Copy link
Member

p-snft commented Feb 21, 2022

As a quick solution in terms of implementation, you could use that the underlying problem is actually convex. So, you start investment optimisation at an arbitrary size with the associated linearised specific cost (e.g. in € per additional m³). Then iterate with the resulting optimal sizes and corresponding linearised costs and you are done. If a bigger storage is worth the investment without economy of scale, it will for sure be when specific prices are adjusted.

The second way was already mentioned by you: You could have a GenericInvestmentStorageBlock with binary constraints so that the linearised specific costs really match. (A better way to do this would be piecewise linear investment. This feature would have to be implemented, though. I guess mocking this using NonConvex investments will result in a longer runtime then the iterative approach.)

@FrancisMe1
Copy link
Author

Thank you for your answer!
Could you please give me an example on how to implement the linearised specific costs in the generic investment?
and what do you mean when you say that I have to iterate the resulting optimal size and corresponding linearized cost? I don't know how to tell Oemof to choose one of the options I give in input...

@p-snft
Copy link
Member

p-snft commented Feb 21, 2022

Assume that the price is

  • C(V) = 2 * ln(V/(1 m³)) €,

so the specific cost (slope) is

  • d/dV[C(V)] = 2/V €/m³.

Now, you guess a size, i.e. 3 m³ and start optimisation with 2/3 €/m³. When the optimiser finds an optimal size of 5 m³, use 0.4 €/m³, and so on. At some point, the change between two runs should become small enough so that you can decide to stop.

@FrancisMe1
Copy link
Author

thank you!

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

No branches or pull requests

2 participants