-
Notifications
You must be signed in to change notification settings - Fork 42
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
MOSEK "both conic and nonlinear" error #229
Comments
Running with
But in general, yes this is a documented limitation. We could add an oputomatic transformation. Or, we can hope that Mosek improves the automatic conversion, because currently it only works for 'standard conic forms' of quadratic constraints, while Gurobi also accepts |
It appears that MOSEK can handle this example as it is originally stated, but that MP's default is to transform it to a different form, which MOSEK can't handle. Is that right? If yes, then ideally MP would detect when this case occurs, and would suppress the transformation in this case. But is that possible? There might be complications that I don't appreciate. |
Done for this example. But: This example is a convex QCP, not a SOCP. That's pretty much all that Mosek can handle; it seems unable to recognize SOCP from quadratics even in standard form. Thus, to enable proper SOCP models with quadratic objective, we need to extract the objective's QP terms into a cone. |
A different user sent another example, which failed with both cvt:socp=1 and cvt:socp=0. I think you have fixed this now, but here's a simplified version in case it is useful for testing:
Using the MOSEK 20231117 driver, cvt:socp=1 gave the "both conic and nonlinear" error:
With cvt:socp=0, MOSEK instead rejected the problem with a "not convex" message:
|
Also I noticed that MOSEK 20231117 rejected this model:
Gurobi accepts this model, but MOSEK 20231117 reports a "not convex" error with either cvt:socp=1 or cvt:socp=0. MP might be missing this case as something that can be converted to a conic. |
On 'nonconvex QC' error, remind user to check if she has a SOCP
When any cones found, move QP objective terms into an aux SOC, in the easy case Specially for Mosek
The last example is non-convex. The previous new example is SOCP and not a convex QC. So it still did not work, until I added objective function presolve (extract QP terms into an aux SOC). However this is done only in simple cases as above. For cases such as
This all goes towards user convenience: actually, SOCP assumes a linear objective. However, general conic optimization assumes any convex objective. Full convenience would be achieved with log/exp expression presolve into exp cones. Then our logistic regression Colab/Streamlit example could use a single model for IPOPT and Mosek. |
MOSEK rejects models that contain a quadratic objective and a quadratic constraint:
The error message is:
A user ran into this problem when trying out MOSEK as an alternative to Gurobi (which does not reject such models). Is this an unavoidable limitation in MOSEK? If so, we would have to advise a different formulation, perhaps minimizing z subject to z >= the objective expression.
The text was updated successfully, but these errors were encountered: