Skip to content

Conversation

blegat
Copy link
Member

@blegat blegat commented Apr 25, 2023

Closes #531

Checklist from #2167

Basic

  • Add a new AbstractScalarSet or AbstractVectorSet to src/sets.jl
  • Implement Base.copy(set::S)
  • Implement Base.:(==)(x::S, y::S)
  • If an AbstractVectorSet, implement dimension(set::S)

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

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.

Before merging, we should:

  • Add to docs
  • Add tests to MOI.Test
  • Add a bridge for PSDCone -> ScaledPSDCone

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.

We also need to add this to test_basic_constraints:

function _set(::Type{MOI.PositiveSemidefiniteConeTriangle})
return MOI.PositiveSemidefiniteConeTriangle(3)
end

:PositiveSemidefiniteConeTriangle,

@odow
Copy link
Member

odow commented May 4, 2023

I changed to use an explicit length. Makes things simpler.

@blegat blegat merged commit 74387eb into master May 8, 2023
@blegat blegat deleted the bl/scaled branch May 8, 2023 07:48
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.

Set request: ScaledPSDCone
2 participants