Constraints

Attributes

PolyJuMP.MomentsAttributeType
MomentsAttribute(result_index)
MomentsAttribute()

A constraint attribute for the vector of moments corresponding to the constraint that a polynomial is zero in the full space in result N. If the polynomial is constrained to be zero in an algebraic set, it is the moments for the constraint once it is rewritten into an constraint on the full space. If N is omitted, it is 1 by default.

Examples

Consider the following program:

@variable(model, α)
@variable(model, β ≤ 1)

using DynamicPolynomials
@polyvar x y
cref = @constraint(model, α * x - β * y == 0, domain = @set x == y)

The constraint is equivalent to

@constraint(model, (α - β) * y == 0)

for which the dual is the 1-element vector with the moment of y of value -1. This is the result of moments(cref). However, the dual of cref obtained by dual(cref) is the 2-elements vector with both the moments of x and y of value -1.

source
SumOfSquares.GramMatrixType
struct GramMatrix{T, B, U, MT <: AbstractMatrix{T}} <: AbstractGramMatrix{T, B, U}
    Q::MT
    basis::B
end

Gram matrix $x^\top Q x$ where Q is a symmetric matrix indexed by the vector of polynomials of the basis basis.

source
SumOfSquares.GramMatrixAttributeType
GramMatrixAttribute(
    multiplier_index::Int = 0,
    result_index::Int = 1,
)

A constraint attribute for the GramMatrix of the multiplier_indexth Sum-of-Squares polynomial $s_i(x)$ where $i$ is multiplier_index of the certificate:

\[p(x) = s_0(x) + w_1(x) s_1(x) + \cdots + w_m(x) s_m(x)\]

The gram matrix of a Sum-of-Squares polynomial $s_i(x)$ is the the positive semidefinite matrix $Q$ such that $s_i(x) = b_i(x)^\top Q b_i(x)$ where $b_i(x)$ is the gram basis.

source
SumOfSquares.gram_operateFunction
gram_operate(::typeof(+), p::GramMatrix, q::GramMatrix)

Computes the Gram matrix equal to the sum between p and q. On the opposite, p + q gives a polynomial equal to p + q. The polynomial p + q can also be obtained by polynomial(gram_operate(+, p, q)).

source
gram_operate(/, p::GramMatrix, α)

Computes the Gram matrix equal to p / α. On the opposite, p / α gives a polynomial equal to p / α. The polynomial p / α can also be obtained by polynomial(gram_operate(/, p, α)).

source
SumOfSquares.MomentMatrixAttributeType
MomentMatrixAttribute(
    multiplier_index::Int = 0,
    result_index::Int = 1,
)

A constraint attribute for the MomentMatrix of the multiplier_indexth Sum-of-Squares polynomial $s_i(x)$ where $i$ is multiplier_index of the certificate:

\[p(x) = s_0(x) + w_1(x) s_1(x) + \cdots + w_m(x) s_m(x)\]

It corresponds to the dual of the Sum-of-Squares constraint for the constraint for $s_i(x)$ to be a Sum-of-Squares.

source
SumOfSquares.LagrangianMultipliersType
LagrangianMultipliers(result_index::Int)
LagrangianMultipliers()

A constraint attribute fot the LagrangianMultipliers associated to the inequalities of the domain of a constraint. There is one multiplier per inequality and no multiplier for equalities as the equalities are handled by reducing the polynomials over the ideal they generate instead of explicitely creating multipliers.

source
SumOfSquares.MultiplierIndexBoundsErrorType
struct MultiplierIndexBoundsError{AttrType} <: Exception
    attr::AttrType
    range::UnitRange{Int}
end

An error indicating that the requested attribute attr could not be retrieved, because the multiplier index is out of the range of valid indices.

source

SAGE decomposition attribute: