MomentOpt.jl is a Julia package to model Generalized Moment Problems and to approximate solutions via conic relaxations as it is described in Moments, Positive Polynomials and Their Applications or more recently in The Moment-SOS Hierarchy.
The two main ideas of MomentOpt.jl are
- use a highlevel syntax to define Generalized Moment Problems easily
- provide different options to approximate solutions and switch between different formulations easily.
MomentOpt.jl is implemented as a JuMP.jl extension. In particular it uses the same syntax for modeliztion. For example:
m = GMPModel()generates an empty model representing a generalized moment problem
@variable m Meas([x, y]; kwargs...) args...adds a measure variable to
@constraint m args...adds constraints to
set_optimizer(m, optimizer)can be used to set the optimizer. Alternatively, one can define the optimizer from the beginning
m = GMPModel(optimizer).
optimize!(m)is used to approximate a solution to
As a JuMP extension all numerical solvers available through JuMP are available to be used in MomentOpt, too.