Moment Program

MomentTools.MomentModelFunction

Construct 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 variables
  • d is the order of the moment relaxation.
  • nu=k is the number of Positive Moment Sequences

Constraints

MomentTools.constraint_zeroFunction
constraint_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_nnegFunction
constraint_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_momentsFunction
constraint_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_unitmassFunction
constraint_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.objectiveFunction
objective(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_tvFunction
objective_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_nclFunction
objective_ncl(M)

Set the objective function of moment program to the nuclear norm or equivalently the sum of the traces of the moment matrices.