-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quadratic objective with SDP constraints #114
Comments
Currently Alpine.jl does not support SDP constraints |
If your problem is convex give SCS, Mosek or Pajarito a try. |
Ah ok, thanks for letting me know. Unfortunately SCS and Mosek don't support quadratic objectives, and Pajarito yields the same problem with "ERROR: JuMP does not support quadratic objectives for conic problems" since it seems to be a limitation of MathProgBase (though maybe I can try to fool it with a dummy variable). Thanks again! |
Oh, I didn't realize. You can always add lifted variables to turn the objective into a linear one. |
I don't think JuMP supports quadratic and conic constraints too. So lifting may not help. |
@ericphanson But a work around is that you can write a (simple) quadratic constraint in the SDP form. For example: x^2 <= y*z can be written as an SDP constraint as follows: [x y; z x] \succeq 0 |
In JuMP v0.18 you can use |
Thanks for the suggestions :). I'm not sure whether or not these things can work in my case. I don't think the problem is convex; for example, I tried COSMO.jl on JuMP 19, and it transforms my problem into the COSMO.jl form shown here: https://oxfordcontrol.github.io/COSMO.jl/stable/. After that transformation, the matrix Instead, my objective function is a sum of terms like sum( tr( A[i] * X ) * Phi[i,j] * c[j] for i=1:n for j = 1:n ) where the So JuMP calls it a quadratic expression, since you have components of One thing I can do is fix |
@ericphanson Are the elements of your Phi matrix binary variables since you mention that it is a permutation matrix? If they are indeed binaries, based on your objective function description, you should be able to get rid of all your nonlinearities by replacing every Phi_ij * X_ij with a set of auxiliary variables, say \hat{phi}_ij, and the following constraints:
Note that the above linearization is exact, i.e., you should be able to use any MISDP solver, like Pajarito.jl, and obtain global optimum values for your problem. Of course, the convergence of solvers will now depend on the bounds of X_ij variables. If the bounds are tight, you should be able to solve it fairly fast. If your Phi_ij-s are in the continuous set [0,1] instead of {0,1}, the above linearization, solved using Mosek, guarantees you a valid lower bound but not necessarily global optimal values. Hope this helps! P.S: If you are interested in a more formal description, we do this above linearization for a similar nonlinear MISDP problem in this paper: Eqns (22)-(24) in https://arxiv.org/pdf/1903.08354.pdf |
Wow, that's great! Thank you, I will try this (and of course cite the paper if indeed this makes it into our work). Yes, they are binary ideally-- I figured I might have to relax them to be in [0,1] since I thought that might be easier than an integer program, but maybe not then! Based on the earlier comments I already tried replacing the products with auxiliary variables, but I didn't think of anything like this clever argument. |
👍 I will be now curious to see how well Pajarito.jl would do on your problem. :) |
Pajarito solved my test problem exactly, in only 28 seconds! I am impressed. Well, with CSDP as the SDP solver it ran for a few minutes and then segfaulted, but with Mosek it worked perfectly (edit: reported here: jump-dev/CSDP.jl#39 (comment)). I'm now trying on a bigger version of the problem, but I might just come back in the morning and see how it did, since it will likely take awhile. |
@harshangrjn just to say the paper is out now, and we used this linearization trick: https://arxiv.org/abs/2001.03598 (acknowledging you). Thanks very much for the help! The MISDP ends up being hard to solve for non-small problems but it’s already interesting to me for small problems; there’s an SDP formulation (with exponentially many variables) solvable for small problems as well, but the misdp formulation can prescribe a number of non-zero variables which leads to more informative solutions. |
@ericphanson Thats great! Thanks for keeping me posted. In general MISDPs are quite hard to solve, but I have been off-late working on developing relatively fast methods to obtain tight lower/upper bounds. We can take this offline. |
Is it possible to use Alpine for such a problem? It seems like JuMP 18.5 does not accept such problems when I try to formulate one for use with Alpine:
ERROR: JuMP does not support quadratic objectives for conic problems
The text was updated successfully, but these errors were encountered: