Moment Program
MomentTools.MomentModel
MomentTools.constraint_moments
MomentTools.constraint_nneg
MomentTools.constraint_unitmass
MomentTools.constraint_zero
MomentTools.objective
MomentTools.objective_ncl
MomentTools.objective_tv
MomentTools.MomentModel
— FunctionConstruct the Moment Program in the variables X of order d. The moments of all monomials in X of degree 2*d are variables of the optimization program.
M = MomentModel(X,d; nu=k)
X
is the vector of variablesd
is the order of the moment relaxation.nu=k
is the number of Positive Moment Sequences
Constraints
MomentTools.constraint_zero
— Functionconstraint_zero(M, eqs ...)
Add to the moment program M
, the constraints $e \star \mu_i = 0$ for i in 1:M[:nu]
and e in eqs.
constraint_zero(M, i::Int, eqs ...)
Add to the moment program M
, the constraint $e \star \mu_i = 0$ for e in eqs.
constraint_zero(M, Eqs ...)
Add to the moment program M
, the constraints $\sum_{i=1}^{\nu} \mathbf{e}_{i} \star \mu_i =0$ for $\mathbf{e}$ in Eqs where Eqs is a sequence of vectors of $\nu$=M[:nu]
polynomials.
MomentTools.constraint_nneg
— Functionconstraint_nneg(M, eqs ...)
Add to the moment program M
, the constraints $e \star \mu_i \succeq 0$ for i in 1:M[:nu]
and e in eqs.
constraint_nneg(M, i::Int64, eqs ...)
Add to the moment program M
, the constraints $e \star \mu_i \succeq 0$ for e in eqs.
constraint_nneg(M, Eqs ...)
Add to the moment program M
, the constraints $\sum_{i=1}^{\nu} \mathbf{e}_{i} \star \mu_i \succeq 0$ for $\mathbf{e}$ in Eqs where Eqs is a sequence of vectors of $\nu$=M[:nu]
polynomials.
MomentTools.constraint_moments
— Functionconstraint_moments(M, [m => c, ...])
Add to the moment program M
, the constraints $\langle \mu_i, m \rangle - c = 0$ for i in 1:M[:nu]
and all pairs m=>c.
constraint_moments(M, [m => c, ...], p)
Add to the moment program M
, the constraints $\sum_{i=1}^{\nu}\langle {p}_{i} \star \mu_i, m\rangle - c = 0$ for all pairs m=>c, where p
is a vector of $\nu$=M[:nu]
polynomials.
MomentTools.constraint_unitmass
— Functionconstraint_unitmass(M, i::Int64, p)
Add to the moment program M
, the constraints $\langle {p} \star \mu_i, 1 \rangle - 1 = 0$ where p
is a polynomial.
constraint_unitmass(M, p)
Add to the moment program M
, the constraints $\langle {p}_i \star \mu_i, 1 \rangle - 1 = 0$ where p
is a vector of $\nu$=M[:nu]
polynomials.
Objective function
MomentTools.objective
— Functionobjective(M, p, sense="inf")
Set the "inf" or "sup" objective function to $\sum_{i=1}^{\nu} \langle p\star \mu_i, 1 \rangle$ where p
is a polynomial.
objective(M, p, sense="inf")
Set the "inf" or "sup" objective function to $\sum_{i=1}^{\nu} \langle p_{i} \star \mu_i, 1 \rangle$ where p
is a vector of $\nu$=M[:nu]
polynomials.
objective(M, i, p, sense="inf")
Set the "inf" or "sup" objective function to $\langle p \star \mu_i, 1 \rangle$ where p
is a polynomial.
Add as objective function the linear functional associated to the polynomial pol to minimize.
MomentTools.objective_tv
— Functionobjective_ncl(M)
Set the objective function of moment program to the total variation of the moment sequences $\mu_i$, that is the sum of the unit mass of the positive moment sequences $\sum_{i=1}^{\nu} \langle \mu_i, 1\rangle$.
MomentTools.objective_ncl
— Functionobjective_ncl(M)
Set the objective function of moment program to the nuclear norm or equivalently the sum of the traces of the moment matrices.