Giter VIP home page Giter VIP logo

Comments (6)

jokochems avatar jokochems commented on August 10, 2024

Ouch, that's quite bad, I have to admit. Thanks for pointing this out, @SabineHaas!

I haven't come across this issue, yet, as I have been working with brownfield scenarios, mostly.

I am pretty sure that it relates to the multi-period storage implementation and the definition of the 0th storage state, to be more precise, this code section.

My idea here was to force storage levels to equal 0 until an investment happens. But what the rule effectively does is to prevent storage investments for the 0th (i.e. the very first TIMESTEP).

I commented out the lines mentioned above and the optimization yielded results as you'd have expected them, i.e. no shortage is activated and investment results for both cases are identical.

I haven't given it enough thought yet, but my gut feeling is that the respective rule might be safely removed.

@nailend: Would you second that opinion of mine?

from oemof-solph.

nailend avatar nailend commented on August 10, 2024

I tried to wrap my head around, but I didn't really understand why this constraint doesn't work. But this is a direct consequence of #1030 isn't it? In multi-period, the distinction between TIMESTEPS and TIMEPOINTS don't exist?

from oemof-solph.

jokochems avatar jokochems commented on August 10, 2024

I tried to wrap my head around, but I didn't really understand why this constraint doesn't work. But this is a direct consequence of #1030 isn't it? In multi-period, the distinction between TIMESTEPS and TIMEPOINTS don't exist?

Yes, you are right. The two issues are interrelated and there only is the TIMESTEPS set for multi-period models.

  • What I wanted to do - as I describe above - is to ensure new-built storages are initially empty. Now there is the follow-up issue with defining the initial storage level.
  • In the previous version of solph (i.e. before the TIMESTEPS / TIMEPOINTS split), there was an initial storage level defined before any flow happening (so at time -1 if you want to think about it that way). After that, the storage content variables and the flows had the same time indices (from the TIMESTEPS set), wereby the storage content variables were a result of the (in- and out)flows happening into the storage.
  • In the current version of solph, it was decided to make this behaviour explicit by introducing the TIMEPOINTS set with one entry more to properly index storage levels.
  • I wanted to recreate the behaviour of the old solph version (because I found it easier to implement and started with that while the TIMESTEPS / TIMEPOINTS split happened in the meantime). I think the error I made here is that I fixed the 0th instead of the -1st time step with the constraint I referenced.

As I see it, there would be three options:

  1. Simply remove the constraint. This would allow to freely choose a storage level. You'd have to think about whether this might create the model artefact of filling a storage for free, though ...
  2. Adjust the constraint to recreate the behabiour of the previous solph version.
  3. Align with the current version of solph.

I think option 3 is clearly preferrable. In that course, also the investment storage implementation in general should be revised, see #1030.

from oemof-solph.

p-snft avatar p-snft commented on August 10, 2024

Simply remove the constraint. This would allow to freely choose a storage level. You'd have to think about whether this might create the model artefact of filling a storage for free, though ...

In fact, the assumption that a newly installed storage is always empty is not valid in all cases. Think of rechargeable batteries: If receive them at 0 % capacity, they are probably broken.

from oemof-solph.

jokochems avatar jokochems commented on August 10, 2024

Thanks, @p-snft. You are totally right about this. I also thought about pumped storage which will probably come with some filling level initially.

@nailend and @SabineHaas: Look what I found: #965
The constraint was not always there. I added it as sort of a hotfix after I have been informed by a user facing trouble with storages that were initially filled "for free".

@nailend I also had some trouble with proper storage roundtrip conditions (there actually are none yet), but that was before your sophisticated lifetime tracking thing. It might be worth a shot tackling this as well - maybe in a dedicated issue/PR.

from oemof-solph.

nailend avatar nailend commented on August 10, 2024

Thanks, @p-snft. You are totally right about this. I also thought about pumped storage which will probably come with some filling level initially.

Not sure, what's the better solution to be honest, but I prefer to set the initial content per component.

Look what I found: #965

well I confirmed, haha

@nailend I also had some trouble with proper storage roundtrip conditions (there actually are none yet), but that was before your sophisticated lifetime tracking thing. It might be worth a shot tackling this as well - maybe in a dedicated issue/PR.

you mean roundtrips within a period?

At the dev-meeting, we shared the common interest to somehow replace single-period with multi-period. For this to happen, there are a few things to be done before. I will open an issue, where we can collect the necessary changes/improvements.

from oemof-solph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.