Skip to content
New issue

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

Add fallback for MOI.AbstractSymmetricMatrixSet{Triangle,Square} #3424

Merged
merged 1 commit into from Jun 27, 2023

Conversation

odow
Copy link
Member

@odow odow commented Jun 26, 2023

Closes #2093

@blegat is this what you had in mind?

It should allow something like

@variable(model, X[1:2, 1:2], Symmetric)
@constraint(model, X in SumOfSquares.ScaledDiagonallyDominantConeTriangle(2))

But what is a good model to test?

@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (ff69293) 97.97% compared to head (734d131) 97.97%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3424   +/-   ##
=======================================
  Coverage   97.97%   97.97%           
=======================================
  Files          34       34           
  Lines        4930     4939    +9     
=======================================
+ Hits         4830     4839    +9     
  Misses        100      100           
Impacted Files Coverage Δ
src/macros.jl 98.63% <ø> (ø)
src/sd.jl 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@blegat
Copy link
Member

blegat commented Jun 26, 2023

I find it quite neat!
Once we have that, why no @constraint(model, (t, Symmetric(ones(2, 2))) in RootDetConeTriangle(2)) ?

@odow
Copy link
Member Author

odow commented Jun 26, 2023

The main reason against (t, X) would be that we couldn't recover the function from the MOI model alone. We could add a new shape though.

@matbesancon suggested this a while ago: jump-dev/MathOptInterface.jl#1624

But it was in the context of MOI. It makes a bit more sense for JuMP. It'd simplify using RootDetConeTriangle if you didn't need to manually construct the triangular vector.

@odow
Copy link
Member Author

odow commented Jun 27, 2023

I have a proof of concept for the tuple function. I'll merge this, then open a new PR.

@odow odow merged commit 0f123b8 into master Jun 27, 2023
12 checks passed
@odow odow deleted the od/abstract-symmetric-matrix-set-triangle branch June 27, 2023 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Ease addition of matrix cones
2 participants