Skip to content

Missing attribute ConstraintDual for ZerosBridge #1831

Closed
@guilhermebodin

Description

@guilhermebodin

This code gives the following error

using JuMP
using ECOS

model = Model(() -> ECOS.Optimizer())
@variable(model, x[1:2])
@variable(model, t[1:2])
@variable(model, p == 1)
@constraint(model, con1, [t[1], x[1] + p, x[1]] in SecondOrderCone())
@constraint(model, con2, [t[2], 2x[2] + p, x[2]] in SecondOrderCone())
@objective(model, Min, sum(t))
optimize!(model)
dual(FixRef(p))

julia> dual(FixRef(p))
ERROR: ArgumentError: Bridge of type `MathOptInterface.Bridges.Variable.ZerosBridge{Float64}` does not support 
accessing the attribute `MathOptInterface.ConstraintDual(1)`. If you encountered this error unexpectedly, it probably means your model has been reformulated using the bridge, and you are attempting to query an attribute that we haven't implemented yet for this bridge. Please open an issue at https://github.com/jump-dev/MathOptInterface.jl/issues/new and provide a reproducible example explaining what you were trying to do.

I was testing querying duals of parameters in some conic sets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions