Closed rtwalker closed 4 years ago
There is no actual support for multi-stage models in StochasticPrograms yet. There is some experimental groundwork, which is likely to change. Hence, you can instantiate the model in vertical form, but the result is somewhat meaningless and you cannot solve the model.
I might open an issue with a roadmap for multi-stage support when I have more time for development again :)
If you want to solve multistage programs, you can use https://github.com/odow/SDDP.jl.
At some point I'd like to separate the SDDP backend so it could be used as a solver for @martinbiel's user-friendly modeling layer.
That would be great :)
Hence, you can instantiate the model in vertical form, but the result is somewhat meaningless and you cannot solve the model.
I'm working on a nested L-Shaped implementation at the moment, so the instantiation part gets me very close to what I was looking for. Previously most of my trouble was coming from specifying the model, but drawing on the "user-friendly modeling layer" here has alleviated nearly all of that trouble.
In other words, the multistage functionality is good enough for me at the moment, so I'm ok to close this issue given that the above isn't really a bug for the time being.
I'm working on a nested L-Shaped implementation at the moment
What for? Any reason to used nested Benders over SDDP ?
What for? Any reason to used nested Benders over SDDP ?
Mostly just to have as a point of comparison. I'll try to give SDDP a spin too!
You probably already know this, but SDDP is just nested Benders with sampling. For very small problems (e.g., 3 stage), SDDP may be a little slower due to unlucky sampling. But it should only take a few seconds to solve so it's not a big deal. For larger problems, nested Benders won't work. What applications are you trying to solve?
Eventually it'll be comparing solution methods for generation expansion planning problems. In the meantime, it's just persuading others that Julia/JuMP/StochasticPrograms would be a good choice for modeling problems and implementing some new ideas.
persuading others that Julia/JuMP/StochasticPrograms would be a good choice for modeling problems and implementing some new ideas.
This 💯
We're starting to have a nice ecosystem of tooling that makes it easy to do some crazy stuff. E.g., @andrewrosemberg was solving multistage stochastic hydro-thermal scheduling problems with SDP subproblems: https://proceedings.juliacon.org/papers/10.21105/jcon.00035
There are also tools like: https://github.com/reganbaucke/JuDGE.jl
And we're in the process of starting a file format to collect instances to make implementation of new ideas easier: https://odow.github.io/StochOptFormat/
(Edit: sorry for the noise @martinbiel)
I ran into an error with instantiating multistage models.
Taking the inventory example from the multistage chapter of Birge and Louveaux:
Instantiating the DEP gives the following error:
The
LShaped.Optimizer
seems to handle the same model correctly however: