oxfordcontrol / COSMO.jl

COSMO: Accelerated ADMM-based solver for convex conic optimisation problems (LP, QP, SOCP, SDP, ExpCP, PowCP). Automatic chordal decomposition of sparse semidefinite programs.
https://oxfordcontrol.github.io/COSMO.jl/stable
Apache License 2.0
282 stars 41 forks source link

MathOptInterface UnsupportedConstraint (SingleVariable in ZeroOne) #86

Closed haydenfree closed 5 years ago

haydenfree commented 5 years ago

Hi,

I realize this might be a silly question, but I want to ask just to be sure. When trying to use COSMO as my solver with JuMP I receive the following error:

MathOptInterface.UnsupportedConstraint{MathOptInterface.SingleVariable,MathOptInterface.ZeroOne}: MathOptInterface.SingleVariable-in-MathOptInterface.ZeroOne constraints is not supported by the model.

The same exact code works if I swap in Gurobi as the solver. After some digging online, I believe this is due to the fact that COSMO doesn't support Mixed Integer Linear Programing (MILP). Am I correct? Is there any way to make this work? My colleagues and I really want to use get away from Gurobi, and COSMO seemed like the perfect solution.

Thank you!

migarstka commented 5 years ago

Hey,

thank you for your interest in COSMO. You are correct, we don't support integer variables as of now.

The table here has a good overview of the solvers that are supporting JuMP and what kind of problems they can solve.

It might also be worth looking at Juniper. I believe it allows you to choose the underlying NLP solver, so you could combine it with a solver of your choice.

haydenfree commented 5 years ago

@migarstka Thank you for the quick and helpful reply. Are there any plans to add support for integer variables in the future? We would love to be able to use it.

I'm just getting into work with optimization problems so I apologize if this is a silly question, but if Juniper is able to solve MINLP problems would it able be able to solve MILP too? Are MILP problems a subset of MINLP problems?

I will also look at the table you sent and see what we can figure out. It looks like the most robust solvers are all commercial, so perhaps using different solvers depending on the problem type provided will be the best solution. Thank you again!

migarstka commented 5 years ago

It is not planned for the near future. One possible idea is certainly to integrate COSMO with a branch-and-bound scheme provided by another package.

Yes, you should be able to solve MILP problems as well!