Skip to content

add DualGeometricMeanCone and bridge - #3041

Merged
odow merged 10 commits into
jump-dev:masterfrom
araujoms:dualgeomean
Aug 10, 2026
Merged

add DualGeometricMeanCone and bridge#3041
odow merged 10 commits into
jump-dev:masterfrom
araujoms:dualgeomean

Conversation

@araujoms

@araujoms araujoms commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Part of #3037

I've added the set, related tests, and the bridge. Still missing are the bridge tests; I'm submitting the PR prematurely because it's already getting big and I'm getting nervous about losing stuff.

I also didn't add support in the file format, I don't know if that's desired.

Basic

  • Add a new AbstractScalarSet or AbstractVectorSet to src/sets.jl
  • If isbitstype(S) == false, implement Base.copy(set::S)
  • If isbitstype(S) == false, implement Base.:(==)(x::S, y::S)
  • If an AbstractVectorSet, implement dimension(set::S), unless the
    dimension is given by set.dimension.
  • Ensure the set does not contain references to any variables or constraints

Utilities

  • If an AbstractVectorSet, implement Utilities.set_dot,
    unless the dot product between two vectors in the set is equivalent to
    LinearAlgebra.dot
  • If an AbstractVectorSet, implement Utilities.set_with_dimension in
    src/Utilities/matrix_of_constraints.jl
  • Add the set to the @model macro at the bottom of src/Utilities.model.jl

Documentation

  • Add a docstring, which gives the mathematical definition of the set,
    along with an ## Example block containing a jldoctest
  • Add the docstring to docs/src/reference/standard_form.md
  • Add the set to the relevant table in docs/src/manual/standard_form.md

Tests

  • Define a new _set(::Type{S}) method in src/Test/test_basic_constraint.jl
    and add the name of the set to the list at the bottom of that files
  • If the set has any checks in its constructor, add tests to test/sets.jl

MathOptFormat

Optional

  • Implement dual_set(::S) and dual_set_type(::Type{S})
  • Add new tests to the Test submodule exercising your new set
  • Add new bridges to convert your set into more commonly used sets

@araujoms
araujoms marked this pull request as draft August 7, 2026 14:35
Comment thread src/Test/test_conic.jl Outdated
@araujoms
araujoms marked this pull request as ready for review August 8, 2026 10:54
@odow odow mentioned this pull request Aug 9, 2026
1 task
@odow
odow merged commit fc5336b into jump-dev:master Aug 10, 2026
29 checks passed
@odow

odow commented Aug 10, 2026

Copy link
Copy Markdown
Member

I guess you see now why we've only added sets when they became needed. It's a lot of work!

@araujoms

Copy link
Copy Markdown
Contributor Author

Indeed. I intend to add the dual vector relative entropy cone as well, but I don't use the other cones so I'll leave them for when they're needed.

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.

3 participants