odow / SDDP.jl

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

Document overloadable functions #149

Closed odow closed 5 years ago

odow commented 6 years ago

e.g., https://github.com/odow/SDDP.jl/blob/5c1d31793c6c6d20e8eb94a823c6eb099968a373/src/utilities.jl#L173-L198

@bfpc might have some more.

bfpc commented 6 years ago

JuMPsolve() is one particularly useful to reload. For example,

function SDDP.JuMPsolve(::Type{SDDP.BackwardPass}, m::SDDP.SDDPModel, sp::JuMP.Model)
  JuMP.solve(sp, relaxation=true)
end

results in using Benders' cuts for the backwards pass. Of course, if the MIP solver (for the forward pass) does not support Lagrange multipliers needed in the backwards pass, then this must be complemented to set/reset the solver associated to sp by calling JuMP.setsolver() twice, one before and one after.