jump-dev / Pajarito.jl

A solver for mixed-integer convex optimization
Mozilla Public License 2.0
129 stars 22 forks source link

Problem to test, debug #426

Closed bcdandurand closed 2 years ago

bcdandurand commented 5 years ago

I'm attaching a self-contained MWE that contains a model for identifying the worst vulnerabilities of the IEEE 9 bus problem with respect to line cuts. The optimal value is known beforehand to be 3.452, and the optimal line cuts are x[1]=1, x[4]=1, and x[7]=1 (with the rest of the x values zero).

When I run the MWE, I do not get the correct optimal value (though the x solution, strangely, is correct). When I fix x[1]=1, x[4]=1, and x[7]=1 using Pajarito, the initial convex subproblem is either unbounded or infeasible. But if I just use Mosek with the x fixed to its optimal solution, the problem solves optimally and verifies the value 3.452.

Also, it seems I need to add redundant constraints to bound each variable, even though they are already bounded, in order to keep the initial soc relaxation from being unbounded.

Please have a look at the MWE attached. Either point out anything wrong in the modelling, or debug Pajarito or note any quirks with JuMP as needed. Thank you.

For the attachment, please re-save as MWEACP.jl, it is currently MWEACP.txt.

Let me know if I can provide anything else

MWEACP.txt

bcdandurand commented 5 years ago

Also, if I put the nonnegativity bounds back on the zetas: @variable(mMP, ζpUB[g=G] >= 0) @variable(mMP, ζpLB[g=G] >= 0) @variable(mMP, ζqUB[g=G] >= 0) @variable(mMP, ζqLB[g=G] >= 0) then the optimal value becomes 3.15, with the same optimal solution as before. This inclusion of nonnegativity bounds should not tighten the constraint set given that these bounds are enforced through constraints already.

chriscoey commented 5 years ago

Thank you @bcdandurand. I will try to debug this soon. It seems that it's not urgent because you found a workaround, in which case it may take me a few weeks before I have time to debug.

I suspect it is an issue with JuMP that could be fixed in JuMP 0.19 (which is quite an overhaul), but Pajarito has not been updated for JuMP 0.19 + MOI yet because the new JuMP is lacking MIP callbacks at the moment. I'm hoping the big Pajarito update can happen in June.

chriscoey commented 2 years ago

I've rewritten Pajarito on the the new main branch. It's quite a bit simpler now so should be easier to debug in future. I think the JuMP code for this MWE will need a few minor changes to get it working again, and hopefully there is no longer a problem (if there is, best to try multiple MIP and conic solvers to see if the error reproduces).