second order cone constraint in JuMP 0.19 with gurobi solver

question

#1

I failed to add SOCP constraint to my model with gurobi solver after updating JuMP to 0.19.

Since norm is no longer supported, I tried the example provided in documentation,

using JuMP,Gurobi,MathOptInterface

env = Gurobi.Env()

model = Model(with_optimizer(Gurobi.Optimizer, env))

@variable(model, x)

@variable(model, t)

#@constraint(model, norm([x-1, x-2]) <= t)

@constraint(model, [t, x-1, x-2] in SecondOrderCone())

print(model)

JuMP.optimize!(model)

But the error message says

ERROR: LoadError: Constraints of type MathOptInterface.VectorAffineFunction{Float64}-in-MathOptIInterface.SecondOrderCone are not supported by the solver and there are no bridges that can refrormulate it into supported constraints.

Please help on this.


#2

For Gurobi you need to enter it as a quadratic constraint. The transformation from SOC to quadratic is currently discussed here:


We try to make a decision about this during this afternoon collaboration time at JuMP-dev.