diff --git a/examples/JuMP_utils.jl b/examples/JuMP_utils.jl index 69001d615..362a5273d 100644 --- a/examples/JuMP_utils.jl +++ b/examples/JuMP_utils.jl @@ -118,7 +118,7 @@ function setup_model( if !isnothing(extender) # for PolyJuMP/SumOfSquares models for B in model.bridge_types - MOI.Bridges.add_bridge(opt, B{Float64}) + MOI.Bridges.add_bridge(opt, B) end end diff --git a/examples/contraction/JuMP.jl b/examples/contraction/JuMP.jl index 71bccefd3..14e563b3a 100644 --- a/examples/contraction/JuMP.jl +++ b/examples/contraction/JuMP.jl @@ -44,7 +44,7 @@ function build(inst::ContractionJuMP{T}) where {T <: Float64} JuMP.@variable( model, polys[1:3], - PolyJuMP.Poly(PolyJuMP.MultivariateBases.FixedPolynomialBasis(lagrange_polys)) + PolyJuMP.Poly(PolyJuMP.MB.FixedPolynomialBasis(lagrange_polys)) ) M = [polys[1] polys[2]; polys[2] polys[3]] @@ -105,13 +105,13 @@ function get_lagrange_polys(pts::Matrix{T}, deg::Int) where {T <: Real} end # returns the multivariate Chebyshev polynomials in x up to degree deg -function get_chebyshev_polys(x::Vector{DP.PolyVar{true}}, deg::Int) +function get_chebyshev_polys(x::Vector{<:DP.Variable}, deg::Int) if deg > 8 @warn("get_chebyshev_polys is not numerically stable for large degree") end n = length(x) u = get_chebyshev_univ(x, deg) - V = Vector{DP.Polynomial{true, Int}}(undef, PolyUtils.get_L(n, deg)) + V = Vector(undef, PolyUtils.get_L(n, deg)) V[1] = DP.Monomial(1) col = 1 for t in 1:deg, xp in Combinatorics.multiexponents(n, t) @@ -124,14 +124,14 @@ function get_chebyshev_polys(x::Vector{DP.PolyVar{true}}, deg::Int) return V end -function get_chebyshev_univ(monovec::Vector{DP.PolyVar{true}}, deg::Int) +function get_chebyshev_univ(monovec::Vector{<:DP.Variable}, deg::Int) if deg > 8 @warn("get_chebyshev_univ is not numerically stable for large degree") end n = length(monovec) u = Vector{Vector}(undef, n) for j in 1:n - uj = u[j] = Vector{DP.Polynomial{true, Int}}(undef, deg + 1) + uj = u[j] = Vector(undef, deg + 1) uj[1] = DP.Monomial(1) uj[2] = monovec[j] for t in 3:(deg + 1) diff --git a/examples/convexityparameter/JuMP.jl b/examples/convexityparameter/JuMP.jl index ed0c2fbd4..b174ada8e 100644 --- a/examples/convexityparameter/JuMP.jl +++ b/examples/convexityparameter/JuMP.jl @@ -69,12 +69,12 @@ function test_extra(inst::ConvexityParameterJuMP{T}, model::JuMP.Model) where {T end # construct domain inequalities for SumOfSquares models from Hypatia domains -bss() = SAS.BasicSemialgebraicSet{Float64, DynamicPolynomials.Polynomial{true, Float64}}() +bss() = SAS.FullSpace() function get_domain_inequalities(dom::PolyUtils.BoxDomain, x) box = bss() for (xi, ui, li) in zip(x, dom.u, dom.l) - SAS.addinequality!(box, (-xi + ui) * (xi - li)) + SAS.add_inequality!(box, (-xi + ui) * (xi - li)) end return box end diff --git a/examples/semidefinitepoly/JuMP.jl b/examples/semidefinitepoly/JuMP.jl index 92bd1567c..30c51bbb8 100644 --- a/examples/semidefinitepoly/JuMP.jl +++ b/examples/semidefinitepoly/JuMP.jl @@ -15,7 +15,7 @@ import SumOfSquares import PolyJuMP struct SemidefinitePolyJuMP{T <: Real} <: ExampleInstanceJuMP{T} - x::Vector{<:DP.PolyVar} + x::Vector{<:DP.Variable} H::Matrix{<:DP.Polynomial} is_feas::Bool # whether model should be primal-dual feasible; only for testing use_wsosmatrix::Bool # use wsosinterppossemideftri cone, else PSD formulation @@ -23,7 +23,7 @@ struct SemidefinitePolyJuMP{T <: Real} <: ExampleInstanceJuMP{T} end function SemidefinitePolyJuMP{Float64}( - x::Vector{DP.PolyVar{true}}, + x::Vector{<:DP.Variable}, poly::DP.Polynomial, args..., )