odow / SDDP.jl

A JuMP extension for Stochastic Dual Dynamic Programming
https://sddp.dev
Other
293 stars 62 forks source link

Add cut patterns to SDDiP #257

Closed eltuck closed 3 years ago

eltuck commented 4 years ago

Thank y'all for all your work on SDDP and SDDiP packages. I've been been updating a model that previously used SDDiP.jl to SDDP.jl, and an initial draft seems to run fine. At this point, I have a couple questions:

I glanced through the src files but couldn't figure out what the options would be or if those are still features.

Thanks, again!

lkapelevich commented 4 years ago

I haven't moved over the cut pattern code since I didn't think it was super critical, and I don't think it'd be too tricky for someone to add.

Yep you should be able to go epsilon = ... inside @variable. Looks like this kwarg is tested but didn't make it into any examples, it would probably be nice to get an example :-).

odow commented 4 years ago

We still need to write some docs: https://github.com/odow/SDDP.jl/issues/246

I only have a placeholder for now: https://odow.github.io/SDDP.jl/latest/tutorial/13_integrality

The syntax is

@variable(subproblem, 0 <= x <= 2, SDDP.State, initial_value = 0, epsilon = 0.01)
eltuck commented 4 years ago

Thank you both! This is very helpful and all sounds good.

Regarding the cuts, what pattern/type of cuts are applied currently? Does it cycle through all 3 (IO, SB, L)?

lkapelevich commented 4 years ago

SDDiP will add Lagrangian cuts only

eltuck commented 4 years ago

Thank you!

odow commented 4 years ago

I'm going to re-open this as a reminder for someone to add IO or SB cuts in the future.

lkapelevich commented 4 years ago

I will add a thought- given that IO cuts will not be better than SB or L cuts, implementing these may just lead to adding unnecessary code to SDDP.jl. Also if the implementation of L cuts could be improved, perhaps the SB cuts would be less valuable also.

odow commented 4 years ago

given that IO cuts will not be better than SB or L cuts, implementing these may just lead to adding unnecessary code to SDDP.jl

I'm all for avoiding unnecessary code.

Also if the implementation of L cuts could be improved

Is this related to: https://github.com/odow/SDDP.jl/blob/a33786a24c33d6c0a0232432c80659c99788f2b0/src/plugins/integrality_handlers.jl#L214 What's the "smart choice"?

Although for people reading this, I'm unlikely to work on this, and I don't think @lkapelevich is either, so help wanted :).

lkapelevich commented 4 years ago

I would try to start with infeasible duals so that Kelley's method has the chance to work toward a cut that is only "just valid". But I don't know how worthwhile it'll turn out practically.

odow commented 3 years ago

Closing in favor of #246