oemof / oemof-solph

A model generator for energy system modelling and optimisation (LP/MILP).
https://oemof.org
MIT License
285 stars 124 forks source link

OEMOF Solph does not record enough information to support stochastic programming (support wanted) #778

Open FHell opened 3 years ago

FHell commented 3 years ago

We have been playing around with various ways to do scenario sampling based analysis of power systems in oemof. The cleanest option seems to be to leverage the stochastic programming language built on top of pyomo, mpi-sppy.

This seems relatively straightforward. What we need to do is the following:

Architecturally this means the following:

-> Probably the blocks/components? All blocks/components?

And writing a utility function that

-> So the question: How do we iterate over all blocks/components and extract information from them?

If you are interested in helping with that please get in touch! We particularly need help with the architectural aspects.

In the meantime we will create a prototype where we record the information manually.

c-moeller commented 3 years ago

@e-zolotarevskaya I cannot assign you. No idea why.

simnh commented 3 years ago

Are you planning to build a stochastic programming API? I am not too much familiar with SP, however, I think it would require a whole new type of model (similar to the ExpansionModel)?

With regard to the looping over blocks we do this here already for the "normal" decision variables to create our results dataframe, maybe this helps?

FHell commented 3 years ago

That is extremely helpful indeed! @e-zolotarevskaya, have a look! Right now we hope that we can do this without the need for a full additional model. This is because the mpi-sppy package is built to work on top of (variations of) vanilla pyomo models. So we hope that we can work on top of vanilla oemof models. We'll see.

jokochems commented 2 years ago

Sorry for the late response to this one: I'm not so very familiar with stochastical programming either, but I think, it could be quite similar to the multi-period modeling I have just started to revisit, see oemof/oemof-solph#793 resp. oemof/oemof-solph#750.

I've discussed parts of it with @p-snft quite a while ago:

I agree that we definitely should discuss it in the upcoming meeting https://github.com/oemof/oemof/issues/96

jokochems commented 2 years ago

After discussing it at the dev meeting https://github.com/oemof/oemof/issues/96, this should be easier to add than I originally assumed. Here is a try to summarize. @simnh and @gnn: Please correct me if I'm wrong and please add to it.