We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
The text was updated successfully, but these errors were encountered:
The underlying issue is that we aren't doing anything with the ConstraintIndex returned here:
ConstraintIndex
JuMP.jl/src/variables.jl
Line 1971 in bea72a0
Line 1989 in bea72a0
Line 2165 in bea72a0
Line 2248 in bea72a0
Sorry, something went wrong.
ConstrainedVariableRef ConstrainedInSetRef InSetConstraintRef SetRef VariableSetRef VariableInSetRef ** ConstraintAtCreationRef ConstrainedOnCreationRef CreationConstraintRef
We discussed this on today's call, and agreed that we need a dictionary in model to map between variables and their corresponding set.
We did not agree on a name for the ref. Conclusion is that I should prototype the PR with documentation etc, and we can decide then.
Successfully merging a pull request may close this issue.
Reported by @lopenguin at https://discourse.julialang.org/t/dual-to-psd-constraint-in-jump/126352
If I have
it's not at all trivial to get the constraint reference so I can query the dual.
One suggested workaround might be:
For scalar variables, we have:
So perhaps we need something similar.
The text was updated successfully, but these errors were encountered: