From 4bdc1b5bc012bcafd188feda0f541d56180a1238 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Wed, 29 Jul 2026 12:42:26 +1200 Subject: [PATCH 1/2] [docs] update add support for new sets to use dual_set_type --- docs/src/manual.md | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/docs/src/manual.md b/docs/src/manual.md index 127059d..714b35e 100644 --- a/docs/src/manual.md +++ b/docs/src/manual.md @@ -146,7 +146,7 @@ Dualization.jl can automatically dualize models with custom sets. To do this, the user needs to define the set and its dual set and provide the functions: -* [`Dualization.supported_constraint`](@ref) +* `MathOptInterface.dual_set_type` * `MathOptInterface.dual_set` If the custom set has some special scalar product (see the [link](https://jump.dev/MathOptInterface.jl/stable/apireference/#MathOptInterface.AbstractSymmetricMatrixSetTriangle)), @@ -173,19 +173,8 @@ print(model) Now in order to dualize we must overload the methods as described above. ```@repl repl_example_new_set +MOI.dual_set_type(::Type{FakeCone}) = FakeDualCone MOI.dual_set(s::FakeCone) = FakeDualCone(MOI.dimension(s)) -function Dualization.supported_constraint( - ::Type{MOI.VectorOfVariables}, - ::Type{FakeCone}, -) - return true -end -function Dualization.supported_constraint( - ::Type{<:MOI.VectorAffineFunction}, - ::Type{FakeCone}, -) - return true -end ``` If your set has some specific scalar product you also need to define a new From 458c778a8d69b10815f3b41014da8e1b18b1641e Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Wed, 29 Jul 2026 12:56:34 +1200 Subject: [PATCH 2/2] Update docs/src/manual.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mateus Araújo --- docs/src/manual.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/manual.md b/docs/src/manual.md index 714b35e..ef1ed02 100644 --- a/docs/src/manual.md +++ b/docs/src/manual.md @@ -149,7 +149,7 @@ functions: * `MathOptInterface.dual_set_type` * `MathOptInterface.dual_set` -If the custom set has some special scalar product (see the [link](https://jump.dev/MathOptInterface.jl/stable/apireference/#MathOptInterface.AbstractSymmetricMatrixSetTriangle)), +If the custom set has some special scalar product (see the [link](https://jump.dev/MathOptInterface.jl/stable/reference/standard_form/#MathOptInterface.AbstractSymmetricMatrixSetTriangle)), the user also needs to provide the `MathOptInterface.Utilities.set_dot` function. For example, let us define a fake cone and its dual, the fake dual cone. We will