Dualization.jl is an extension package for MathOptInterface.jl that formulates the dual of conic optimization problems.
Dualization.jl has two main features:
- The
Dualization.dualize
function that computes the dual formulation of either a MathOptInterface.jl or a JuMP model. - The
Dualization.dual_optimizer
function that creates a MathOptInterface-compatible optimizer that solves the dual of the problem instead of the primal.
Dualization.jl
is licensed under the
MIT License.
Install Dualization using Pkg.add
:
import Pkg
Pkg.add("Dualization")
To compute the dual formulation of a JuMP model, use dualize
:
using JuMP, Dualization
model = Model()
# ... build model ...
dual_model = dualize(model)
To solve the dual formulation of a JuMP model, create a dual_optimizer
:
using JuMP, Dualization, SCS
model = Model(dual_optimizer(SCS.Optimizer))
# ... build model ...
optimize!(model) # Solves the dual instead of the primal
The documentation for Dualization.jl includes a detailed description of the dual reformulation, along with examples and an API reference.