Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions docs/src/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ 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)),
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
Expand All @@ -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
Expand Down
Loading