Closed pqrz closed 3 years ago
Can you try adding the RSOCtoNonConvexQuadBridge
bridge:
add_bridge(model, MOI.Bridges.Constraint.RSOCtoNonConvexQuadBridge)
Hi @blegat,
Haha, was expecting this. So, I had indeed try adding this, specifically:
After this line: https://github.com/jump-dev/Pavito.jl/blob/1ebd714cae8f0b60f3fdb6a6e7876d654a7770da/src/MOI_wrapper.jl#L127 added this:
127 .
128 MOI.Bridges.add_bridge(optimizer, MOI.Bridges.Constraint.SOCtoNonConvexQuadBridge{Float64})
129 MOI.Bridges.add_bridge(optimizer, MOI.Bridges.Constraint.RSOCtoNonConvexQuadBridge{Float64})
130 .
but no success!
This time, it's Pavito itself that needs the bridge as it only support linear, quadratic and nonlinear constraints, not conic ones.
So model
is the JuMP model itself in the line of my previous message.
Perfect! Works successfully now.
Thanks a lot, you are the best of the best!
Just, for the record, this is the final code:
using JuMP, LinearAlgebra, Cbc, Ipopt, Pavito, MathOptInterface
MOI = MathOptInterface
u0 = [3,5]
m = Model(optimizer_with_attributes(Pavito.Optimizer, "cont_solver"=>Ipopt.Optimizer, "mip_solver"=>Cbc.Optimizer))
add_bridge(m, MOI.Bridges.Constraint.SOCtoNonConvexQuadBridge)
add_bridge(m, MOI.Bridges.Constraint.RSOCtoNonConvexQuadBridge)
@variable(m, x[1:2], Int)
@objective(m, Min, dot(u0,x))
@constraint(m, [1, 5, x[1], x[2]] in RotatedSecondOrderCone())
optimize!(m)
Hi Team,
I was trying to run a RSOCP problem with Pavito, but it seems Pavito doesn't support RSOCP constraints?
Minimum reproducible example:
If possible, kindly suggest a resolution for same.