Skip to content

Constraint associated with a variable set #3951

@odow

Description

@odow

Reported by @lopenguin at https://discourse.julialang.org/t/dual-to-psd-constraint-in-jump/126352

If I have

using JuMP
model = Model()
@variable(model, A[1:2, 1:2] >= 0, PSD)
@variable(model, B[1:2, 1:2] in HermitianPSDCone())
@variable(model, C[1:3] in SecondOrderCone())

it's not at all trivial to get the constraint reference so I can query the dual.

One suggested workaround might be:

using JuMP
model = Model()
@variable(model, A[1:2, 1:2] >= 0, Symmetric)
@constraint(model, A_ref, A in PSDCone())
@variable(model, B[1:2, 1:2], Hermitian)
@constraint(model, B_ref, B in HermitianPSDCone())
@variable(model, C[1:3])
@constraint(model, C_ref, C in SecondOrderCone())

For scalar variables, we have:

model = Model()
@variable(model, x >= 0, Int)
LowerBoundRef(x)
IntegerRef(x)

So perhaps we need something similar.

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