StructJuMP / StructJuMP.jl

A block-structured optimization framework for JuMP
Other
54 stars 19 forks source link

Benders for StochJuMP #8

Closed emreyamangil closed 8 years ago

emreyamangil commented 8 years ago

This PR adds a parallel Benders algorithm to StochJuMP. It can be called with a given misocp_solver and socp_solver for subproblems. Added a simple set of unit tests to verify functionality.

emreyamangil commented 8 years ago

@joehuchette @mlubin

joehuchette commented 8 years ago

Thanks for this, @emreyamangil. I've been traveling but I'll be sure to go over the code in detail this week.

On Wed, Jan 27, 2016 at 6:12 PM emreyamangil notifications@github.com wrote:

@joehuchette https://github.com/joehuchette @mlubin https://github.com/mlubin

— Reply to this email directly or view it on GitHub https://github.com/joehuchette/StochJuMP.jl/pull/8#issuecomment-175906309 .

emreyamangil commented 8 years ago

Thanks Joey! Looking forward to your revisions!

joehuchette commented 8 years ago

Thanks again! Mostly small comments so far, but I'm concerned about lines like

@addConstraint(master_model, sum{A[ind[i],j]*x[j],j in 1:num_var} == b[ind[i]])

for sparse A. I think a preferable approach might be to write this as

@addConstraint(master_model, A[ind[i],:]*x .== b[ind[i]])

(or with dot(A[ind[i],:],x)) but I haven't tested so I can't be sure.

emreyamangil commented 8 years ago

Many thanks Joey!! The constraint is legacy code I forgot to change (It was because I declared the variables in a funny way, one by one with different integrality restrictions, sorry!! Miles already told me to do that but I forgot :)) Will do these asap and update the PR!!

emreyamangil commented 8 years ago

Many thanks again Joey! I finished the revisions, please let me know when you get a chance!

emreyamangil commented 8 years ago

Perfect! Wasn't aware I could reconstruct the same variable with its reference!

emreyamangil commented 8 years ago

Hmm, I just realized your point, m.numCols will be equal to the number of variables owned by the model itself right?

joehuchette commented 8 years ago

Yep. What exactly are you trying to accomplish here?

emreyamangil commented 8 years ago

I was thinking StochJuMP model was holding the subproblems with all variables appearing there (master variables too) and bounds could appear in a subproblem for some reason, obviously they will be in the master model :D Just revising this part and pushing it right now!

joehuchette commented 8 years ago

Merged in #9

joehuchette commented 8 years ago

Thanks @emreyamangil!!