Hi, new to Julia and JuMP here, but really enjoying it so far.
Unfortunately, I am a bit stuck with this issue and would be happy to know how the dev plan for SOCtoQuadBridge look like at the moment?
As I try to convert an old (but working fine) Python code to Julia, I run into the issue that Gurobi in JuMP cannot automatically reformulate constraints of form x^2 + y^2 <= z^2, z >= 0
(“Q-matrix” is not PSD but has only 1 negative eigenvalue, so I believe this constraint should be SOC representable). It throws the error that “Q-matrix is not PSD”.The equivalent constraint in the GurobiPy API does result in an “optimal” solution.
A minimal example is posted below. For my larger problem, unfortunately, MOSEK with the SecondOrderCone()
constraint is not working well as Mosek solver stalls (JuMP status: SLOW_PROGRESS, Mosek status: Mosek.MSK_RES_TRM_STALL).
It is possible that I am doing something wrong.
Many thanks in advance for your help.
using JuMP, Mosek, MosekTools, Gurobi
#Uncomment for Gurobi
m = Model(with_optimizer(Gurobi.Optimizer, Presolve=0, OutputFlag=1, DualReductions=0))
#Uncomment for Mosek
#m = Model(with_optimizer(Mosek.Optimizer,MSK_IPAR_LOG=1,MSK_DPAR_INTPNT_CO_TOL_REL_GAP=1.0e-10))
@variable(m, x)
@variable(m, y)
@variable(m, z)
@constraint(m, z >= 0)
@constraint(m, 1 <= x <= 3)
@constraint(m, 1 <= y <= 3)
#Uncomment for Gurobi
@constraint(m, x*x + y*y <= z*z)
#Uncomment for Mosek
#@constraint(m, [z,x,y] in SecondOrderCone())
@objective(m, Min, x+y)
optimize!(m)
status = termination_status(m)
println(status)
println(JuMP.value(x))
println(JuMP.value(y))
println(JuMP.value(z))