Skip to content

Conversation

@araujoms
Copy link
Contributor

I've added a MOI interface for the complex PSD cone according to the design @blegat suggested here, adding the sets ScaledComplexPSDCone and ComplexPositiveSemidefiniteConeTriangle and using the chain of bridges
MOI.HermitianPositiveSemidefiniteConeTriangle -> ComplexPositiveSemidefiniteConeTriangle -> MOI.Scaled{ComplexPositiveSemidefiniteConeTriangle} -> ScaledComplexPSDCone.

Still missing is the middle part ComplexPositiveSemidefiniteConeTriangle -> MOI.Scaled{ComplexPositiveSemidefiniteConeTriangle}, which I don't know how to do, but I expect it will be rather simple. I added the functions set_dot and set_coefficients for ComplexPositiveSemidefiniteConeTriangle, which I assume are necessary for MOI.Scaled to work.

@araujoms
Copy link
Contributor Author

Now everything is working, except that JuMP doesn't want to use the new cone! I have to explicitly remove the inefficient bridge via remove_bridge(model, MOI.Bridges.Constraint.HermitianToSymmetricPSDBridge) for it to use the complex cone.

@araujoms araujoms marked this pull request as ready for review August 24, 2025 20:17
@araujoms araujoms changed the title [WIP] add MOI interface for complex PSD cone add MOI interface for complex PSD cone Aug 24, 2025
@blegat
Copy link
Member

blegat commented Aug 25, 2025

You can tweak the bridging cost to make that your bridges are preferred over the inefficient one.
Use something like

MOI.Bridges.bridging_cost(::Type{<:YourBridge}) = 0.1

@araujoms
Copy link
Contributor Author

That was it, thanks a lot.

Copy link
Member

@blegat blegat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, the buildkit failure is unrelated

@kalmarek
Copy link
Collaborator

@araujoms the only question that comes to my mind is: Is the interface/bridge really covered by the tests? I can only see a set of tests removed in this PR :D

@araujoms
Copy link
Contributor Author

That was a list of the MOI tests to be excluded, so by removing it I'm actually adding it =)

But the honest answer to your question is that I don't know. I assume MOI has plenty of tests already for the complex PSD cone. If that's not the case I'm happy to write one.

I did add a test of the low-level interface in a previous PR.

@blegat
Copy link
Member

blegat commented Aug 26, 2025

Now that the bridging costs are lowered, it should be used by the MOI tests.

Copy link
Member

@odow odow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy if @blegat is happy

@odow odow merged commit 6e3a9ea into jump-dev:master Aug 31, 2025
9 of 10 checks passed
@araujoms araujoms deleted the complexpsdmoi branch September 4, 2025 08:34
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.

4 participants