diff --git a/examples/polopt.jl b/examples/polopt.jl index 289ac9d..af07dfb 100644 --- a/examples/polopt.jl +++ b/examples/polopt.jl @@ -1,5 +1,5 @@ """ - Solve a global optimization problem with GMP.jl + Solve a global optimization problem with MomentOpt.jl For theortic background see : https://epubs.siam.org/doi/10.1137/S1052623400366802 Let K be a basic semialgebraic compact set and f a polynomial function. We are intersted in @@ -8,13 +8,13 @@ min f(x) x∈K -An equivalent formulation of this problem as GMP is given by +An equivalent formulation of this problem as Generalized Moment Problem is given by min <μ,f> <μ,1> = 1 μ∈M(K) -The optimal measure in the GMP above will be atomic and each atom will be a global minimizer +The optimal measure in the Generalized Moment Problem above will be atomic and each atom will be a global minimizer of f on K. """ diff --git a/examples/volume.jl b/examples/volume.jl index e3e2497..85155c5 100644 --- a/examples/volume.jl +++ b/examples/volume.jl @@ -1,10 +1,10 @@ """ - Approximate the volume of a semi algebraic set with GMP.jl. + Approximate the volume of a semi algebraic set with MomentOpt.jl. For theoretical background see : https://homepages.laas.fr/henrion/Papers/volume.pdf Let K ⊆ B ⊆ R^n be semialgebraic compact sets and the moments of a the Lebesgue meausre on B be known. One is interested in computing the volume of K. This can be done by solving - the GMP + the Generalized Moment Problem max <μ,1> μ + ν = λ @@ -39,8 +39,8 @@ using Plots pyplot() -# relaxation order for the GMP -order =6 +# relaxation order for the Generalized Moment Problem +order = 6 # polnomial variables @polyvar x y diff --git a/src/model.jl b/src/model.jl index 9628f93..ac2d491 100644 --- a/src/model.jl +++ b/src/model.jl @@ -1,14 +1,14 @@ export GMPModel, add_measure!, measures, add_constraints!, add_constraint! """ -GMP +A Generalized Moment Problem """ mutable struct GMPModel objective::OBJ where OBJ<:AbstractMomentObjective constraints::Vector{<:AbstractMomentConstraint} measures::Vector{Measure} - dual::JuMP.Model + dual::JuMP.Model cref::Dict{Measure,Any} dref::Dict{Any,Any} dstatus::MathOptInterface.TerminationStatusCode @@ -45,7 +45,7 @@ end function add_measure!(m::GMPModel, name::String, vars::Vector{V} ;kwargs...) where V<:MP.AbstractVariable append!(m.measures,[Measure(name,vars;kwargs...)]) -end +end function measures(gmp::GMPModel) return gmp.measures @@ -99,7 +99,7 @@ function add_objective!(gmp::GMPModel,sense::Symbol,mu::Measure,pol::PT) where { obj = MomObj(sense, Mom(pol,mu)) add_objective!(gmp,obj) end - + function add_objective!(gmp::GMPModel,sense::Symbol,pol::T,mu::Measure) where {M<:AbstractMomentExpressionLike, T<:Number} obj = MomObj(sense, CMom(pol,mu)) add_objective!(gmp,obj) @@ -109,4 +109,4 @@ function add_objective!(gmp::GMPModel,sense::Symbol,mu::Measure,pol::T) where {M obj = MomObj(sense, CMom(pol,mu)) add_objective!(gmp,obj) end - +