15.3 Functions in alphabetical order

MSK_analyzenames
MSKrescodee (MSKAPI MSK_analyzenames) (
  MSKtask_t task,
  MSKstreamtypee whichstream,
  MSKnametypee nametype)

The function analyzes the names and issues an error if a name is invalid.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichstream (MSKstreamtypee) – Index of the stream. (input)

  • nametype (MSKnametypee) – The type of names e.g. valid in MPS or LP files. (input)

Return

(MSKrescodee) – The function response code.

Groups

Names

MSK_analyzeproblem
MSKrescodee (MSKAPI MSK_analyzeproblem) (
  MSKtask_t task,
  MSKstreamtypee whichstream)

The function analyzes the data of a task and writes out a report.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task

MSK_analyzesolution
MSKrescodee (MSKAPI MSK_analyzesolution) (
  MSKtask_t task,
  MSKstreamtypee whichstream,
  MSKsoltypee whichsol)

Print information related to the quality of the solution and other solution statistics.

By default this function prints information about the largest infeasibilites in the solution, the primal (and possibly dual) objective value and the solution status.

Following parameters can be used to configure the printed statistics:

  • MSK_IPAR_ANA_SOL_BASIS enables or disables printing of statistics specific to the basis solution (condition number, number of basic variables etc.). Default is on.

  • MSK_IPAR_ANA_SOL_PRINT_VIOLATED enables or disables listing names of all constraints (both primal and dual) which are violated by the solution. Default is off.

  • MSK_DPAR_ANA_SOL_INFEAS_TOL is the tolerance defining when a constraint is considered violated. If a constraint is violated more than this, it will be listed in the summary.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution information, Inspecting the task

MSK_appendacc
MSKrescodee (MSKAPI MSK_appendacc) (
  MSKtask_t task,
  MSKint64t domidx,
  MSKint64t numafeidx,
  const MSKint64t * afeidxlist,
  const MSKrealt * b)

Appends an affine conic constraint to the task. The affine constraint has the form a sequence of affine expressions belongs to a domain.

The domain index is specified with domidx and should refer to a domain previously appended with one of the append...domain functions.

The length of the affine expression list afeidxlist must be equal to the dimension \(n\) of the domain. The elements of afeidxlist are indexes to the store of affine expressions, i.e. the affine expressions appearing in the affine conic constraint are:

\[F_{\mathrm{afeidxlist}[k],:}x + g_{\mathrm{afeidxlist}[k]} \quad \mathrm{for}\ k=0,\ldots,n-1.\]

If an optional vector b of the same length as afeidxlist is specified then the expressions appearing in the affine constraint will instead be taken as:

\[F_{\mathrm{afeidxlist}[k],:}x + g_{\mathrm{afeidxlist}[k]} - b_k \quad \mathrm{for}\ k=0,\ldots,n-1.\]
Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • domidx (MSKint64t) – Domain index. (input)

  • numafeidx (MSKint64t) – Number of affine expressions in the affine expression list (must equal the dimension of the domain). (input)

  • afeidxlist (MSKint64t*) – List of affine expression indexes. (input)

  • b (MSKrealt*) – The vector of constant terms added to affine expressions. Optional, can be NULL. (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine conic constraints

MSK_appendaccs
MSKrescodee (MSKAPI MSK_appendaccs) (
  MSKtask_t task,
  MSKint64t numaccs,
  const MSKint64t * domidxs,
  MSKint64t numafeidx,
  const MSKint64t * afeidxlist,
  const MSKrealt * b)

Appends numaccs affine conic constraint to the task. Each single affine conic constraint should be specified as in MSK_appendacc and the input of this function should contain the concatenation of all these descriptions.

In particular, the length of afeidxlist must equal the sum of dimensions of domains indexed in domainsidxs.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • numaccs (MSKint64t) – The number of affine conic constraints to append. (input)

  • domidxs (MSKint64t*) – Domain indices. (input)

  • numafeidx (MSKint64t) – Number of affine expressions in the affine expression list (must equal the sum of dimensions of the domains). (input)

  • afeidxlist (MSKint64t*) – List of affine expression indexes. (input)

  • b (MSKrealt*) – The vector of constant terms added to affine expressions. Optional, can be NULL. (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine conic constraints

MSK_appendaccseq
MSKrescodee (MSKAPI MSK_appendaccseq) (
  MSKtask_t task,
  MSKint64t domidx,
  MSKint64t numafeidx,
  MSKint64t afeidxfirst,
  const MSKrealt * b)

Appends an affine conic constraint to the task, as in MSK_appendacc. The function assumes the affine expressions forming the constraint are sequential. The affine constraint has the form a sequence of affine expressions belongs to a domain.

The domain index is specified with domidx and should refer to a domain previously appended with one of the append...domain functions.

The number of affine expressions should be equal to the dimension \(n\) of the domain. The affine expressions forming the affine constraint are arranged sequentially in a contiguous block of the affine expression store starting from position afeidxfirst. That is, the affine expressions appearing in the affine conic constraint are:

\[F_{\mathrm{afeidxfirst}+k,:}x + g_{\mathrm{afeidxfirst}+k} \quad \mathrm{for}\ k=0,\ldots,n-1.\]

If an optional vector b of length numafeidx is specified then the expressions appearing in the affine constraint will instead be taken as

\[F_{\mathrm{afeidxfirst}+k,:}x + g_{\mathrm{afeidxfirst}+k} - b_k \quad \mathrm{for}\ k=0,\ldots,n-1.\]
Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • domidx (MSKint64t) – Domain index. (input)

  • numafeidx (MSKint64t) – Number of affine expressions in the affine expression list (must equal the dimension of the domain). (input)

  • afeidxfirst (MSKint64t) – Index of the first affine expression. (input)

  • b (MSKrealt*) – The vector of constant terms added to affine expressions. Optional, can be NULL. (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine conic constraints

MSK_appendaccsseq
MSKrescodee (MSKAPI MSK_appendaccsseq) (
  MSKtask_t task,
  MSKint64t numaccs,
  const MSKint64t * domidxs,
  MSKint64t numafeidx,
  MSKint64t afeidxfirst,
  const MSKrealt * b)

Appends numaccs affine conic constraint to the task. It is the block variant of MSK_appendaccs, that is it assumes that the affine expressions appearing in the affine conic constraints are sequential in the affine expression store, starting from position afeidxfirst.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • numaccs (MSKint64t) – The number of affine conic constraints to append. (input)

  • domidxs (MSKint64t*) – Domain indices. (input)

  • numafeidx (MSKint64t) – Number of affine expressions in the affine expression list (must equal the sum of dimensions of the domains). (input)

  • afeidxfirst (MSKint64t) – Index of the first affine expression. (input)

  • b (MSKrealt*) – The vector of constant terms added to affine expressions. Optional, can be NULL. (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine conic constraints

MSK_appendafes
MSKrescodee (MSKAPI MSK_appendafes) (
  MSKtask_t task,
  MSKint64t num)

Appends a number of empty affine expressions to the task.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • num (MSKint64t) – Number of empty affine expressions which should be appended. (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions

MSK_appendbarvars
MSKrescodee (MSKAPI MSK_appendbarvars) (
  MSKtask_t task,
  MSKint32t num,
  const MSKint32t * dim)

Appends positive semidefinite matrix variables of dimensions given by dim to the problem.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • num (MSKint32t) – Number of symmetric matrix variables to be appended. (input)

  • dim (MSKint32t*) – Dimensions of symmetric matrix variables to be added. (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite

MSK_appendcone Deprecated
MSKrescodee (MSKAPI MSK_appendcone) (
  MSKtask_t task,
  MSKconetypee ct,
  MSKrealt conepar,
  MSKint32t nummem,
  const MSKint32t * submem)

NOTE: This interface to conic optimization is deprecated and will be removed in a future major release. Conic problems should be specified using the affine conic constraints interface (ACC), see Sec. 6.2 (From Linear to Conic Optimization) for details.

Appends a new conic constraint to the problem. Hence, add a constraint

\[\hat{x} \in \K\]

to the problem, where \(\K\) is a convex cone. \(\hat{x}\) is a subset of the variables which will be specified by the argument submem. Cone type is specified by ct.

Define

\[\hat{x} = x_{\mathtt{submem}[0]},\ldots,x_{\mathtt{submem}[\mathtt{nummem}-1]}.\]

Depending on the value of ct this function appends one of the constraints:

  • Quadratic cone (MSK_CT_QUAD, requires \(\mathtt{nummem}\geq 1\)):

    \[\hat{x}_0 \geq \sqrt{\sum_{i=1}^{i<\mathtt{nummem}} \hat{x}_i^2}\]
  • Rotated quadratic cone (MSK_CT_RQUAD, requires \(\mathtt{nummem}\geq 2\)):

    \[2 \hat{x}_0 \hat{x}_1 \geq \sum_{i=2}^{i<\mathtt{nummem}} \hat{x}^2_i, \quad \hat{x}_{0}, \hat{x}_1 \geq 0\]
  • Primal exponential cone (MSK_CT_PEXP, requires \(\mathtt{nummem}=3\)):

    \[\hat{x}_0 \geq \hat{x}_1\exp(\hat{x}_2/\hat{x}_1), \quad \hat{x}_0,\hat{x}_1 \geq 0\]
  • Primal power cone (MSK_CT_PPOW, requires \(\mathtt{nummem}\geq 2\)):

    \[\hat{x}_0^\alpha \hat{x}_1^{1-\alpha} \geq \sqrt{\sum_{i=2}^{i<\mathtt{nummem}} \hat{x}^2_i}, \quad \hat{x}_{0}, \hat{x}_1 \geq 0\]

    where \(\alpha\) is the cone parameter specified by conepar.

  • Dual exponential cone (MSK_CT_DEXP, requires \(\mathtt{nummem}=3\)):

    \[\hat{x}_0 \geq -\hat{x}_2 e^{-1}\exp(\hat{x}_1/\hat{x}_2), \quad \hat{x}_2\leq 0,\hat{x}_0 \geq 0\]
  • Dual power cone (MSK_CT_DPOW, requires \(\mathtt{nummem}\geq 2\)):

    \[\left(\frac{\hat{x}_0}{\alpha}\right)^\alpha \left(\frac{\hat{x}_1}{1-\alpha}\right)^{1-\alpha} \geq \sqrt{\sum_{i=2}^{i<\mathtt{nummem}} \hat{x}^2_i}, \quad \hat{x}_{0}, \hat{x}_1 \geq 0\]

    where \(\alpha\) is the cone parameter specified by conepar.

  • Zero cone (MSK_CT_ZERO):

    \[\hat{x}_i = 0 \ \textrm{for all}\ i\]

Please note that the sets of variables appearing in different conic constraints must be disjoint.

For an explained code example see Sec. 6.3 (Conic Quadratic Optimization), Sec. 6.5 (Conic Exponential Optimization) or Sec. 6.4 (Power Cone Optimization).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • ct (MSKconetypee) – Specifies the type of the cone. (input)

  • conepar (MSKrealt) – For the power cone it denotes the exponent alpha. For other cone types it is unused and can be set to 0. (input)

  • nummem (MSKint32t) – Number of member variables in the cone. (input)

  • submem (MSKint32t*) – Variable subscripts of the members in the cone. (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - cones (deprecated)

MSK_appendconeseq Deprecated
MSKrescodee (MSKAPI MSK_appendconeseq) (
  MSKtask_t task,
  MSKconetypee ct,
  MSKrealt conepar,
  MSKint32t nummem,
  MSKint32t j)

NOTE: This interface to conic optimization is deprecated and will be removed in a future major release. Conic problems should be specified using the affine conic constraints interface (ACC), see Sec. 6.2 (From Linear to Conic Optimization) for details.

Appends a new conic constraint to the problem, as in MSK_appendcone. The function assumes the members of cone are sequential where the first member has index j and the last j+nummem-1.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • ct (MSKconetypee) – Specifies the type of the cone. (input)

  • conepar (MSKrealt) – For the power cone it denotes the exponent alpha. For other cone types it is unused and can be set to 0. (input)

  • nummem (MSKint32t) – Number of member variables in the cone. (input)

  • j (MSKint32t) – Index of the first variable in the conic constraint. (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - cones (deprecated)

MSK_appendconesseq Deprecated
MSKrescodee (MSKAPI MSK_appendconesseq) (
  MSKtask_t task,
  MSKint32t num,
  const MSKconetypee * ct,
  const MSKrealt * conepar,
  const MSKint32t * nummem,
  MSKint32t j)

NOTE: This interface to conic optimization is deprecated and will be removed in a future major release. Conic problems should be specified using the affine conic constraints interface (ACC), see Sec. 6.2 (From Linear to Conic Optimization) for details.

Appends a number of conic constraints to the problem, as in MSK_appendcone. The \(k\)th cone is assumed to be of dimension nummem[k]. Moreover, it is assumed that the first variable of the first cone has index \(j\) and starting from there the sequentially following variables belong to the first cone, then to the second cone and so on.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • num (MSKint32t) – Number of cones to be added. (input)

  • ct (MSKconetypee*) – Specifies the type of the cone. (input)

  • conepar (MSKrealt*) – For the power cone it denotes the exponent alpha. For other cone types it is unused and can be set to 0. (input)

  • nummem (MSKint32t*) – Numbers of member variables in the cones. (input)

  • j (MSKint32t) – Index of the first variable in the first cone to be appended. (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - cones (deprecated)

MSK_appendcons
MSKrescodee (MSKAPI MSK_appendcons) (
  MSKtask_t task,
  MSKint32t num)

Appends a number of constraints to the model. Appended constraints will be declared free. Please note that MOSEK will automatically expand the problem dimension to accommodate the additional constraints.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • num (MSKint32t) – Number of constraints which should be appended. (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Problem data - constraints

MSK_appenddjcs
MSKrescodee (MSKAPI MSK_appenddjcs) (
  MSKtask_t task,
  MSKint64t num)

Appends a number of empty disjunctive constraints to the task.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • num (MSKint64t) – Number of empty disjunctive constraints which should be appended. (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - disjunctive constraints

MSK_appenddualexpconedomain
MSKrescodee (MSKAPI MSK_appenddualexpconedomain) (
  MSKtask_t task,
  MSKint64t * domidx)

Appends the dual exponential cone \(\left\{ x\in \real^3 ~:~ x_0 \geq -x_2 e^{-1} e^{x_1/x_2},\ x_0> 0,\ x_2< 0 \right\}\) to the list of domains.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain

MSK_appenddualgeomeanconedomain
MSKrescodee (MSKAPI MSK_appenddualgeomeanconedomain) (
  MSKtask_t task,
  MSKint64t n,
  MSKint64t * domidx)

Appends the dual geometric mean cone \(\left\{ x\in \real^n ~:~ (n-1) \left(\prod_{i=0}^{n-2} x_i\right)^{1/(n-1)} \geq |x_{n-1}|,\ x_0,\ldots,x_{n-2}\geq 0 \right\}\) to the list of domains.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain

MSK_appenddualpowerconedomain
MSKrescodee (MSKAPI MSK_appenddualpowerconedomain) (
  MSKtask_t task,
  MSKint64t n,
  MSKint64t nleft,
  const MSKrealt * alpha,
  MSKint64t * domidx)

Appends the dual power cone domain of dimension \(n\), with \(n_\ell\) variables appearing on the left-hand side, where \(n_\ell\) is the length of \(\alpha\), and with a homogenous sequence of exponents \(\alpha_0,\ldots,\alpha_{n_\ell-1}\).

Formally, let \(s = \sum_i \alpha_i\) and \(\beta_i = \alpha_i / s\), so that \(\sum_i \beta_i=1\). Then the dual power cone is defined as follows:

\[\left\{ x\in \real^n ~:~ \prod_{i=0}^{n_\ell-1} \left(\frac{x_i}{\beta_i}\right)^{\beta_i} \geq \sqrt{\sum_{j=n_\ell}^{n-1}x_j^2},\ x_0\ldots,x_{n_\ell-1}\geq 0 \right\}\]
Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • n (MSKint64t) – Dimension of the domain. (input)

  • nleft (MSKint64t) – Number of variables on the left hand side. (input)

  • alpha (MSKrealt*) – The sequence proportional to exponents. Must be positive. (input)

  • domidx (MSKint64t by reference) – Index of the domain. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain

MSK_appendprimalexpconedomain
MSKrescodee (MSKAPI MSK_appendprimalexpconedomain) (
  MSKtask_t task,
  MSKint64t * domidx)

Appends the primal exponential cone \(\left\{ x\in \real^3 ~:~ x_0 \geq x_1 e^{x_2/x_1},\ x_0,x_1> 0 \right\}\) to the list of domains.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain

MSK_appendprimalgeomeanconedomain
MSKrescodee (MSKAPI MSK_appendprimalgeomeanconedomain) (
  MSKtask_t task,
  MSKint64t n,
  MSKint64t * domidx)

Appends the primal geometric mean cone \(\left\{ x\in \real^n ~:~ \left(\prod_{i=0}^{n-2} x_i\right)^{1/(n-1)} \geq |x_{n-1}|,\ x_0\ldots,x_{n-2}\geq 0 \right\}\) to the list of domains.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain

MSK_appendprimalpowerconedomain
MSKrescodee (MSKAPI MSK_appendprimalpowerconedomain) (
  MSKtask_t task,
  MSKint64t n,
  MSKint64t nleft,
  const MSKrealt * alpha,
  MSKint64t * domidx)

Appends the primal power cone domain of dimension \(n\), with \(n_\ell\) variables appearing on the left-hand side, where \(n_\ell\) is the length of \(\alpha\), and with a homogenous sequence of exponents \(\alpha_0,\ldots,\alpha_{n_\ell-1}\).

Formally, let \(s = \sum_i \alpha_i\) and \(\beta_i = \alpha_i / s\), so that \(\sum_i \beta_i=1\). Then the primal power cone is defined as follows:

\[\left\{ x\in \real^n ~:~ \prod_{i=0}^{n_\ell-1} x_i^{\beta_i} \geq \sqrt{\sum_{j=n_\ell}^{n-1}x_j^2},\ x_0\ldots,x_{n_\ell-1}\geq 0 \right\}\]
Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • n (MSKint64t) – Dimension of the domain. (input)

  • nleft (MSKint64t) – Number of variables on the left hand side. (input)

  • alpha (MSKrealt*) – The sequence proportional to exponents. Must be positive. (input)

  • domidx (MSKint64t by reference) – Index of the domain. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain

MSK_appendquadraticconedomain
MSKrescodee (MSKAPI MSK_appendquadraticconedomain) (
  MSKtask_t task,
  MSKint64t n,
  MSKint64t * domidx)

Appends the \(n\)-dimensional quadratic cone \(\left\{x\in\real^n~:~x_0 \geq \sqrt{\sum_{i=1}^{n-1} x_i^2}\right\}\) to the list of domains.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain

MSK_appendrdomain
MSKrescodee (MSKAPI MSK_appendrdomain) (
  MSKtask_t task,
  MSKint64t n,
  MSKint64t * domidx)

Appends the \(n\)-dimensional real space \(\{ x \in \real^n \}\) to the list of domains.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain

MSK_appendrminusdomain
MSKrescodee (MSKAPI MSK_appendrminusdomain) (
  MSKtask_t task,
  MSKint64t n,
  MSKint64t * domidx)

Appends the \(n\)-dimensional negative orthant \(\{ x \in \real^n: \, x \leq 0 \}\) to the list of domains.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain

MSK_appendrplusdomain
MSKrescodee (MSKAPI MSK_appendrplusdomain) (
  MSKtask_t task,
  MSKint64t n,
  MSKint64t * domidx)

Appends the \(n\)-dimensional positive orthant \(\{ x \in \real^n: \, x \geq 0 \}\) to the list of domains.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain

MSK_appendrquadraticconedomain
MSKrescodee (MSKAPI MSK_appendrquadraticconedomain) (
  MSKtask_t task,
  MSKint64t n,
  MSKint64t * domidx)

Appends the \(n\)-dimensional rotated quadratic cone \(\left\{x\in\real^n~:~2 x_0 x_1 \geq \sum_{i=2}^{n-1} x_i^2,\ x_0,x_1\geq 0\right\}\) to the list of domains.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain

MSK_appendrzerodomain
MSKrescodee (MSKAPI MSK_appendrzerodomain) (
  MSKtask_t task,
  MSKint64t n,
  MSKint64t * domidx)

Appends the zero in \(n\)-dimensional real space \(\{ x \in \real^n: \, x = 0 \}\) to the list of domains.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain

MSK_appendsparsesymmat
MSKrescodee (MSKAPI MSK_appendsparsesymmat) (
  MSKtask_t task,
  MSKint32t dim,
  MSKint64t nz,
  const MSKint32t * subi,
  const MSKint32t * subj,
  const MSKrealt * valij,
  MSKint64t * idx)

MOSEK maintains a storage of symmetric data matrices that is used to build \(\barC\) and \(\barA\). The storage can be thought of as a vector of symmetric matrices denoted \(E\). Hence, \(E_i\) is a symmetric matrix of certain dimension.

This function appends a general sparse symmetric matrix on triplet form to the vector \(E\) of symmetric matrices. The vectors subi, subj, and valij contains the row subscripts, column subscripts and values of each element in the symmetric matrix to be appended. Since the matrix that is appended is symmetric, only the lower triangular part should be specified. Moreover, duplicates are not allowed.

Observe the function reports the index (position) of the appended matrix in \(E\). This index should be used for later references to the appended matrix.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • dim (MSKint32t) – Dimension of the symmetric matrix that is appended. (input)

  • nz (MSKint64t) – Number of triplets. (input)

  • subi (MSKint32t*) – Row subscript in the triplets. (input)

  • subj (MSKint32t*) – Column subscripts in the triplets. (input)

  • valij (MSKrealt*) – Values of each triplet. (input)

  • idx (MSKint64t by reference) – Unique index assigned to the inputted matrix that can be used for later reference. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite

MSK_appendsparsesymmatlist
MSKrescodee (MSKAPI MSK_appendsparsesymmatlist) (
  MSKtask_t task,
  MSKint32t num,
  const MSKint32t * dims,
  const MSKint64t * nz,
  const MSKint32t * subi,
  const MSKint32t * subj,
  const MSKrealt * valij,
  MSKint64t * idx)

MOSEK maintains a storage of symmetric data matrices that is used to build \(\barC\) and \(\barA\). The storage can be thought of as a vector of symmetric matrices denoted \(E\). Hence, \(E_i\) is a symmetric matrix of certain dimension.

This function appends general sparse symmetric matrixes on triplet form to the vector \(E\) of symmetric matrices. The vectors subi, subj, and valij contains the row subscripts, column subscripts and values of each element in the symmetric matrix to be appended. Since the matrix that is appended is symmetric, only the lower triangular part should be specified. Moreover, duplicates are not allowed.

Observe the function reports the index (position) of the appended matrix in \(E\). This index should be used for later references to the appended matrix.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • num (MSKint32t) – Number of matrixes to append. (input)

  • dims (MSKint32t*) – Dimensions of the symmetric matrixes. (input)

  • nz (MSKint64t*) – Number of nonzeros for each matrix. (input)

  • subi (MSKint32t*) – Row subscript in the triplets. (input)

  • subj (MSKint32t*) – Column subscripts in the triplets. (input)

  • valij (MSKrealt*) – Values of each triplet. (input)

  • idx (MSKint64t*) – Unique index assigned to the inputted matrix that can be used for later reference. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite

MSK_appendsvecpsdconedomain
MSKrescodee (MSKAPI MSK_appendsvecpsdconedomain) (
  MSKtask_t task,
  MSKint64t n,
  MSKint64t * domidx)

Appends the domain consisting of vectors of length \(n=d(d+1)/2\) defined as follows

\[\{(x_1,\ldots,x_{d(d+1)/2})\in \real^n~:~ \mathrm{sMat}(x)\in\PSD^d\} = \{\mathrm{sVec}(X)~:~X\in\PSD^d\},\]

where

\[\mathrm{sVec}(X) = (X_{11},\sqrt{2}X_{21},\ldots,\sqrt{2}X_{d1},X_{22},\sqrt{2}X_{32},\ldots,X_{dd}),\]

and

\[\begin{split}\mathrm{sMat}(x) = \left[\begin{array}{cccc}x_1 & x_2/\sqrt{2} & \cdots & x_{d}/\sqrt{2} \\ x_2/\sqrt{2} & x_{d+1} & \cdots & x_{2d-1}/\sqrt{2} \\ \cdots & \cdots & \cdots & \cdots \\ x_{d}/\sqrt{2} & x_{2d-1}/\sqrt{2} & \cdots & x_{d(d+1)/2}\end{array}\right].\end{split}\]

In other words, the domain consists of vectorizations of the lower-triangular part of a positive semidefinite matrix, with the non-diagonal elements additionally rescaled.

This domain is a self-dual cone.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • n (MSKint64t) – Dimension of the domain, must be of the form \(d(d+1)/2\). (input)

  • domidx (MSKint64t by reference) – Index of the domain. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain

MSK_appendvars
MSKrescodee (MSKAPI MSK_appendvars) (
  MSKtask_t task,
  MSKint32t num)

Appends a number of variables to the model. Appended variables will be fixed at zero. Please note that MOSEK will automatically expand the problem dimension to accommodate the additional variables.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • num (MSKint32t) – Number of variables which should be appended. (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Problem data - variables

MSK_asyncgetresult
MSKrescodee (MSKAPI MSK_asyncgetresult) (
  MSKtask_t task,
  const char * address,
  const char * accesstoken,
  const char * token,
  MSKbooleant * respavailable,
  MSKrescodee * resp,
  MSKrescodee * trm)

Request a solution from a remote job identified by the argument token. For other arguments see MSK_asyncoptimize. If the solution is available it will be retrieved and loaded into the local task.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • address (char*) – Address of the OptServer. (input)

  • accesstoken (char*) – Access token. (input)

  • token (char*) – The task token. (input)

  • respavailable (MSKbooleant by reference) – Indicates if a remote response is available. If this is not true, resp and trm should be ignored. (output)

  • resp (MSKrescodee by reference) – Is the response code from the remote solver. (output)

  • trm (MSKrescodee by reference) – Is either MSK_RES_OK or a termination response code. (output)

Return

(MSKrescodee) – The function response code.

Groups

Remote optimization

MSK_asyncoptimize
MSKrescodee (MSKAPI MSK_asyncoptimize) (
  MSKtask_t task,
  const char * address,
  const char * accesstoken,
  char * token)

Offload the optimization task to an instance of OptServer specified by addr, which should be a valid URL, for example http://server:port or https://server:port. The call will exit immediately.

If the server requires authentication, the authentication token can be passed in the accesstoken argument.

If the server requires encryption, the keys can be passed using one of the solver parameters MSK_SPAR_REMOTE_TLS_CERT or MSK_SPAR_REMOTE_TLS_CERT_PATH.

The function returns a token which should be used in future calls to identify the task.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • address (char*) – Address of the OptServer. (input)

  • accesstoken (char*) – Access token. (input)

  • token (char*) – Returns the task token. (output)

Return

(MSKrescodee) – The function response code.

Groups

Remote optimization

MSK_asyncpoll
MSKrescodee (MSKAPI MSK_asyncpoll) (
  MSKtask_t task,
  const char * address,
  const char * accesstoken,
  const char * token,
  MSKbooleant * respavailable,
  MSKrescodee * resp,
  MSKrescodee * trm)

Requests information about the status of the remote job identified by the argument token. For other arguments see MSK_asyncoptimize.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • address (char*) – Address of the OptServer. (input)

  • accesstoken (char*) – Access token. (input)

  • token (char*) – The task token. (input)

  • respavailable (MSKbooleant by reference) – Indicates if a remote response is available. If this is not true, resp and trm should be ignored. (output)

  • resp (MSKrescodee by reference) – Is the response code from the remote solver. (output)

  • trm (MSKrescodee by reference) – Is either MSK_RES_OK or a termination response code. (output)

Return

(MSKrescodee) – The function response code.

Groups

Remote optimization

MSK_asyncstop
MSKrescodee (MSKAPI MSK_asyncstop) (
  MSKtask_t task,
  const char * address,
  const char * accesstoken,
  const char * token)

Request that the remote job identified by token is terminated. For other arguments see MSK_asyncoptimize.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • address (char*) – Address of the OptServer. (input)

  • accesstoken (char*) – Access token. (input)

  • token (char*) – The task token. (input)

Return

(MSKrescodee) – The function response code.

Groups

Remote optimization

MSK_axpy
MSKrescodee (MSKAPI MSK_axpy) (
  MSKenv_t env,
  MSKint32t n,
  MSKrealt alpha,
  const MSKrealt * x,
  MSKrealt * y)

Adds \(\alpha x\) to \(y\), i.e. performs the update

\[y := \alpha x + y.\]

Note that the result is stored overwriting \(y\). It must not overlap with the other input arrays.

Parameters
  • env (MSKenv_t) – The MOSEK environment. (input)

  • n (MSKint32t) – Length of the vectors. (input)

  • alpha (MSKrealt) – The scalar that multiplies \(x\). (input)

  • x (MSKrealt*) – The \(x\) vector. (input)

  • y (MSKrealt*) – The \(y\) vector. (input/output)

Return

(MSKrescodee) – The function response code.

Groups

Linear algebra

MSK_basiscond
MSKrescodee (MSKAPI MSK_basiscond) (
  MSKtask_t task,
  MSKrealt * nrmbasis,
  MSKrealt * nrminvbasis)

If a basic solution is available and it defines a nonsingular basis, then this function computes the 1-norm estimate of the basis matrix and a 1-norm estimate for the inverse of the basis matrix. The 1-norm estimates are computed using the method outlined in [Ste98], pp. 388-391.

By definition the 1-norm condition number of a matrix \(B\) is defined as

\[\kappa_1(B) := \|B\|_1 \|B^{-1}\|_1.\]

Moreover, the larger the condition number is the harder it is to solve linear equation systems involving \(B\). Given estimates for \(\|B\|_1\) and \(\|B^{-1}\|_1\) it is also possible to estimate \(\kappa_1(B)\).

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solving systems with basis matrix

MSK_bktostr
MSKrescodee (MSKAPI MSK_bktostr) (
  MSKtask_t task,
  MSKboundkeye bk,
  char * str)

Obtains an identifier string corresponding to a bound key.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • bk (MSKboundkeye) – Bound key. (input)

  • str (char*) – String corresponding to the bound key code bk. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names

MSK_callbackcodetostr
MSKrescodee (MSKAPI MSK_callbackcodetostr) (
  MSKcallbackcodee code,
  char * callbackcodestr)

Obtains the string representation of a callback code.

Parameters
  • code (MSKcallbackcodee) – A callback code. (input)

  • callbackcodestr (char*) – String corresponding to the callback code. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names

MSK_callocdbgenv
void * (MSKAPI MSK_callocdbgenv) (
  MSKenv_t env,
  const size_t number,
  const size_t size,
  const char * file,
  const unsigned line)

Debug version of MSK_callocenv.

Parameters
  • env (MSKenv_t) – The MOSEK environment. (input)

  • number (size_t) – Number of elements. (input)

  • size (size_t) – Size of each individual element. (input)

  • file (char*) – File from which the function is called. (input)

  • line (unsigned) – Line in the file from which the function is called. (input)

Return

(void*) – A pointer to the memory allocated through the environment.

Groups

System, memory and debugging

MSK_callocdbgtask
void * (MSKAPI MSK_callocdbgtask) (
  MSKtask_t task,
  const size_t number,
  const size_t size,
  const char * file,
  const unsigned line)

Debug version of MSK_calloctask.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • number (size_t) – Number of elements. (input)

  • size (size_t) – Size of each individual element. (input)

  • file (char*) – File from which the function is called. (input)

  • line (unsigned) – Line in the file from which the function is called. (input)

Return

(void*) – A pointer to the memory allocated through the task.

Groups

System, memory and debugging

MSK_callocenv
void * (MSKAPI MSK_callocenv) (
  MSKenv_t env,
  const size_t number,
  const size_t size)

Equivalent to calloc i.e. allocate space for an array of length number where each element is of size size.

Parameters
  • env (MSKenv_t) – The MOSEK environment. (input)

  • number (size_t) – Number of elements. (input)

  • size (size_t) – Size of each individual element. (input)

Return

(void*) – A pointer to the memory allocated through the environment.

Groups

System, memory and debugging

MSK_calloctask
void * (MSKAPI MSK_calloctask) (
  MSKtask_t task,
  const size_t number,
  const size_t size)

Equivalent to calloc i.e. allocate space for an array of length number where each element is of size size.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • number (size_t) – Number of elements. (input)

  • size (size_t) – Size of each individual element. (input)

Return

(void*) – A pointer to the memory allocated through the task.

Groups

System, memory and debugging

MSK_checkinall
MSKrescodee (MSKAPI MSK_checkinall) (
  MSKenv_t env)

Check in all unused license features to the license token server.

Parameters

env (MSKenv_t) – The MOSEK environment. (input)

Return

(MSKrescodee) – The function response code.

Groups

License system

MSK_checkinlicense
MSKrescodee (MSKAPI MSK_checkinlicense) (
  MSKenv_t env,
  MSKfeaturee feature)

Check in a license feature to the license server. By default all licenses consumed by functions using a single environment are kept checked out for the lifetime of the MOSEK environment. This function checks in a given license feature back to the license server immediately.

If the given license feature is not checked out at all, or it is in use by a call to MSK_optimize, calling this function has no effect.

Please note that returning a license to the license server incurs a small overhead, so frequent calls to this function should be avoided.

Parameters
  • env (MSKenv_t) – The MOSEK environment. (input)

  • feature (MSKfeaturee) – Feature to check in to the license system. (input)

Return

(MSKrescodee) – The function response code.

Groups

License system

MSK_checkmemenv
MSKrescodee (MSKAPI MSK_checkmemenv) (
  MSKenv_t env,
  const char * file,
  MSKint32t line)

Checks the memory allocated by the environment.

Parameters
  • env (MSKenv_t) – The MOSEK environment. (input)

  • file (char*) – File from which the function is called. (input)

  • line (MSKint32t) – Line in the file from which the function is called. (input)

Return

(MSKrescodee) – The function response code.

Groups

System, memory and debugging

MSK_checkmemtask
MSKrescodee (MSKAPI MSK_checkmemtask) (
  MSKtask_t task,
  const char * file,
  MSKint32t line)

Checks the memory allocated by the task.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • file (char*) – File from which the function is called. (input)

  • line (MSKint32t) – Line in the file from which the function is called. (input)

Return

(MSKrescodee) – The function response code.

Groups

System, memory and debugging

MSK_checkoutlicense
MSKrescodee (MSKAPI MSK_checkoutlicense) (
  MSKenv_t env,
  MSKfeaturee feature)

Checks out a license feature from the license server. Normally the required license features will be automatically checked out the first time they are needed by the function MSK_optimize. This function can be used to check out one or more features ahead of time.

The feature will remain checked out until the environment is deleted or the function MSK_checkinlicense is called.

If a given feature is already checked out when this function is called, the call has no effect.

Parameters
  • env (MSKenv_t) – The MOSEK environment. (input)

  • feature (MSKfeaturee) – Feature to check out from the license system. (input)

Return

(MSKrescodee) – The function response code.

Groups

License system

MSK_checkversion
MSKrescodee (MSKAPI MSK_checkversion) (
  MSKenv_t env,
  MSKint32t major,
  MSKint32t minor,
  MSKint32t revision)

Compares the version of the MOSEK DLL with a specified version. Returns MSK_RES_OK if the versions match and one of MSK_RES_ERR_NEWER_DLL, MSK_RES_ERR_OLDER_DLL otherwise.

Parameters
  • env (MSKenv_t) – The MOSEK environment. (input)

  • major (MSKint32t) – Major version number. (input)

  • minor (MSKint32t) – Minor version number. (input)

  • revision (MSKint32t) – Revision number. (input)

Return

(MSKrescodee) – The function response code.

Groups

Versions

MSK_chgconbound
MSKrescodee (MSKAPI MSK_chgconbound) (
  MSKtask_t task,
  MSKint32t i,
  MSKint32t lower,
  MSKint32t finite,
  MSKrealt value)

Changes a bound for one constraint.

If lower is non-zero, then the lower bound is changed as follows:

\[\begin{split}\mbox{new lower bound} = \left\{ \begin{array}{ll} - \infty, & \mathtt{finite}=0, \\ \mathtt{value} & \mbox{otherwise}. \end{array} \right.\end{split}\]

Otherwise if lower is zero, then

\[\begin{split}\mbox{new upper bound} = \left\{ \begin{array}{ll} \infty, & \mathtt{finite}=0, \\ \mathtt{value} & \mbox{otherwise}. \end{array} \right.\end{split}\]

Please note that this function automatically updates the bound key for the bound, in particular, if the lower and upper bounds are identical, the bound key is changed to fixed.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • i (MSKint32t) – Index of the constraint for which the bounds should be changed. (input)

  • lower (MSKint32t) – If non-zero, then the lower bound is changed, otherwise the upper bound is changed. (input)

  • finite (MSKint32t) – If non-zero, then value is assumed to be finite. (input)

  • value (MSKrealt) – New value for the bound. (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - bounds, Problem data - constraints, Problem data - linear part

MSK_chgvarbound
MSKrescodee (MSKAPI MSK_chgvarbound) (
  MSKtask_t task,
  MSKint32t j,
  MSKint32t lower,
  MSKint32t finite,
  MSKrealt value)

Changes a bound for one variable.

If lower is non-zero, then the lower bound is changed as follows:

\[\begin{split}\mbox{new lower bound} = \left\{ \begin{array}{ll} - \infty, & \mathtt{finite}=0, \\ \mathtt{value} & \mbox{otherwise}. \end{array} \right.\end{split}\]

Otherwise if lower is zero, then

\[\begin{split}\mbox{new upper bound} = \left\{ \begin{array}{ll} \infty, & \mathtt{finite}=0, \\ \mathtt{value} & \mbox{otherwise}. \end{array} \right.\end{split}\]

Please note that this function automatically updates the bound key for the bound, in particular, if the lower and upper bounds are identical, the bound key is changed to fixed.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • j (MSKint32t) – Index of the variable for which the bounds should be changed. (input)

  • lower (MSKint32t) – If non-zero, then the lower bound is changed, otherwise the upper bound is changed. (input)

  • finite (MSKint32t) – If non-zero, then value is assumed to be finite. (input)

  • value (MSKrealt) – New value for the bound. (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - bounds, Problem data - variables, Problem data - linear part

MSK_clonetask
MSKrescodee (MSKAPI MSK_clonetask) (
  MSKtask_t task,
  MSKtask_t * clonedtask)

Creates a clone of an existing task copying all problem data and parameter settings to a new task. Callback functions are not copied.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Environment and task management

MSK_commitchanges
MSKrescodee (MSKAPI MSK_commitchanges) (
  MSKtask_t task)

Commits all cached problem changes to the task. It is usually not necessary to call this function explicitly since changes will be committed automatically when required.

Parameters

task (MSKtask_t) – An optimization task. (input)

Return

(MSKrescodee) – The function response code.

Groups

Environment and task management

MSK_computesparsecholesky
MSKrescodee (MSKAPI MSK_computesparsecholesky) (
  MSKenv_t env,
  MSKint32t numthreads,
  MSKint32t ordermethod,
  MSKrealt tolsingular,
  MSKint32t n,
  const MSKint32t * anzc,
  const MSKint64t * aptrc,
  const MSKint32t * asubc,
  const MSKrealt * avalc,
  MSKint32t ** perm,
  MSKrealt ** diag,
  MSKint32t ** lnzc,
  MSKint64t ** lptrc,
  MSKint64t * lensubnval,
  MSKint32t ** lsubc,
  MSKrealt ** lvalc)

The function computes a Cholesky factorization of a sparse positive semidefinite matrix. Sparsity is exploited during the computations to reduce the amount of space and work required. Both the input and output matrices are represented using the sparse format.

To be precise, given a symmetric matrix \(A \in \real^{n\times n}\) the function computes a nonsingular lower triangular matrix \(L\), a diagonal matrix \(D\) and a permutation matrix \(P\) such that

\[LL^T - D = P A P^T.\]

If ordermethod is zero then reordering heuristics are not employed and \(P\) is the identity.

If a pivot during the computation of the Cholesky factorization is less than

\[-\rho\cdot\max((PAP^T)_{jj},1.0)\]

then the matrix is declared negative semidefinite. On the hand if a pivot is smaller than

\[\rho\cdot\max((PAP^T)_{jj},1.0),\]

then \(D_{jj}\) is increased from zero to

\[\rho\cdot\max((PAP^T)_{jj},1.0).\]

Therefore, if \(A\) is sufficiently positive definite then \(D\) will be the zero matrix. Here \(\rho\) is set equal to value of tolsingular.

The function allocates memory for the output arrays. It must be freed by the user with MSK_freeenv.

Parameters
  • env (MSKenv_t) – The MOSEK environment. (input)

  • numthreads (MSKint32t) – The number threads that can be used to do the computation. 0 means the code makes the choice. NOTE: API change in version 10: in versions up to 9 the argument in this position indicated whether to use multithreading or not. (input)

  • ordermethod (MSKint32t) – If nonzero, then a sparsity preserving ordering will be employed. (input)

  • tolsingular (MSKrealt) – A positive parameter controlling when a pivot is declared zero. (input)

  • n (MSKint32t) – Specifies the order of \(A\). (input)

  • anzc (MSKint32t*) – anzc[j] is the number of nonzeros in the \(j\)-th column of \(A\). (input)

  • aptrc (MSKint64t*) – aptrc[j] is a pointer to the first element in column \(j\) of \(A\). (input)

  • asubc (MSKint32t*) – Row indexes for each column stored in increasing order. (input)

  • avalc (MSKrealt*) – The value corresponding to row indexed stored in asubc. (input)

  • perm (MSKint32t* by reference) – Permutation array used to specify the permutation matrix \(P\) computed by the function. (output)

  • diag (MSKrealt* by reference) – The diagonal elements of matrix \(D\). (output)

  • lnzc (MSKint32t* by reference) – lnzc[j] is the number of non zero elements in column \(j\) of \(L\). (output)

  • lptrc (MSKint64t* by reference) – lptrc[j] is a pointer to the first row index and value in column \(j\) of \(L\). (output)

  • lensubnval (MSKint64t by reference) – Number of elements in lsubc and lvalc. (output)

  • lsubc (MSKint32t* by reference) – Row indexes for each column stored in increasing order. (output)

  • lvalc (MSKrealt* by reference) – The values corresponding to row indexed stored in lsubc. (output)

Return

(MSKrescodee) – The function response code.

Groups

Linear algebra

MSK_conetypetostr Deprecated
MSKrescodee (MSKAPI MSK_conetypetostr) (
  MSKtask_t task,
  MSKconetypee ct,
  char * str)

NOTE: This interface to conic optimization is deprecated and will be removed in a future major release. Conic problems should be specified using the affine conic constraints interface (ACC), see Sec. 6.2 (From Linear to Conic Optimization) for details.

Obtains the cone string identifier corresponding to a cone type.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • ct (MSKconetypee) – Specifies the type of the cone. (input)

  • str (char*) – String corresponding to the cone type code ct. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names

MSK_deleteenv
MSKrescodee (MSKAPI MSK_deleteenv) (
  MSKenv_t * env)

Deletes a MOSEK environment and all the data associated with it.

Before calling this function it is a good idea to call the function MSK_unlinkfuncfromenvstream for each stream that has had a function linked to it.

Parameters

env (MSKenv_t by reference) – The MOSEK environment. (input/output)

Return

(MSKrescodee) – The function response code.

Groups

Environment and task management

MSK_deletesolution
MSKrescodee (MSKAPI MSK_deletesolution) (
  MSKtask_t task,
  MSKsoltypee whichsol)

Undefine a solution and free the memory it uses.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

Return

(MSKrescodee) – The function response code.

Groups

Environment and task management, Solution information

MSK_deletetask
MSKrescodee (MSKAPI MSK_deletetask) (
  MSKtask_t * task)

Deletes a task.

Parameters

task (MSKtask_t by reference) – An optimization task. (input/output)

Return

(MSKrescodee) – The function response code.

Groups

Environment and task management

MSK_dot
MSKrescodee (MSKAPI MSK_dot) (
  MSKenv_t env,
  MSKint32t n,
  const MSKrealt * x,
  const MSKrealt * y,
  MSKrealt * xty)

Computes the inner product of two vectors \(x,y\) of length \(n\geq 0\), i.e

\[x\cdot y= \sum_{i=1}^n x_i y_i.\]

Note that if \(n=0\), then the result of the operation is 0.

Parameters
  • env (MSKenv_t) – The MOSEK environment. (input)

  • n (MSKint32t) – Length of the vectors. (input)

  • x (MSKrealt*) – The \(x\) vector. (input)

  • y (MSKrealt*) – The \(y\) vector. (input)

  • xty (MSKrealt by reference) – The result of the inner product between \(x\) and \(y\). (output)

Return

(MSKrescodee) – The function response code.

Groups

Linear algebra

MSK_dualsensitivity
MSKrescodee (MSKAPI MSK_dualsensitivity) (
  MSKtask_t task,
  MSKint32t numj,
  const MSKint32t * subj,
  MSKrealt * leftpricej,
  MSKrealt * rightpricej,
  MSKrealt * leftrangej,
  MSKrealt * rightrangej)

Calculates sensitivity information for objective coefficients. The indexes of the coefficients to analyze are

\[\{\mathtt{subj}[i] ~|~ i = 0,\ldots,\mathtt{numj}-1\}\]

The type of sensitivity analysis to perform (basis or optimal partition) is controlled by the parameter MSK_IPAR_SENSITIVITY_TYPE.

For an example, please see Section Example: Sensitivity Analysis.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • numj (MSKint32t) – Number of coefficients to be analyzed. Length of subj. (input)

  • subj (MSKint32t*) – Indexes of objective coefficients to analyze. (input)

  • leftpricej (MSKrealt*) – \(\mathtt{leftpricej}[j]\) is the left shadow price for the coefficient with index \(\mathtt{subj[j]}\). (output)

  • rightpricej (MSKrealt*) – \(\mathtt{rightpricej}[j]\) is the right shadow price for the coefficient with index \(\mathtt{subj[j]}\). (output)

  • leftrangej (MSKrealt*) – \(\mathtt{leftrangej}[j]\) is the left range \(\beta_1\) for the coefficient with index \(\mathtt{subj[j]}\). (output)

  • rightrangej (MSKrealt*) – \(\mathtt{rightrangej}[j]\) is the right range \(\beta_2\) for the coefficient with index \(\mathtt{subj[j]}\). (output)

Return

(MSKrescodee) – The function response code.

Groups

Sensitivity analysis

MSK_echoenv
MSKrescodee (MSKAPIVA MSK_echoenv) (
  MSKenv_t env,
  MSKstreamtypee whichstream,
  const char * format,
  ...)

Prints a formatted message to the environment stream.

Parameters
  • env (MSKenv_t) – The MOSEK environment. (input)

  • whichstream (MSKstreamtypee) – Index of the stream. (input)

  • format (char*) – Is a valid C format string which matches the arguments in .... (input)

  • varnumarg (...) – A variable argument list. (input)

Return

(MSKrescodee) – The function response code.

Groups

Logging

MSK_echointro
MSKrescodee (MSKAPI MSK_echointro) (
  MSKenv_t env,
  MSKint32t longver)

Prints an intro to message stream.

Parameters
  • env (MSKenv_t) – The MOSEK environment. (input)

  • longver (MSKint32t) – If non-zero, then the intro is slightly longer. (input)

Return

(MSKrescodee) – The function response code.

Groups

Logging

MSK_echotask
MSKrescodee (MSKAPIVA MSK_echotask) (
  MSKtask_t task,
  MSKstreamtypee whichstream,
  const char * format,
  ...)

Prints a formatted string to a task stream.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichstream (MSKstreamtypee) – Index of the stream. (input)

  • format (char*) – Is a valid C format string which matches the arguments in .... (input)

  • varnumarg (...) – Additional arguments (input)

Return

(MSKrescodee) – The function response code.

Groups

Input/Output

MSK_emptyafebarfrow
MSKrescodee (MSKAPI MSK_emptyafebarfrow) (
  MSKtask_t task,
  MSKint64t afeidx)

Clears a row in \(\barF\) i.e. sets \(\barF_{\mathrm{afeidx},*} = 0\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • afeidx (MSKint64t) – Row index of \(\barF\). (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions, Problem data - semidefinite

MSK_emptyafebarfrowlist
MSKrescodee (MSKAPI MSK_emptyafebarfrowlist) (
  MSKtask_t task,
  MSKint64t numafeidx,
  const MSKint64t * afeidxlist)

Clears a number of rows in \(\barF\) i.e. sets \(\barF_{i,*} = 0\) for all indices \(i\) in afeidxlist.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • numafeidx (MSKint64t) – The number of rows to zero, length of afeidxlist. (input)

  • afeidxlist (MSKint64t*) – Indices of rows in \(\barF\) to clear. (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions, Problem data - semidefinite

MSK_emptyafefcol
MSKrescodee (MSKAPI MSK_emptyafefcol) (
  MSKtask_t task,
  MSKint32t varidx)

Clears one column in the affine constraint matrix \(F\), that is sets \(F_{*,\mathrm{varidx}}=0\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • varidx (MSKint32t) – Index of a variable (column in \(F\)). (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions

MSK_emptyafefcollist
MSKrescodee (MSKAPI MSK_emptyafefcollist) (
  MSKtask_t task,
  MSKint64t numvaridx,
  const MSKint32t * varidx)

Clears a number of columns in \(F\) i.e. sets \(F_{*,j} = 0\) for all indices \(j\) in varidx.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • numvaridx (MSKint64t) – The number of columns to zero, length of varidx list. (input)

  • varidx (MSKint32t*) – Indices of variables (columns) in \(F\) to clear. (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions

MSK_emptyafefrow
MSKrescodee (MSKAPI MSK_emptyafefrow) (
  MSKtask_t task,
  MSKint64t afeidx)

Clears one row in the affine constraint matrix \(F\), that is sets \(F_{\mathrm{afeidx},*}=0\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • afeidx (MSKint64t) – Index of a row in \(F\). (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions

MSK_emptyafefrowlist
MSKrescodee (MSKAPI MSK_emptyafefrowlist) (
  MSKtask_t task,
  MSKint64t numafeidx,
  const MSKint64t * afeidx)

Clears a number of rows in \(F\) i.e. sets \(F_{i,*} = 0\) for all indices \(i\) in afeidx.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • numafeidx (MSKint64t) – The number of rows to zero, length of afeidxlist. (input)

  • afeidx (MSKint64t*) – Indices of rows in \(F\) to clear. (input)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions

MSK_evaluateacc
MSKrescodee (MSKAPI MSK_evaluateacc) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint64t accidx,
  MSKrealt * activity)

Evaluates the activity of an affine conic constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • accidx (MSKint64t) – The index of the affine conic constraint. (input)

  • activity (MSKrealt*) – The activity of the affine conic constraint. The array should have length equal to the dimension of the constraint. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - primal, Problem data - affine conic constraints

MSK_evaluateaccs
MSKrescodee (MSKAPI MSK_evaluateaccs) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKrealt * activity)

Evaluates the activities of all affine conic constraints.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • activity (MSKrealt*) – The activity of affine conic constraints. The array should have length equal to the sum of dimensions of all affine conic constraints. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - primal, Problem data - affine conic constraints

MSK_expirylicenses
MSKrescodee (MSKAPI MSK_expirylicenses) (
  MSKenv_t env,
  MSKint64t * expiry)

Reports when the first license feature expires. It reports the number of days to the expiry of the first feature of all the features that were ever checked out from the start of the process, or from the last call to MSK_resetexpirylicenses, until now.

Parameters
  • env (MSKenv_t) – The MOSEK environment. (input)

  • expiry (MSKint64t by reference) – If nonnegative, then it is the minimum number days to expiry of any feature that has been checked out. (output)

Return

(MSKrescodee) – The function response code.

Groups

License system

MSK_freedbgenv
void (MSKAPI MSK_freedbgenv) (
  MSKenv_t env,
  void * buffer,
  const char * file,
  const unsigned line)

Frees space allocated by MOSEK. Debug version of MSK_freeenv.

Parameters
  • env (MSKenv_t) – The MOSEK environment. (input)

  • buffer (void*) – A pointer. (input/output)

  • file (char*) – File from which the function is called. (input)

  • line (unsigned) – Line in the file from which the function is called. (input)

Return

(void)

Groups

System, memory and debugging

MSK_freedbgtask
void (MSKAPI MSK_freedbgtask) (
  MSKtask_t task,
  void * buffer,
  const char * file,
  const unsigned line)

Frees space allocated by MOSEK. Debug version of MSK_freetask.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • buffer (void*) – A pointer. (input/output)

  • file (char*) – File from which the function is called. (input)

  • line (unsigned) – Line in the file from which the function is called. (input)

Return

(void)

Groups

System, memory and debugging

MSK_freeenv
void (MSKAPI MSK_freeenv) (
  MSKenv_t env,
  void * buffer)

Frees space allocated by a MOSEK function. Must not be applied to the MOSEK environment and task.

Parameters
  • env (MSKenv_t) – The MOSEK environment. (input)

  • buffer (void*) – A pointer. (input/output)

Return

(void)

Groups

System, memory and debugging

MSK_freetask
void (MSKAPI MSK_freetask) (
  MSKtask_t task,
  void * buffer)

Frees space allocated by a MOSEK function. Must not be applied to the MOSEK environment and task.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • buffer (void*) – A pointer. (input/output)

Return

(void)

Groups

System, memory and debugging

MSK_gemm
MSKrescodee (MSKAPI MSK_gemm) (
  MSKenv_t env,
  MSKtransposee transa,
  MSKtransposee transb,
  MSKint32t m,
  MSKint32t n,
  MSKint32t k,
  MSKrealt alpha,
  const MSKrealt * a,
  const MSKrealt * b,
  MSKrealt beta,
  MSKrealt * c)

Performs a matrix multiplication plus addition of dense matrices. Given \(A\), \(B\) and \(C\) of compatible dimensions, this function computes

\[C:= \alpha op(A)op(B) + \beta C\]

where \(\alpha,\beta\) are two scalar values. The function \(op(X)\) denotes \(X\) if transX is MSK_TRANSPOSE_NO, or \(X^T\) if set to MSK_TRANSPOSE_YES. The matrix \(C\) has \(m\) rows and \(n\) columns, and the other matrices must have compatible dimensions.

The result of this operation is stored in \(C\). It must not overlap with the other input arrays.

Parameters
  • env (MSKenv_t) – The MOSEK environment. (input)

  • transa (MSKtransposee) – Indicates whether the matrix \(A\) must be transposed. (input)

  • transb (MSKtransposee) – Indicates whether the matrix \(B\) must be transposed. (input)

  • m (MSKint32t) – Indicates the number of rows of matrix \(C\). (input)

  • n (MSKint32t) – Indicates the number of columns of matrix \(C\). (input)

  • k (MSKint32t) – Specifies the common dimension along which \(op(A)\) and \(op(B)\) are multiplied. For example, if neither \(A\) nor \(B\) are transposed, then this is the number of columns in \(A\) and also the number of rows in \(B\). (input)

  • alpha (MSKrealt) – A scalar value multiplying the result of the matrix multiplication. (input)

  • a (MSKrealt*) – The pointer to the array storing matrix \(A\) in a column-major format. (input)

  • b (MSKrealt*) – The pointer to the array storing matrix \(B\) in a column-major format. (input)

  • beta (MSKrealt) – A scalar value that multiplies \(C\). (input)

  • c (MSKrealt*) – The pointer to the array storing matrix \(C\) in a column-major format. (input/output)

Return

(MSKrescodee) – The function response code.

Groups

Linear algebra

MSK_gemv
MSKrescodee (MSKAPI MSK_gemv) (
  MSKenv_t env,
  MSKtransposee transa,
  MSKint32t m,
  MSKint32t n,
  MSKrealt alpha,
  const MSKrealt * a,
  const MSKrealt * x,
  MSKrealt beta,
  MSKrealt * y)

Computes the multiplication of a scaled dense matrix times a dense vector, plus a scaled dense vector. Precisely, if trans is MSK_TRANSPOSE_NO then the update is

\[y := \alpha A x + \beta y,\]

and if trans is MSK_TRANSPOSE_YES then

\[y := \alpha A^T x + \beta y,\]

where \(\alpha,\beta\) are scalar values and \(A\) is a matrix with \(m\) rows and \(n\) columns.

Note that the result is stored overwriting \(y\). It must not overlap with the other input arrays.

Parameters
  • env (MSKenv_t) – The MOSEK environment. (input)

  • transa (MSKtransposee) – Indicates whether the matrix \(A\) must be transposed. (input)

  • m (MSKint32t) – Specifies the number of rows of the matrix \(A\). (input)

  • n (MSKint32t) – Specifies the number of columns of the matrix \(A\). (input)

  • alpha (MSKrealt) – A scalar value multiplying the matrix \(A\). (input)

  • a (MSKrealt*) – A pointer to the array storing matrix \(A\) in a column-major format. (input)

  • x (MSKrealt*) – A pointer to the array storing the vector \(x\). (input)

  • beta (MSKrealt) – A scalar value multiplying the vector \(y\). (input)

  • y (MSKrealt*) – A pointer to the array storing the vector \(y\). (input/output)

Return

(MSKrescodee) – The function response code.

Groups

Linear algebra

MSK_generateaccnames
MSKrescodee (MSKAPI MSK_generateaccnames) (
  MSKtask_t task,
  MSKint64t num,
  const MSKint64t * sub,
  const char * fmt,
  MSKint32t ndims,
  const MSKint32t * dims,
  const MSKint64t * sp,
  MSKint32t numnamedaxis,
  const MSKint32t * namedaxisidxs,
  MSKint64t numnames,
  const char ** names)

Internal.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • num (MSKint64t) – Number of variable indexes. (input)

  • sub (MSKint64t*) – Indexes of the affine conic constraints. (input)

  • fmt (char*) – The variable name formatting string. (input)

  • ndims (MSKint32t) – Number of dimensions in the shape. (input)

  • dims (MSKint32t*) – Dimensions in the shape. (input)

  • sp (MSKint64t*) – Items that should be named. (input)

  • numnamedaxis (MSKint32t) – Number of named axes (input)

  • namedaxisidxs (MSKint32t*) – List if named index axes (input)

  • numnames (MSKint64t) – Total number of names. (input)

  • names (char**) – All axis names. (input)

Return

(MSKrescodee) – The function response code.

Groups

Names

MSK_generatebarvarnames
MSKrescodee (MSKAPI MSK_generatebarvarnames) (
  MSKtask_t task,
  MSKint32t num,
  const MSKint32t * subj,
  const char * fmt,
  MSKint32t ndims,
  const MSKint32t * dims,
  const MSKint64t * sp,
  MSKint32t numnamedaxis,
  const MSKint32t * namedaxisidxs,
  MSKint64t numnames,
  const char ** names)

Generates systematic names for variables.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • num (MSKint32t) – Number of variable indexes. (input)

  • subj (MSKint32t*) – Indexes of the variables. (input)

  • fmt (char*) – The variable name formatting string. (input)

  • ndims (MSKint32t) – Number of dimensions in the shape. (input)

  • dims (MSKint32t*) – Dimensions in the shape. (input)

  • sp (MSKint64t*) – Items that should be named. (input)

  • numnamedaxis (MSKint32t) – Number of named axes (input)

  • namedaxisidxs (MSKint32t*) – List if named index axes (input)

  • numnames (MSKint64t) – Total number of names. (input)

  • names (char**) – All axis names. (input)

Return

(MSKrescodee) – The function response code.

Groups

Names, Problem data - variables, Problem data - linear part

MSK_generateconenames Deprecated
MSKrescodee (MSKAPI MSK_generateconenames) (
  MSKtask_t task,
  MSKint32t num,
  const MSKint32t * subk,
  const char * fmt,
  MSKint32t ndims,
  const MSKint32t * dims,
  const MSKint64t * sp,
  MSKint32t numnamedaxis,
  const MSKint32t * namedaxisidxs,
  MSKint64t numnames,
  const char ** names)

Internal, deprecated.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • num (MSKint32t) – Number of cone indexes. (input)

  • subk (MSKint32t*) – Indexes of the cone. (input)

  • fmt (char*) – The cone name formatting string. (input)

  • ndims (MSKint32t) – Number of dimensions in the shape. (input)

  • dims (MSKint32t*) – Dimensions in the shape. (input)

  • sp (MSKint64t*) – Items that should be named. (input)

  • numnamedaxis (MSKint32t) – Number of named axes (input)

  • namedaxisidxs (MSKint32t*) – List if named index axes (input)

  • numnames (MSKint64t) – Total number of names. (input)

  • names (char**) – All axis names. (input)

Return

(MSKrescodee) – The function response code.

Groups

Names, Problem data - cones (deprecated)

MSK_generateconnames
MSKrescodee (MSKAPI MSK_generateconnames) (
  MSKtask_t task,
  MSKint32t num,
  const MSKint32t * subi,
  const char * fmt,
  MSKint32t ndims,
  const MSKint32t * dims,
  const MSKint64t * sp,
  MSKint32t numnamedaxis,
  const MSKint32t * namedaxisidxs,
  MSKint64t numnames,
  const char ** names)

Generates systematic names for constraints.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • num (MSKint32t) – Number of constraint indexes. (input)

  • subi (MSKint32t*) – Indexes of the constraints. (input)

  • fmt (char*) – The constraint name formatting string. (input)

  • ndims (MSKint32t) – Number of dimensions in the shape. (input)

  • dims (MSKint32t*) – Dimensions in the shape. (input)

  • sp (MSKint64t*) – Items that should be named. (input)

  • numnamedaxis (MSKint32t) – Number of named axes (input)

  • namedaxisidxs (MSKint32t*) – List if named index axes (input)

  • numnames (MSKint64t) – Total number of names. (input)

  • names (char**) – All axis names. (input)

Return

(MSKrescodee) – The function response code.

Groups

Names, Problem data - constraints, Problem data - linear part

MSK_generatedjcnames
MSKrescodee (MSKAPI MSK_generatedjcnames) (
  MSKtask_t task,
  MSKint64t num,
  const MSKint64t * sub,
  const char * fmt,
  MSKint32t ndims,
  const MSKint32t * dims,
  const MSKint64t * sp,
  MSKint32t numnamedaxis,
  const MSKint32t * namedaxisidxs,
  MSKint64t numnames,
  const char ** names)

Internal.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • num (MSKint64t) – Number of variable indexes. (input)

  • sub (MSKint64t*) – Indexes of the disjunctive constraints. (input)

  • fmt (char*) – The variable name formatting string. (input)

  • ndims (MSKint32t) – Number of dimensions in the shape. (input)

  • dims (MSKint32t*) – Dimensions in the shape. (input)

  • sp (MSKint64t*) – Items that should be named. (input)

  • numnamedaxis (MSKint32t) – Number of named axes (input)

  • namedaxisidxs (MSKint32t*) – List if named index axes (input)

  • numnames (MSKint64t) – Total number of names. (input)

  • names (char**) – All axis names. (input)

Return

(MSKrescodee) – The function response code.

Groups

Names

MSK_generatevarnames
MSKrescodee (MSKAPI MSK_generatevarnames) (
  MSKtask_t task,
  MSKint32t num,
  const MSKint32t * subj,
  const char * fmt,
  MSKint32t ndims,
  const MSKint32t * dims,
  const MSKint64t * sp,
  MSKint32t numnamedaxis,
  const MSKint32t * namedaxisidxs,
  MSKint64t numnames,
  const char ** names)

Generates systematic names for variables.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • num (MSKint32t) – Number of variable indexes. (input)

  • subj (MSKint32t*) – Indexes of the variables. (input)

  • fmt (char*) – The variable name formatting string. (input)

  • ndims (MSKint32t) – Number of dimensions in the shape. (input)

  • dims (MSKint32t*) – Dimensions in the shape. (input)

  • sp (MSKint64t*) – Items that should be named. (input)

  • numnamedaxis (MSKint32t) – Number of named axes (input)

  • namedaxisidxs (MSKint32t*) – List if named index axes (input)

  • numnames (MSKint64t) – Total number of names. (input)

  • names (char**) – All axis names. (input)

Return

(MSKrescodee) – The function response code.

Groups

Names, Problem data - variables, Problem data - linear part

MSK_getaccafeidxlist
MSKrescodee (MSKAPI MSK_getaccafeidxlist) (
  MSKtask_t task,
  MSKint64t accidx,
  MSKint64t * afeidxlist)

Obtains the list of affine expressions appearing in the affine conic constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • accidx (MSKint64t) – Index of the affine conic constraint. (input)

  • afeidxlist (MSKint64t*) – List of indexes of affine expressions appearing in the constraint. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine conic constraints, Inspecting the task

MSK_getaccb
MSKrescodee (MSKAPI MSK_getaccb) (
  MSKtask_t task,
  MSKint64t accidx,
  MSKrealt * b)

Obtains the additional constant term vector appearing in the affine conic constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • accidx (MSKint64t) – Index of the affine conic constraint. (input)

  • b (MSKrealt*) – The vector b appearing in the constraint. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine conic constraints, Inspecting the task

MSK_getaccbarfblocktriplet
MSKrescodee (MSKAPI MSK_getaccbarfblocktriplet) (
  MSKtask_t task,
  MSKint64t maxnumtrip,
  MSKint64t * numtrip,
  MSKint64t * acc_afe,
  MSKint32t * bar_var,
  MSKint32t * blk_row,
  MSKint32t * blk_col,
  MSKrealt * blk_val)

Obtains \(\barF\), implied by the ACCs, in block triplet form. If the AFEs passed to the ACCs were out of order, then this function can be used to obtain the barF as seen by the ACCs.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • maxnumtrip (MSKint64t) – acc_afe, bar_var, blk_row, blk_col and blk_val must be numtrip long. (input)

  • numtrip (MSKint64t by reference) – Number of elements in the block triplet form. (output)

  • acc_afe (MSKint64t*) – Index of the AFE within the concatenated list of AFEs in ACCs. (output)

  • bar_var (MSKint32t*) – Symmetric matrix variable index. (output)

  • blk_row (MSKint32t*) – Block row index. (output)

  • blk_col (MSKint32t*) – Block column index. (output)

  • blk_val (MSKrealt*) – The numerical value associated with each block triplet. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions, Problem data - semidefinite

MSK_getaccbarfnumblocktriplets
MSKrescodee (MSKAPI MSK_getaccbarfnumblocktriplets) (
  MSKtask_t task,
  MSKint64t * numtrip)

Obtains an upper bound on the number of elements in the block triplet form of \(\barF\), as used within the ACCs.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • numtrip (MSKint64t by reference) – An upper bound on the number of elements in the block triplet form of \(\barF.\), as used within the ACCs. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite, Problem data - affine conic constraints, Inspecting the task

MSK_getaccdomain
MSKrescodee (MSKAPI MSK_getaccdomain) (
  MSKtask_t task,
  MSKint64t accidx,
  MSKint64t * domidx)

Obtains the domain appearing in the affine conic constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • accidx (MSKint64t) – The index of the affine conic constraint. (input)

  • domidx (MSKint64t by reference) – The index of domain in the affine conic constraint. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine conic constraints, Inspecting the task

MSK_getaccdoty
MSKrescodee (MSKAPI MSK_getaccdoty) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint64t accidx,
  MSKrealt * doty)

Obtains the \(\dot{y}\) vector for a solution (the dual values of an affine conic constraint).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • accidx (MSKint64t) – The index of the affine conic constraint. (input)

  • doty (MSKrealt*) – The dual values for this affine conic constraint. The array should have length equal to the dimension of the constraint. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - dual, Problem data - affine conic constraints

MSK_getaccdotys
MSKrescodee (MSKAPI MSK_getaccdotys) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKrealt * doty)

Obtains the \(\dot{y}\) vector for a solution (the dual values of all affine conic constraint).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • doty (MSKrealt*) – The dual values of affine conic constraints. The array should have length equal to the sum of dimensions of all affine conic constraints. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - dual, Problem data - affine conic constraints

MSK_getaccfnumnz
MSKrescodee (MSKAPI MSK_getaccfnumnz) (
  MSKtask_t task,
  MSKint64t * accfnnz)

If the AFEs are not added sequentially to the ACCs, then the present function gives the number of nonzero elements in the F matrix that would be implied by the ordering of AFEs within ACCs.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine conic constraints, Inspecting the task

MSK_getaccftrip
MSKrescodee (MSKAPI MSK_getaccftrip) (
  MSKtask_t task,
  MSKint64t * frow,
  MSKint32t * fcol,
  MSKrealt * fval)

Obtains the \(F\) (that would be implied by the ordering of the AFEs within the ACCs) in triplet format.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • frow (MSKint64t*) – Row indices of nonzeros in the implied F matrix. (output)

  • fcol (MSKint32t*) – Column indices of nonzeros in the implied F matrix. (output)

  • fval (MSKrealt*) – Values of nonzero entries in the implied F matrix. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine conic constraints, Inspecting the task

MSK_getaccgvector
MSKrescodee (MSKAPI MSK_getaccgvector) (
  MSKtask_t task,
  MSKrealt * g)

If the AFEs are passed out of sequence to the ACCs, then this function can be used to obtain the vector \(g\) of constant terms used within the ACCs.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • g (MSKrealt*) – The \(g\) used within the ACCs as a dense vector. The length is sum of the dimensions of the ACCs. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - affine conic constraints

MSK_getaccn
MSKrescodee (MSKAPI MSK_getaccn) (
  MSKtask_t task,
  MSKint64t accidx,
  MSKint64t * n)

Obtains the dimension of the affine conic constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • accidx (MSKint64t) – The index of the affine conic constraint. (input)

  • n (MSKint64t by reference) – The dimension of the affine conic constraint (equal to the dimension of its domain). (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine conic constraints, Inspecting the task

MSK_getaccname
MSKrescodee (MSKAPI MSK_getaccname) (
  MSKtask_t task,
  MSKint64t accidx,
  MSKint32t sizename,
  char * name)

Obtains the name of an affine conic constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • accidx (MSKint64t) – Index of an affine conic constraint. (input)

  • sizename (MSKint32t) – The length of the buffer pointed to by the name argument. (input)

  • name (char*) – Returns the required name. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names, Problem data - affine conic constraints, Inspecting the task

MSK_getaccnamelen
MSKrescodee (MSKAPI MSK_getaccnamelen) (
  MSKtask_t task,
  MSKint64t accidx,
  MSKint32t * len)

Obtains the length of the name of an affine conic constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • accidx (MSKint64t) – Index of an affine conic constraint. (input)

  • len (MSKint32t by reference) – Returns the length of the indicated name. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names, Problem data - affine conic constraints, Inspecting the task

MSK_getaccntot
MSKrescodee (MSKAPI MSK_getaccntot) (
  MSKtask_t task,
  MSKint64t * n)

Obtains the total dimension of all affine conic constraints (the sum of all their dimensions).

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine conic constraints, Inspecting the task

MSK_getaccs
MSKrescodee (MSKAPI MSK_getaccs) (
  MSKtask_t task,
  MSKint64t * domidxlist,
  MSKint64t * afeidxlist,
  MSKrealt * b)

Obtains full data of all affine conic constraints. The output array domainidxlist must have at least length determined by MSK_getnumacc. The output arrays afeidxlist and b must have at least length determined by MSK_getaccntot.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • domidxlist (MSKint64t*) – The list of domains appearing in all affine conic constraints. (output)

  • afeidxlist (MSKint64t*) – The concatenation of index lists of affine expressions appearing in all affine conic constraints. (output)

  • b (MSKrealt*) – The concatenation of vectors b appearing in all affine conic constraints. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine conic constraints, Inspecting the task

MSK_getacol
MSKrescodee (MSKAPI MSK_getacol) (
  MSKtask_t task,
  MSKint32t j,
  MSKint32t * nzj,
  MSKint32t * subj,
  MSKrealt * valj)

Obtains one column of \(A\) in a sparse format.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • j (MSKint32t) – Index of the column. (input)

  • nzj (MSKint32t by reference) – Number of non-zeros in the column obtained. (output)

  • subj (MSKint32t*) – Row indices of the non-zeros in the column obtained. (output)

  • valj (MSKrealt*) – Numerical values in the column obtained. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task

MSK_getacolnumnz
MSKrescodee (MSKAPI MSK_getacolnumnz) (
  MSKtask_t task,
  MSKint32t i,
  MSKint32t * nzj)

Obtains the number of non-zero elements in one column of \(A\).

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task

MSK_getacolslice
MSKrescodee (MSKAPI MSK_getacolslice) (
  MSKtask_t task,
  MSKint32t first,
  MSKint32t last,
  MSKint32t maxnumnz,
  MSKint32t * ptrb,
  MSKint32t * ptre,
  MSKint32t * sub,
  MSKrealt * val)

Obtains a sequence of columns from \(A\) in sparse format.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • first (MSKint32t) – Index of the first column in the sequence. (input)

  • last (MSKint32t) – Index of the last column in the sequence plus one. (input)

  • maxnumnz (MSKint32t) – Denotes the length of the arrays sub and val. (input)

  • ptrb (MSKint32t*) – ptrb[t] is an index pointing to the first element in the \(t\)-th column obtained. (output)

  • ptre (MSKint32t*) – ptre[t] is an index pointing to the last element plus one in the \(t\)-th column obtained. (output)

  • sub (MSKint32t*) – Contains the row subscripts. (output)

  • val (MSKrealt*) – Contains the coefficient values. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task

MSK_getacolslice64
MSKrescodee (MSKAPI MSK_getacolslice64) (
  MSKtask_t task,
  MSKint32t first,
  MSKint32t last,
  MSKint64t maxnumnz,
  MSKint64t * ptrb,
  MSKint64t * ptre,
  MSKint32t * sub,
  MSKrealt * val)

Obtains a sequence of columns from \(A\) in sparse format.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • first (MSKint32t) – Index of the first column in the sequence. (input)

  • last (MSKint32t) – Index of the last column in the sequence plus one. (input)

  • maxnumnz (MSKint64t) – Denotes the length of the arrays sub and val. (input)

  • ptrb (MSKint64t*) – ptrb[t] is an index pointing to the first element in the \(t\)-th column obtained. (output)

  • ptre (MSKint64t*) – ptre[t] is an index pointing to the last element plus one in the \(t\)-th column obtained. (output)

  • sub (MSKint32t*) – Contains the row subscripts. (output)

  • val (MSKrealt*) – Contains the coefficient values. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task

MSK_getacolslicenumnz
MSKrescodee (MSKAPI MSK_getacolslicenumnz) (
  MSKtask_t task,
  MSKint32t first,
  MSKint32t last,
  MSKint32t * numnz)

Obtains the number of non-zeros in a slice of columns of \(A\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • first (MSKint32t) – Index of the first column in the sequence. (input)

  • last (MSKint32t) – Index of the last column plus one in the sequence. (input)

  • numnz (MSKint32t by reference) – Number of non-zeros in the slice. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task

MSK_getacolslicenumnz64
MSKrescodee (MSKAPI MSK_getacolslicenumnz64) (
  MSKtask_t task,
  MSKint32t first,
  MSKint32t last,
  MSKint64t * numnz)

Obtains the number of non-zeros in a slice of columns of \(A\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • first (MSKint32t) – Index of the first column in the sequence. (input)

  • last (MSKint32t) – Index of the last column plus one in the sequence. (input)

  • numnz (MSKint64t by reference) – Number of non-zeros in the slice. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task

MSK_getacolslicetrip
MSKrescodee (MSKAPI MSK_getacolslicetrip) (
  MSKtask_t task,
  MSKint32t first,
  MSKint32t last,
  MSKint64t maxnumnz,
  MSKint32t * subi,
  MSKint32t * subj,
  MSKrealt * val)

Obtains a sequence of columns from \(A\) in sparse triplet format. The function returns the content of all columns whose index j satisfies first <= j < last. The triplets corresponding to nonzero entries are stored in the arrays subi, subj and val.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • first (MSKint32t) – Index of the first column in the sequence. (input)

  • last (MSKint32t) – Index of the last column in the sequence plus one. (input)

  • maxnumnz (MSKint64t) – Denotes the length of the arrays subi, subj, and val. (input)

  • subi (MSKint32t*) – Constraint subscripts. (output)

  • subj (MSKint32t*) – Column subscripts. (output)

  • val (MSKrealt*) – Values. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task

MSK_getafebarfblocktriplet
MSKrescodee (MSKAPI MSK_getafebarfblocktriplet) (
  MSKtask_t task,
  MSKint64t maxnumtrip,
  MSKint64t * numtrip,
  MSKint64t * afeidx,
  MSKint32t * barvaridx,
  MSKint32t * subk,
  MSKint32t * subl,
  MSKrealt * valkl)

Obtains \(\barF\) in block triplet form.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • maxnumtrip (MSKint64t) – afeidx, barvaridx, subk, subl and valkl must be maxnumtrip long. (input)

  • numtrip (MSKint64t by reference) – Number of elements in the block triplet form. (output)

  • afeidx (MSKint64t*) – Constraint index. (output)

  • barvaridx (MSKint32t*) – Symmetric matrix variable index. (output)

  • subk (MSKint32t*) – Block row index. (output)

  • subl (MSKint32t*) – Block column index. (output)

  • valkl (MSKrealt*) – The numerical value associated with each block triplet. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions, Problem data - semidefinite

MSK_getafebarfnumblocktriplets
MSKrescodee (MSKAPI MSK_getafebarfnumblocktriplets) (
  MSKtask_t task,
  MSKint64t * numtrip)

Obtains an upper bound on the number of elements in the block triplet form of \(\barF\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • numtrip (MSKint64t by reference) – An upper bound on the number of elements in the block triplet form of \(\barF.\) (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite, Inspecting the task

MSK_getafebarfnumrowentries
MSKrescodee (MSKAPI MSK_getafebarfnumrowentries) (
  MSKtask_t task,
  MSKint64t afeidx,
  MSKint32t * numentr)

Obtains the number of nonzero entries in one row of \(\barF\), that is the number of \(j\) such that \(\barF_{\mathrm{afeidx},j}\) is not the zero matrix.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • afeidx (MSKint64t) – Row index of \(\barF\). (input)

  • numentr (MSKint32t by reference) – Number of nonzero entries in a row of \(\barF\). (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions, Problem data - semidefinite, Inspecting the task

MSK_getafebarfrow
MSKrescodee (MSKAPI MSK_getafebarfrow) (
  MSKtask_t task,
  MSKint64t afeidx,
  MSKint32t * barvaridx,
  MSKint64t * ptrterm,
  MSKint64t * numterm,
  MSKint64t * termidx,
  MSKrealt * termweight)

Obtains all nonzero entries in one row \(\barF_{\mathrm{afeidx},*}\) of \(\barF\). For every \(k\) there is a nonzero entry \(\barF_{\mathrm{afeidx}, \mathrm{barvaridx}[k]}\), which is represented as a weighted sum of \(\mathrm{numterm}[k]\) terms. The indices in the matrix store \(E\) and their weights for the \(k\)-th entry appear in the arrays termidx and termweight in positions

\[\mathrm{ptrterm}[k],\ldots,\mathrm{ptrterm}[k]+\mathrm{numterm}[k]-1.\]

The arrays should be long enough to accommodate the data; their required lengths can be obtained with MSK_getafebarfrowinfo.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • afeidx (MSKint64t) – Row index of \(\barF\). (input)

  • barvaridx (MSKint32t*) – Semidefinite variable indices of nonzero entries in the row of \(\barF\). (output)

  • ptrterm (MSKint64t*) – Pointers to the start of each entry’s description. (output)

  • numterm (MSKint64t*) – Number of terms in the weighted sum representation of each entry. (output)

  • termidx (MSKint64t*) – Indices of semidefinite matrices from the matrix store \(E\). (output)

  • termweight (MSKrealt*) – Weights appearing in the weighted sum representations of all entries. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions, Problem data - semidefinite, Inspecting the task

MSK_getafebarfrowinfo
MSKrescodee (MSKAPI MSK_getafebarfrowinfo) (
  MSKtask_t task,
  MSKint64t afeidx,
  MSKint32t * numentr,
  MSKint64t * numterm)

Obtains information about one row of \(\barF\): the number of nonzero entries, that is the number of \(j\) such that \(\barF_{\mathrm{afeidx},j}\) is not the zero matrix, as well as the total number of terms in the representations of all these entries as weighted sums of matrices from \(E\). This information provides the data sizes required for a call to MSK_getafebarfrow.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • afeidx (MSKint64t) – Row index of \(\barF\). (input)

  • numentr (MSKint32t by reference) – Number of nonzero entries in a row of \(\barF\). (output)

  • numterm (MSKint64t by reference) – Number of terms in the weighted sums representation of the row of \(\barF\). (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions, Problem data - semidefinite, Inspecting the task

MSK_getafefnumnz
MSKrescodee (MSKAPI MSK_getafefnumnz) (
  MSKtask_t task,
  MSKint64t * numnz)

Obtains the total number of nonzeros in \(F\).

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions, Inspecting the task

MSK_getafefrow
MSKrescodee (MSKAPI MSK_getafefrow) (
  MSKtask_t task,
  MSKint64t afeidx,
  MSKint32t * numnz,
  MSKint32t * varidx,
  MSKrealt * val)

Obtains one row of \(F\) in sparse format.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • afeidx (MSKint64t) – Index of a row in \(F\). (input)

  • numnz (MSKint32t by reference) – Number of non-zeros in the row obtained. (output)

  • varidx (MSKint32t*) – Column indices of the non-zeros in the row obtained. (output)

  • val (MSKrealt*) – Values of the non-zeros in the row obtained. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions, Inspecting the task

MSK_getafefrownumnz
MSKrescodee (MSKAPI MSK_getafefrownumnz) (
  MSKtask_t task,
  MSKint64t afeidx,
  MSKint32t * numnz)

Obtains the number of nonzeros in one row of \(F\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • afeidx (MSKint64t) – Index of a row in \(F\). (input)

  • numnz (MSKint32t by reference) – Number of non-zeros in row afeidx of \(F\). (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions, Inspecting the task

MSK_getafeftrip
MSKrescodee (MSKAPI MSK_getafeftrip) (
  MSKtask_t task,
  MSKint64t * afeidx,
  MSKint32t * varidx,
  MSKrealt * val)

Obtains the \(F\) in triplet format.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • afeidx (MSKint64t*) – Row indices of nonzeros. (output)

  • varidx (MSKint32t*) – Column indices of nonzeros. (output)

  • val (MSKrealt*) – Values of nonzero entries. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions, Inspecting the task

MSK_getafeg
MSKrescodee (MSKAPI MSK_getafeg) (
  MSKtask_t task,
  MSKint64t afeidx,
  MSKrealt * g)

Obtains a single coefficient in \(g\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • afeidx (MSKint64t) – Index of an element in \(g\). (input)

  • g (MSKrealt by reference) – The value of \(g_{\mathrm{afeidx}}\). (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions, Inspecting the task

MSK_getafegslice
MSKrescodee (MSKAPI MSK_getafegslice) (
  MSKtask_t task,
  MSKint64t first,
  MSKint64t last,
  MSKrealt * g)

Obtains a sequence of elements from the vector \(g\) of constant terms in the affine expressions list.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • first (MSKint64t) – First index in the sequence. (input)

  • last (MSKint64t) – Last index plus 1 in the sequence. (input)

  • g (MSKrealt*) – The slice \(g\) as a dense vector. The length is last-first. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - affine expressions

MSK_getaij
MSKrescodee (MSKAPI MSK_getaij) (
  MSKtask_t task,
  MSKint32t i,
  MSKint32t j,
  MSKrealt * aij)

Obtains a single coefficient in \(A\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • i (MSKint32t) – Row index of the coefficient to be returned. (input)

  • j (MSKint32t) – Column index of the coefficient to be returned. (input)

  • aij (MSKrealt by reference) – The required coefficient \(a_{i,j}\). (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task

MSK_getapiecenumnz
MSKrescodee (MSKAPI MSK_getapiecenumnz) (
  MSKtask_t task,
  MSKint32t firsti,
  MSKint32t lasti,
  MSKint32t firstj,
  MSKint32t lastj,
  MSKint32t * numnz)

Obtains the number non-zeros in a rectangular piece of \(A\), i.e. the number of elements in the set

\[\{ (i,j)~:~ a_{i,j} \neq 0,~ \mathtt{firsti} \leq i \leq \mathtt{lasti}-1, ~\mathtt{firstj} \leq j \leq \mathtt{lastj}-1\}\]

This function is not an efficient way to obtain the number of non-zeros in one row or column. In that case use the function MSK_getarownumnz or MSK_getacolnumnz.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • firsti (MSKint32t) – Index of the first row in the rectangular piece. (input)

  • lasti (MSKint32t) – Index of the last row plus one in the rectangular piece. (input)

  • firstj (MSKint32t) – Index of the first column in the rectangular piece. (input)

  • lastj (MSKint32t) – Index of the last column plus one in the rectangular piece. (input)

  • numnz (MSKint32t by reference) – Number of non-zero \(A\) elements in the rectangular piece. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task

MSK_getarow
MSKrescodee (MSKAPI MSK_getarow) (
  MSKtask_t task,
  MSKint32t i,
  MSKint32t * nzi,
  MSKint32t * subi,
  MSKrealt * vali)

Obtains one row of \(A\) in a sparse format.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • i (MSKint32t) – Index of the row. (input)

  • nzi (MSKint32t by reference) – Number of non-zeros in the row obtained. (output)

  • subi (MSKint32t*) – Column indices of the non-zeros in the row obtained. (output)

  • vali (MSKrealt*) – Numerical values of the row obtained. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task

MSK_getarownumnz
MSKrescodee (MSKAPI MSK_getarownumnz) (
  MSKtask_t task,
  MSKint32t i,
  MSKint32t * nzi)

Obtains the number of non-zero elements in one row of \(A\).

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task

MSK_getarowslice
MSKrescodee (MSKAPI MSK_getarowslice) (
  MSKtask_t task,
  MSKint32t first,
  MSKint32t last,
  MSKint32t maxnumnz,
  MSKint32t * ptrb,
  MSKint32t * ptre,
  MSKint32t * sub,
  MSKrealt * val)

Obtains a sequence of rows from \(A\) in sparse format.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • first (MSKint32t) – Index of the first row in the sequence. (input)

  • last (MSKint32t) – Index of the last row in the sequence plus one. (input)

  • maxnumnz (MSKint32t) – Denotes the length of the arrays sub and val. (input)

  • ptrb (MSKint32t*) – ptrb[t] is an index pointing to the first element in the \(t\)-th row obtained. (output)

  • ptre (MSKint32t*) – ptre[t] is an index pointing to the last element plus one in the \(t\)-th row obtained. (output)

  • sub (MSKint32t*) – Contains the column subscripts. (output)

  • val (MSKrealt*) – Contains the coefficient values. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task

MSK_getarowslice64
MSKrescodee (MSKAPI MSK_getarowslice64) (
  MSKtask_t task,
  MSKint32t first,
  MSKint32t last,
  MSKint64t maxnumnz,
  MSKint64t * ptrb,
  MSKint64t * ptre,
  MSKint32t * sub,
  MSKrealt * val)

Obtains a sequence of rows from \(A\) in sparse format.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • first (MSKint32t) – Index of the first row in the sequence. (input)

  • last (MSKint32t) – Index of the last row in the sequence plus one. (input)

  • maxnumnz (MSKint64t) – Denotes the length of the arrays sub and val. (input)

  • ptrb (MSKint64t*) – ptrb[t] is an index pointing to the first element in the \(t\)-th row obtained. (output)

  • ptre (MSKint64t*) – ptre[t] is an index pointing to the last element plus one in the \(t\)-th row obtained. (output)

  • sub (MSKint32t*) – Contains the column subscripts. (output)

  • val (MSKrealt*) – Contains the coefficient values. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task

MSK_getarowslicenumnz
MSKrescodee (MSKAPI MSK_getarowslicenumnz) (
  MSKtask_t task,
  MSKint32t first,
  MSKint32t last,
  MSKint32t * numnz)

Obtains the number of non-zeros in a slice of rows of \(A\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • first (MSKint32t) – Index of the first row in the sequence. (input)

  • last (MSKint32t) – Index of the last row plus one in the sequence. (input)

  • numnz (MSKint32t by reference) – Number of non-zeros in the slice. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task

MSK_getarowslicenumnz64
MSKrescodee (MSKAPI MSK_getarowslicenumnz64) (
  MSKtask_t task,
  MSKint32t first,
  MSKint32t last,
  MSKint64t * numnz)

Obtains the number of non-zeros in a slice of rows of \(A\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • first (MSKint32t) – Index of the first row in the sequence. (input)

  • last (MSKint32t) – Index of the last row plus one in the sequence. (input)

  • numnz (MSKint64t by reference) – Number of non-zeros in the slice. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task

MSK_getarowslicetrip
MSKrescodee (MSKAPI MSK_getarowslicetrip) (
  MSKtask_t task,
  MSKint32t first,
  MSKint32t last,
  MSKint64t maxnumnz,
  MSKint32t * subi,
  MSKint32t * subj,
  MSKrealt * val)

Obtains a sequence of rows from \(A\) in sparse triplet format. The function returns the content of all rows whose index i satisfies first <= i < last. The triplets corresponding to nonzero entries are stored in the arrays subi, subj and val.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • first (MSKint32t) – Index of the first row in the sequence. (input)

  • last (MSKint32t) – Index of the last row in the sequence plus one. (input)

  • maxnumnz (MSKint64t) – Denotes the length of the arrays subi, subj, and val. (input)

  • subi (MSKint32t*) – Constraint subscripts. (output)

  • subj (MSKint32t*) – Column subscripts. (output)

  • val (MSKrealt*) – Values. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task

MSK_getatrip
MSKrescodee (MSKAPI MSK_getatrip) (
  MSKtask_t task,
  MSKint64t maxnumnz,
  MSKint32t * subi,
  MSKint32t * subj,
  MSKrealt * val)

Obtains \(A\) in sparse triplet format. The triplets corresponding to nonzero entries are stored in the arrays subi, subj and val.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • maxnumnz (MSKint64t) – Denotes the length of the arrays subi, subj, and val. (input)

  • subi (MSKint32t*) – Constraint subscripts. (output)

  • subj (MSKint32t*) – Column subscripts. (output)

  • val (MSKrealt*) – Values. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task

MSK_getatruncatetol
MSKrescodee (MSKAPI MSK_getatruncatetol) (
  MSKtask_t task,
  MSKrealt * tolzero)

Obtains the tolerance value set with MSK_putatruncatetol.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • tolzero (MSKrealt*) – All elements \(|a_{i,j}|\) less than this tolerance is truncated to zero. (output)

Return

(MSKrescodee) – The function response code.

Groups

Parameters, Problem data - linear part

MSK_getbarablocktriplet
MSKrescodee (MSKAPI MSK_getbarablocktriplet) (
  MSKtask_t task,
  MSKint64t maxnum,
  MSKint64t * num,
  MSKint32t * subi,
  MSKint32t * subj,
  MSKint32t * subk,
  MSKint32t * subl,
  MSKrealt * valijkl)

Obtains \(\barA\) in block triplet form.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • maxnum (MSKint64t) – subi, subj, subk, subl and valijkl must be maxnum long. (input)

  • num (MSKint64t by reference) – Number of elements in the block triplet form. (output)

  • subi (MSKint32t*) – Constraint index. (output)

  • subj (MSKint32t*) – Symmetric matrix variable index. (output)

  • subk (MSKint32t*) – Block row index. (output)

  • subl (MSKint32t*) – Block column index. (output)

  • valijkl (MSKrealt*) – The numerical value associated with each block triplet. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite, Inspecting the task

MSK_getbaraidx
MSKrescodee (MSKAPI MSK_getbaraidx) (
  MSKtask_t task,
  MSKint64t idx,
  MSKint64t maxnum,
  MSKint32t * i,
  MSKint32t * j,
  MSKint64t * num,
  MSKint64t * sub,
  MSKrealt * weights)

Obtains information about an element in \(\barA\). Since \(\barA\) is a sparse matrix of symmetric matrices, only the nonzero elements in \(\barA\) are stored in order to save space. Now \(\barA\) is stored vectorized i.e. as one long vector. This function makes it possible to obtain information such as the row index and the column index of a particular element of the vectorized form of \(\barA\).

Please observe if one element of \(\barA\) is inputted multiple times then it may be stored several times in vectorized form. In that case the element with the highest index is the one that is used.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • idx (MSKint64t) – Position of the element in the vectorized form. (input)

  • maxnum (MSKint64t) – sub and weights must be at least maxnum long. (input)

  • i (MSKint32t by reference) – Row index of the element at position idx. (output)

  • j (MSKint32t by reference) – Column index of the element at position idx. (output)

  • num (MSKint64t by reference) – Number of terms in weighted sum that forms the element. (output)

  • sub (MSKint64t*) – A list indexes of the elements from symmetric matrix storage that appear in the weighted sum. (output)

  • weights (MSKrealt*) – The weights associated with each term in the weighted sum. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite, Inspecting the task

MSK_getbaraidxij
MSKrescodee (MSKAPI MSK_getbaraidxij) (
  MSKtask_t task,
  MSKint64t idx,
  MSKint32t * i,
  MSKint32t * j)

Obtains information about an element in \(\barA\). Since \(\barA\) is a sparse matrix of symmetric matrices, only the nonzero elements in \(\barA\) are stored in order to save space. Now \(\barA\) is stored vectorized i.e. as one long vector. This function makes it possible to obtain information such as the row index and the column index of a particular element of the vectorized form of \(\barA\).

Please note that if one element of \(\barA\) is inputted multiple times then it may be stored several times in vectorized form. In that case the element with the highest index is the one that is used.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite, Inspecting the task

MSK_getbaraidxinfo
MSKrescodee (MSKAPI MSK_getbaraidxinfo) (
  MSKtask_t task,
  MSKint64t idx,
  MSKint64t * num)

Each nonzero element in \(\barA_{ij}\) is formed as a weighted sum of symmetric matrices. Using this function the number of terms in the weighted sum can be obtained. See description of MSK_appendsparsesymmat for details about the weighted sum.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • idx (MSKint64t) – The internal position of the element for which information should be obtained. (input)

  • num (MSKint64t by reference) – Number of terms in the weighted sum that form the specified element in \(\barA\). (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite, Inspecting the task

MSK_getbarasparsity
MSKrescodee (MSKAPI MSK_getbarasparsity) (
  MSKtask_t task,
  MSKint64t maxnumnz,
  MSKint64t * numnz,
  MSKint64t * idxij)

The matrix \(\barA\) is assumed to be a sparse matrix of symmetric matrices. This implies that many of the elements in \(\barA\) are likely to be zero matrices. Therefore, in order to save space, only nonzero elements in \(\barA\) are stored on vectorized form. This function is used to obtain the sparsity pattern of \(\barA\) and the position of each nonzero element in the vectorized form of \(\barA\). From the index detailed information about each nonzero \(\barA_{i,j}\) can be obtained using MSK_getbaraidxinfo and MSK_getbaraidx.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • maxnumnz (MSKint64t) – The array idxij must be at least maxnumnz long. (input)

  • numnz (MSKint64t by reference) – Number of nonzero elements in \(\barA\). (output)

  • idxij (MSKint64t*) – Position of each nonzero element in the vectorized form of \(\barA\). (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite, Inspecting the task

MSK_getbarcblocktriplet
MSKrescodee (MSKAPI MSK_getbarcblocktriplet) (
  MSKtask_t task,
  MSKint64t maxnum,
  MSKint64t * num,
  MSKint32t * subj,
  MSKint32t * subk,
  MSKint32t * subl,
  MSKrealt * valjkl)

Obtains \(\barC\) in block triplet form.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • maxnum (MSKint64t) – subj, subk, subl and valjkl must be maxnum long. (input)

  • num (MSKint64t by reference) – Number of elements in the block triplet form. (output)

  • subj (MSKint32t*) – Symmetric matrix variable index. (output)

  • subk (MSKint32t*) – Block row index. (output)

  • subl (MSKint32t*) – Block column index. (output)

  • valjkl (MSKrealt*) – The numerical value associated with each block triplet. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite, Inspecting the task

MSK_getbarcidx
MSKrescodee (MSKAPI MSK_getbarcidx) (
  MSKtask_t task,
  MSKint64t idx,
  MSKint64t maxnum,
  MSKint32t * j,
  MSKint64t * num,
  MSKint64t * sub,
  MSKrealt * weights)

Obtains information about an element in \(\barC\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • idx (MSKint64t) – Index of the element for which information should be obtained. (input)

  • maxnum (MSKint64t) – sub and weights must be at least maxnum long. (input)

  • j (MSKint32t by reference) – Row index in \(\barC\). (output)

  • num (MSKint64t by reference) – Number of terms in the weighted sum. (output)

  • sub (MSKint64t*) – Elements appearing the weighted sum. (output)

  • weights (MSKrealt*) – Weights of terms in the weighted sum. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite, Inspecting the task

MSK_getbarcidxinfo
MSKrescodee (MSKAPI MSK_getbarcidxinfo) (
  MSKtask_t task,
  MSKint64t idx,
  MSKint64t * num)

Obtains the number of terms in the weighted sum that forms a particular element in \(\barC\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • idx (MSKint64t) – Index of the element for which information should be obtained. The value is an index of a symmetric sparse variable. (input)

  • num (MSKint64t by reference) – Number of terms that appear in the weighted sum that forms the requested element. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite, Inspecting the task

MSK_getbarcidxj
MSKrescodee (MSKAPI MSK_getbarcidxj) (
  MSKtask_t task,
  MSKint64t idx,
  MSKint32t * j)

Obtains the row index of an element in \(\barC\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • idx (MSKint64t) – Index of the element for which information should be obtained. (input)

  • j (MSKint32t by reference) – Row index in \(\barC\). (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite, Inspecting the task

MSK_getbarcsparsity
MSKrescodee (MSKAPI MSK_getbarcsparsity) (
  MSKtask_t task,
  MSKint64t maxnumnz,
  MSKint64t * numnz,
  MSKint64t * idxj)

Internally only the nonzero elements of \(\barC\) are stored in a vector. This function is used to obtain the nonzero elements of \(\barC\) and their indexes in the internal vector representation (in idx). From the index detailed information about each nonzero \(\barC_j\) can be obtained using MSK_getbarcidxinfo and MSK_getbarcidx.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • maxnumnz (MSKint64t) – idxj must be at least maxnumnz long. (input)

  • numnz (MSKint64t by reference) – Number of nonzero elements in \(\barC\). (output)

  • idxj (MSKint64t*) – Internal positions of the nonzeros elements in \(\barC\). (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite, Inspecting the task

MSK_getbarsj
MSKrescodee (MSKAPI MSK_getbarsj) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t j,
  MSKrealt * barsj)

Obtains the dual solution for a semidefinite variable. Only the lower triangular part of \(\barS_j\) is returned because the matrix by construction is symmetric. The format is that the columns are stored sequentially in the natural order.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • j (MSKint32t) – Index of the semidefinite variable. (input)

  • barsj (MSKrealt*) – Value of \(\barS_j\). (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - semidefinite

MSK_getbarsslice
MSKrescodee (MSKAPI MSK_getbarsslice) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t first,
  MSKint32t last,
  MSKint64t slicesize,
  MSKrealt * barsslice)

Obtains the dual solution for a sequence of semidefinite variables. The format is that matrices are stored sequentially, and in each matrix the columns are stored as in MSK_getbarsj.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • first (MSKint32t) – Index of the first semidefinite variable in the slice. (input)

  • last (MSKint32t) – Index of the last semidefinite variable in the slice plus one. (input)

  • slicesize (MSKint64t) – Denotes the length of the array barsslice. (input)

  • barsslice (MSKrealt*) – Dual solution values of symmetric matrix variables in the slice, stored sequentially. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - semidefinite

MSK_getbarvarname
MSKrescodee (MSKAPI MSK_getbarvarname) (
  MSKtask_t task,
  MSKint32t i,
  MSKint32t sizename,
  char * name)

Obtains the name of a semidefinite variable.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • i (MSKint32t) – Index of the variable. (input)

  • sizename (MSKint32t) – Length of the name buffer. (input)

  • name (char*) – The requested name is copied to this buffer. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names, Inspecting the task

MSK_getbarvarnameindex
MSKrescodee (MSKAPI MSK_getbarvarnameindex) (
  MSKtask_t task,
  const char * somename,
  MSKint32t * asgn,
  MSKint32t * index)

Obtains the index of semidefinite variable from its name.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • somename (char*) – The name of the variable. (input)

  • asgn (MSKint32t by reference) – Non-zero if the name somename is assigned to some semidefinite variable. (output)

  • index (MSKint32t by reference) – The index of a semidefinite variable with the name somename (if one exists). (output)

Return

(MSKrescodee) – The function response code.

Groups

Names, Inspecting the task

MSK_getbarvarnamelen
MSKrescodee (MSKAPI MSK_getbarvarnamelen) (
  MSKtask_t task,
  MSKint32t i,
  MSKint32t * len)

Obtains the length of the name of a semidefinite variable.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Names, Inspecting the task

MSK_getbarxj
MSKrescodee (MSKAPI MSK_getbarxj) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t j,
  MSKrealt * barxj)

Obtains the primal solution for a semidefinite variable. Only the lower triangular part of \(\barX_j\) is returned because the matrix by construction is symmetric. The format is that the columns are stored sequentially in the natural order.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • j (MSKint32t) – Index of the semidefinite variable. (input)

  • barxj (MSKrealt*) – Value of \(\barX_j\). (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - semidefinite

MSK_getbarxslice
MSKrescodee (MSKAPI MSK_getbarxslice) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t first,
  MSKint32t last,
  MSKint64t slicesize,
  MSKrealt * barxslice)

Obtains the primal solution for a sequence of semidefinite variables. The format is that matrices are stored sequentially, and in each matrix the columns are stored as in MSK_getbarxj.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • first (MSKint32t) – Index of the first semidefinite variable in the slice. (input)

  • last (MSKint32t) – Index of the last semidefinite variable in the slice plus one. (input)

  • slicesize (MSKint64t) – Denotes the length of the array barxslice. (input)

  • barxslice (MSKrealt*) – Solution values of symmetric matrix variables in the slice, stored sequentially. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - semidefinite

MSK_getbuildinfo
MSKrescodee (MSKAPI MSK_getbuildinfo) (
  char * buildstate,
  char * builddate)

Obtains build information.

Parameters
  • buildstate (char*) – State of binaries, i.e. a debug, release candidate or final release. (output)

  • builddate (char*) – Date when the binaries were built. (output)

Return

(MSKrescodee) – The function response code.

Groups

Versions

MSK_getc
MSKrescodee (MSKAPI MSK_getc) (
  MSKtask_t task,
  MSKrealt * c)

Obtains all objective coefficients \(c\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • c (MSKrealt*) – Linear terms of the objective as a dense vector. The length is the number of variables. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task, Problem data - variables

MSK_getcallbackfunc
MSKrescodee (MSKAPI MSK_getcallbackfunc) (
  MSKtask_t task,
  MSKcallbackfunc * func,
  MSKuserhandle_t * handle)

Obtains the current user-defined callback function and associated user handle.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • func (MSKcallbackfunc by reference) – Get the user-defined progress callback function MSKcallbackfunc associated with task. If func is identical to NULL, then no callback function is associated with the task. (output)

  • handle (MSKuserhandle_t by reference) – The user-defined pointer associated with the user-defined callback function. (output)

Return

(MSKrescodee) – The function response code.

Groups

Callback

MSK_getcfix
MSKrescodee (MSKAPI MSK_getcfix) (
  MSKtask_t task,
  MSKrealt * cfix)

Obtains the fixed term in the objective.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task

MSK_getcj
MSKrescodee (MSKAPI MSK_getcj) (
  MSKtask_t task,
  MSKint32t j,
  MSKrealt * cj)

Obtains one coefficient of \(c\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • j (MSKint32t) – Index of the variable for which the \(c\) coefficient should be obtained. (input)

  • cj (MSKrealt by reference) – The value of \(c_j\). (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task, Problem data - variables

MSK_getclist
MSKrescodee (MSKAPI MSK_getclist) (
  MSKtask_t task,
  MSKint32t num,
  const MSKint32t * subj,
  MSKrealt * c)

Obtains a sequence of elements in \(c\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • num (MSKint32t) – Number of variables for which the c values should be obtained. (input)

  • subj (MSKint32t*) – A list of variable indexes. (input)

  • c (MSKrealt*) – Linear terms of the requested list of the objective as a dense vector. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - linear part

MSK_getcodedesc
MSKrescodee (MSKAPI MSK_getcodedesc) (
  MSKrescodee code,
  char * symname,
  char * str)

Obtains a short description of the meaning of the response code given by code.

Parameters
  • code (MSKrescodee) – A valid MOSEK response code. (input)

  • symname (char*) – Symbolic name corresponding to code. (output)

  • str (char*) – Obtains a short description of a response code. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names, Responses, errors and warnings

MSK_getconbound
MSKrescodee (MSKAPI MSK_getconbound) (
  MSKtask_t task,
  MSKint32t i,
  MSKboundkeye * bk,
  MSKrealt * bl,
  MSKrealt * bu)

Obtains bound information for one constraint.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task, Problem data - bounds, Problem data - constraints

MSK_getconboundslice
MSKrescodee (MSKAPI MSK_getconboundslice) (
  MSKtask_t task,
  MSKint32t first,
  MSKint32t last,
  MSKboundkeye * bk,
  MSKrealt * bl,
  MSKrealt * bu)

Obtains bounds information for a slice of the constraints.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • first (MSKint32t) – First index in the sequence. (input)

  • last (MSKint32t) – Last index plus 1 in the sequence. (input)

  • bk (MSKboundkeye*) – Bound keys. (output)

  • bl (MSKrealt*) – Values for lower bounds. (output)

  • bu (MSKrealt*) – Values for upper bounds. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task, Problem data - bounds, Problem data - constraints

MSK_getcone Deprecated
MSKrescodee (MSKAPI MSK_getcone) (
  MSKtask_t task,
  MSKint32t k,
  MSKconetypee * ct,
  MSKrealt * conepar,
  MSKint32t * nummem,
  MSKint32t * submem)

NOTE: This interface to conic optimization is deprecated and will be removed in a future major release. Conic problems should be specified using the affine conic constraints interface (ACC), see Sec. 6.2 (From Linear to Conic Optimization) for details.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • k (MSKint32t) – Index of the cone. (input)

  • ct (MSKconetypee by reference) – Specifies the type of the cone. (output)

  • conepar (MSKrealt by reference) – For the power cone it denotes the exponent alpha. For other cone types it is unused and can be set to 0. (output)

  • nummem (MSKint32t by reference) – Number of member variables in the cone. (output)

  • submem (MSKint32t*) – Variable subscripts of the members in the cone. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - cones (deprecated)

MSK_getconeinfo Deprecated
MSKrescodee (MSKAPI MSK_getconeinfo) (
  MSKtask_t task,
  MSKint32t k,
  MSKconetypee * ct,
  MSKrealt * conepar,
  MSKint32t * nummem)

NOTE: This interface to conic optimization is deprecated and will be removed in a future major release. Conic problems should be specified using the affine conic constraints interface (ACC), see Sec. 6.2 (From Linear to Conic Optimization) for details.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - cones (deprecated)

MSK_getconename Deprecated
MSKrescodee (MSKAPI MSK_getconename) (
  MSKtask_t task,
  MSKint32t i,
  MSKint32t sizename,
  char * name)

NOTE: This interface to conic optimization is deprecated and will be removed in a future major release. Conic problems should be specified using the affine conic constraints interface (ACC), see Sec. 6.2 (From Linear to Conic Optimization) for details.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • i (MSKint32t) – Index of the cone. (input)

  • sizename (MSKint32t) – Maximum length of a name that can be stored in name. (input)

  • name (char*) – The required name. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names, Problem data - cones (deprecated), Inspecting the task

MSK_getconenameindex Deprecated
MSKrescodee (MSKAPI MSK_getconenameindex) (
  MSKtask_t task,
  const char * somename,
  MSKint32t * asgn,
  MSKint32t * index)

NOTE: This interface to conic optimization is deprecated and will be removed in a future major release. Conic problems should be specified using the affine conic constraints interface (ACC), see Sec. 6.2 (From Linear to Conic Optimization) for details.

Checks whether the name somename has been assigned to any cone. If it has been assigned to a cone, then the index of the cone is reported.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • somename (char*) – The name which should be checked. (input)

  • asgn (MSKint32t by reference) – Is non-zero if the name somename is assigned to some cone. (output)

  • index (MSKint32t by reference) – If the name somename is assigned to some cone, then index is the index of the cone. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names, Problem data - cones (deprecated), Inspecting the task

MSK_getconenamelen Deprecated
MSKrescodee (MSKAPI MSK_getconenamelen) (
  MSKtask_t task,
  MSKint32t i,
  MSKint32t * len)

NOTE: This interface to conic optimization is deprecated and will be removed in a future major release. Conic problems should be specified using the affine conic constraints interface (ACC), see Sec. 6.2 (From Linear to Conic Optimization) for details.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Names, Problem data - cones (deprecated), Inspecting the task

MSK_getconname
MSKrescodee (MSKAPI MSK_getconname) (
  MSKtask_t task,
  MSKint32t i,
  MSKint32t sizename,
  char * name)

Obtains the name of a constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • i (MSKint32t) – Index of the constraint. (input)

  • sizename (MSKint32t) – Maximum length of name that can be stored in name. (input)

  • name (char*) – The required name. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names, Problem data - linear part, Problem data - constraints, Inspecting the task

MSK_getconnameindex
MSKrescodee (MSKAPI MSK_getconnameindex) (
  MSKtask_t task,
  const char * somename,
  MSKint32t * asgn,
  MSKint32t * index)

Checks whether the name somename has been assigned to any constraint. If so, the index of the constraint is reported.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • somename (char*) – The name which should be checked. (input)

  • asgn (MSKint32t by reference) – Is non-zero if the name somename is assigned to some constraint. (output)

  • index (MSKint32t by reference) – If the name somename is assigned to a constraint, then index is the index of the constraint. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names, Problem data - linear part, Problem data - constraints, Inspecting the task

MSK_getconnamelen
MSKrescodee (MSKAPI MSK_getconnamelen) (
  MSKtask_t task,
  MSKint32t i,
  MSKint32t * len)

Obtains the length of the name of a constraint.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Names, Problem data - linear part, Problem data - constraints, Inspecting the task

MSK_getcslice
MSKrescodee (MSKAPI MSK_getcslice) (
  MSKtask_t task,
  MSKint32t first,
  MSKint32t last,
  MSKrealt * c)

Obtains a sequence of elements in \(c\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • first (MSKint32t) – First index in the sequence. (input)

  • last (MSKint32t) – Last index plus 1 in the sequence. (input)

  • c (MSKrealt*) – Linear terms of the requested slice of the objective as a dense vector. The length is last-first. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - linear part

MSK_getdimbarvarj
MSKrescodee (MSKAPI MSK_getdimbarvarj) (
  MSKtask_t task,
  MSKint32t j,
  MSKint32t * dimbarvarj)

Obtains the dimension of a symmetric matrix variable.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • j (MSKint32t) – Index of the semidefinite variable whose dimension is requested. (input)

  • dimbarvarj (MSKint32t by reference) – The dimension of the \(j\)-th semidefinite variable. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - semidefinite

MSK_getdjcafeidxlist
MSKrescodee (MSKAPI MSK_getdjcafeidxlist) (
  MSKtask_t task,
  MSKint64t djcidx,
  MSKint64t * afeidxlist)

Obtains the list of affine expression indexes in a disjunctive constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • djcidx (MSKint64t) – Index of the disjunctive constraint. (input)

  • afeidxlist (MSKint64t*) – List of affine expression indexes. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - disjunctive constraints, Inspecting the task

MSK_getdjcb
MSKrescodee (MSKAPI MSK_getdjcb) (
  MSKtask_t task,
  MSKint64t djcidx,
  MSKrealt * b)

Obtains the optional constant term vector of a disjunctive constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • djcidx (MSKint64t) – Index of the disjunctive constraint. (input)

  • b (MSKrealt*) – The vector b. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - disjunctive constraints, Inspecting the task

MSK_getdjcdomainidxlist
MSKrescodee (MSKAPI MSK_getdjcdomainidxlist) (
  MSKtask_t task,
  MSKint64t djcidx,
  MSKint64t * domidxlist)

Obtains the list of domain indexes in a disjunctive constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • djcidx (MSKint64t) – Index of the disjunctive constraint. (input)

  • domidxlist (MSKint64t*) – List of term sizes. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - disjunctive constraints, Inspecting the task

MSK_getdjcname
MSKrescodee (MSKAPI MSK_getdjcname) (
  MSKtask_t task,
  MSKint64t djcidx,
  MSKint32t sizename,
  char * name)

Obtains the name of a disjunctive constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • djcidx (MSKint64t) – Index of a disjunctive constraint. (input)

  • sizename (MSKint32t) – The length of the buffer pointed to by the name argument. (input)

  • name (char*) – Returns the required name. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names, Problem data - disjunctive constraints, Inspecting the task

MSK_getdjcnamelen
MSKrescodee (MSKAPI MSK_getdjcnamelen) (
  MSKtask_t task,
  MSKint64t djcidx,
  MSKint32t * len)

Obtains the length of the name of a disjunctive constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • djcidx (MSKint64t) – Index of a disjunctive constraint. (input)

  • len (MSKint32t by reference) – Returns the length of the indicated name. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names, Problem data - disjunctive constraints, Inspecting the task

MSK_getdjcnumafe
MSKrescodee (MSKAPI MSK_getdjcnumafe) (
  MSKtask_t task,
  MSKint64t djcidx,
  MSKint64t * numafe)

Obtains the number of affine expressions in the disjunctive constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • djcidx (MSKint64t) – Index of the disjunctive constraint. (input)

  • numafe (MSKint64t by reference) – Number of affine expressions in the disjunctive constraint. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - disjunctive constraints, Inspecting the task

MSK_getdjcnumafetot
MSKrescodee (MSKAPI MSK_getdjcnumafetot) (
  MSKtask_t task,
  MSKint64t * numafetot)

Obtains the total number of affine expressions in all disjunctive constraints.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • numafetot (MSKint64t by reference) – Number of affine expressions in all disjunctive constraints. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - disjunctive constraints, Inspecting the task

MSK_getdjcnumdomain
MSKrescodee (MSKAPI MSK_getdjcnumdomain) (
  MSKtask_t task,
  MSKint64t djcidx,
  MSKint64t * numdomain)

Obtains the number of domains in the disjunctive constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • djcidx (MSKint64t) – Index of the disjunctive constraint. (input)

  • numdomain (MSKint64t by reference) – Number of domains in the disjunctive constraint. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - disjunctive constraints, Inspecting the task

MSK_getdjcnumdomaintot
MSKrescodee (MSKAPI MSK_getdjcnumdomaintot) (
  MSKtask_t task,
  MSKint64t * numdomaintot)

Obtains the total number of domains in all disjunctive constraints.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • numdomaintot (MSKint64t by reference) – Number of domains in all disjunctive constraints. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - disjunctive constraints, Inspecting the task

MSK_getdjcnumterm
MSKrescodee (MSKAPI MSK_getdjcnumterm) (
  MSKtask_t task,
  MSKint64t djcidx,
  MSKint64t * numterm)

Obtains the number terms in the disjunctive constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • djcidx (MSKint64t) – Index of the disjunctive constraint. (input)

  • numterm (MSKint64t by reference) – Number of terms in the disjunctive constraint. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - disjunctive constraints, Inspecting the task

MSK_getdjcnumtermtot
MSKrescodee (MSKAPI MSK_getdjcnumtermtot) (
  MSKtask_t task,
  MSKint64t * numtermtot)

Obtains the total number of terms in all disjunctive constraints.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • numtermtot (MSKint64t by reference) – Total number of terms in all disjunctive constraints. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - disjunctive constraints, Inspecting the task

MSK_getdjcs
MSKrescodee (MSKAPI MSK_getdjcs) (
  MSKtask_t task,
  MSKint64t * domidxlist,
  MSKint64t * afeidxlist,
  MSKrealt * b,
  MSKint64t * termsizelist,
  MSKint64t * numterms)

Obtains full data of all disjunctive constraints. The output arrays must have minimal lengths determined by the following methods: domainidxlist by MSK_getdjcnumdomaintot, afeidxlist and b by MSK_getdjcnumafetot, termsizelist by MSK_getdjcnumtermtot and numterms by MSK_getnumdomain.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • domidxlist (MSKint64t*) – The concatenation of index lists of domains appearing in all disjunctive constraints. (output)

  • afeidxlist (MSKint64t*) – The concatenation of index lists of affine expressions appearing in all disjunctive constraints. (output)

  • b (MSKrealt*) – The concatenation of vectors b appearing in all disjunctive constraints. (output)

  • termsizelist (MSKint64t*) – The concatenation of lists of term sizes appearing in all disjunctive constraints. (output)

  • numterms (MSKint64t*) – The number of terms in each of the disjunctive constraints. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - disjunctive constraints, Inspecting the task

MSK_getdjctermsizelist
MSKrescodee (MSKAPI MSK_getdjctermsizelist) (
  MSKtask_t task,
  MSKint64t djcidx,
  MSKint64t * termsizelist)

Obtains the list of term sizes in a disjunctive constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • djcidx (MSKint64t) – Index of the disjunctive constraint. (input)

  • termsizelist (MSKint64t*) – List of term sizes. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - disjunctive constraints, Inspecting the task

MSK_getdomainn
MSKrescodee (MSKAPI MSK_getdomainn) (
  MSKtask_t task,
  MSKint64t domidx,
  MSKint64t * n)

Obtains the dimension of the domain.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain, Inspecting the task

MSK_getdomainname
MSKrescodee (MSKAPI MSK_getdomainname) (
  MSKtask_t task,
  MSKint64t domidx,
  MSKint32t sizename,
  char * name)

Obtains the name of a domain.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • domidx (MSKint64t) – Index of a domain. (input)

  • sizename (MSKint32t) – The length of the buffer pointed to by the name argument. (input)

  • name (char*) – Returns the required name. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names, Problem data - domain, Inspecting the task

MSK_getdomainnamelen
MSKrescodee (MSKAPI MSK_getdomainnamelen) (
  MSKtask_t task,
  MSKint64t domidx,
  MSKint32t * len)

Obtains the length of the name of a domain.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Names, Problem data - domain, Inspecting the task

MSK_getdomaintype
MSKrescodee (MSKAPI MSK_getdomaintype) (
  MSKtask_t task,
  MSKint64t domidx,
  MSKdomaintypee * domtype)

Returns the type of the domain.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain, Inspecting the task

MSK_getdouinf
MSKrescodee (MSKAPI MSK_getdouinf) (
  MSKtask_t task,
  MSKdinfiteme whichdinf,
  MSKrealt * dvalue)

Obtains a double information item from the task information database.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichdinf (MSKdinfiteme) – Specifies a double information item. (input)

  • dvalue (MSKrealt by reference) – The value of the required double information item. (output)

Return

(MSKrescodee) – The function response code.

Groups

Information items and statistics

MSK_getdouparam
MSKrescodee (MSKAPI MSK_getdouparam) (
  MSKtask_t task,
  MSKdparame param,
  MSKrealt * parvalue)

Obtains the value of a double parameter.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Parameters

MSK_getdualobj
MSKrescodee (MSKAPI MSK_getdualobj) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKrealt * dualobj)

Computes the dual objective value associated with the solution. Note that if the solution is a primal infeasibility certificate, then the fixed term in the objective value is not included.

Moreover, since there is no dual solution associated with an integer solution, an error will be reported if the dual objective value is requested for the integer solution.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • dualobj (MSKrealt by reference) – Objective value corresponding to the dual solution. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information, Solution - dual

MSK_getdualsolutionnorms
MSKrescodee (MSKAPI MSK_getdualsolutionnorms) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKrealt * nrmy,
  MSKrealt * nrmslc,
  MSKrealt * nrmsuc,
  MSKrealt * nrmslx,
  MSKrealt * nrmsux,
  MSKrealt * nrmsnx,
  MSKrealt * nrmbars)

Compute norms of the dual solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getdviolacc
MSKrescodee (MSKAPI MSK_getdviolacc) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint64t numaccidx,
  const MSKint64t * accidxlist,
  MSKrealt * viol)

Let \((s_n^x)^*\) be the value of variable \((s_n^x)\) for the specified solution. For simplicity let us assume that \(s_n^x\) is a member of a quadratic cone, then the violation is computed as follows

\[\begin{split}\left\{ \begin{array}{ll} \max(0,(\|s_n^x\|_{2:n}^*-(s_n^x)_1^*) / \sqrt{2}, & (s_n^x)^* \geq -\|(s_n^x)_{2:n}^*\|, \\ \|(s_n^x)^*\|, & \mbox{otherwise.} \end{array} \right.\end{split}\]

Both when the solution is a certificate of primal infeasibility or when it is a dual feasible solution the violation should be small.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • numaccidx (MSKint64t) – Length of sub and viol. (input)

  • accidxlist (MSKint64t*) – An array of indexes of conic constraints. (input)

  • viol (MSKrealt*) – viol[k] is the violation of the dual solution associated with the conic constraint sub[k]. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getdviolbarvar
MSKrescodee (MSKAPI MSK_getdviolbarvar) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t num,
  const MSKint32t * sub,
  MSKrealt * viol)

Let \((\barS_j)^*\) be the value of variable \(\barS_j\) for the specified solution. Then the dual violation of the solution associated with variable \(\barS_j\) is given by

\[\max(-\lambda_{\min}(\barS_j),\ 0.0).\]

Both when the solution is a certificate of primal infeasibility and when it is dual feasible solution the violation should be small.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • num (MSKint32t) – Length of sub and viol. (input)

  • sub (MSKint32t*) – An array of indexes of \(\barX\) variables. (input)

  • viol (MSKrealt*) – viol[k] is the violation of the solution for the constraint \(\barS_{\mathtt{sub}[k]} \in \PSD\). (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getdviolcon
MSKrescodee (MSKAPI MSK_getdviolcon) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t num,
  const MSKint32t * sub,
  MSKrealt * viol)

The violation of the dual solution associated with the \(i\)-th constraint is computed as follows

\[\max( \rho( (s_l^c)_i^*,(b_l^c)_i ),\ \rho( (s_u^c)_i^*, -(b_u^c)_i ),\ |-y_i+(s_l^c)_i^*-(s_u^c)_i^*| )\]

where

\[\begin{split}\rho(x,l) = \left\{ \begin{array}{ll} -x, & l > -\infty , \\ |x|, & \mbox{otherwise}.\\ \end{array} \right.\end{split}\]

Both when the solution is a certificate of primal infeasibility or it is a dual feasible solution the violation should be small.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • num (MSKint32t) – Length of sub and viol. (input)

  • sub (MSKint32t*) – An array of indexes of constraints. (input)

  • viol (MSKrealt*) – viol[k] is the violation of dual solution associated with the constraint sub[k]. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getdviolcones Deprecated
MSKrescodee (MSKAPI MSK_getdviolcones) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t num,
  const MSKint32t * sub,
  MSKrealt * viol)

NOTE: This interface to conic optimization is deprecated and will be removed in a future major release. Conic problems should be specified using the affine conic constraints interface (ACC), see Sec. 6.2 (From Linear to Conic Optimization) for details.

Let \((s_n^x)^*\) be the value of variable \((s_n^x)\) for the specified solution. For simplicity let us assume that \(s_n^x\) is a member of a quadratic cone, then the violation is computed as follows

\[\begin{split}\left\{ \begin{array}{ll} \max(0,(\|s_n^x\|_{2:n}^*-(s_n^x)_1^*) / \sqrt{2}, & (s_n^x)^* \geq -\|(s_n^x)_{2:n}^*\|, \\ \|(s_n^x)^*\|, & \mbox{otherwise.} \end{array} \right.\end{split}\]

Both when the solution is a certificate of primal infeasibility or when it is a dual feasible solution the violation should be small.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • num (MSKint32t) – Length of sub and viol. (input)

  • sub (MSKint32t*) – An array of indexes of conic constraints. (input)

  • viol (MSKrealt*) – viol[k] is the violation of the dual solution associated with the conic constraint sub[k]. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getdviolvar
MSKrescodee (MSKAPI MSK_getdviolvar) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t num,
  const MSKint32t * sub,
  MSKrealt * viol)

The violation of the dual solution associated with the \(j\)-th variable is computed as follows

\[\max \left(\rho((s_l^x)_j^*,(b_l^x)_j),\ \rho((s_u^x)_j^*,-(b_u^x)_j),\ |\sum_{i=\idxbeg}^{\idxend{numcon}} a_{ij} y_i+(s_l^x)_j^*-(s_u^x)_j^* - \tau c_j| \right)\]

where

\[\begin{split}\rho(x,l) = \left\{ \begin{array}{ll} -x, & l > -\infty , \\ |x|, & \mbox{otherwise} \end{array} \right.\end{split}\]

and \(\tau=0\) if the solution is a certificate of primal infeasibility and \(\tau=1\) otherwise. The formula for computing the violation is only shown for the linear case but is generalized appropriately for the more general problems. Both when the solution is a certificate of primal infeasibility or when it is a dual feasible solution the violation should be small.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • num (MSKint32t) – Length of sub and viol. (input)

  • sub (MSKint32t*) – An array of indexes of \(x\) variables. (input)

  • viol (MSKrealt*) – viol[k] is the violation of dual solution associated with the variable sub[k]. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getenv
MSKrescodee (MSKAPI MSK_getenv) (
  MSKtask_t task,
  MSKenv_t * env)

Obtains the environment used to create the task.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Environment and task management

MSK_getinfeasiblesubproblem
MSKrescodee (MSKAPI MSK_getinfeasiblesubproblem) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKtask_t * inftask)

Given the solution is a certificate of primal or dual infeasibility then a primal or dual infeasible subproblem is obtained respectively. The subproblem tends to be much smaller than the original problem and hence it is easier to locate the infeasibility inspecting the subproblem than the original problem.

For the procedure to be useful it is important to assign meaningful names to constraints, variables etc. in the original task because those names will be duplicated in the subproblem.

The function is only applicable to linear and conic quadratic optimization problems.

For more information see Sec. 8.3 (Debugging infeasibility) and Sec. 14.2 (Automatic Repair of Infeasible Problems).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Which solution to use when determining the infeasible subproblem. (input)

  • inftask (MSKtask_t by reference) – A new task containing the infeasible subproblem. (output)

Return

(MSKrescodee) – The function response code.

Groups

Infeasibility diagnostic

MSK_getinfindex
MSKrescodee (MSKAPI MSK_getinfindex) (
  MSKtask_t task,
  MSKinftypee inftype,
  const char * infname,
  MSKint32t * infindex)

Obtains the index of a named information item.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • inftype (MSKinftypee) – Type of the information item. (input)

  • infname (char*) – Name of the information item. (input)

  • infindex (MSKint32t by reference) – The item index. (output)

Return

(MSKrescodee) – The function response code.

Groups

Information items and statistics

MSK_getinfmax
MSKrescodee (MSKAPI MSK_getinfmax) (
  MSKtask_t task,
  MSKinftypee inftype,
  MSKint32t * infmax)

Obtains the maximum index of an information item of a given type inftype plus 1.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • inftype (MSKinftypee) – Type of the information item. (input)

  • infmax (MSKint32t*) – The maximum index (plus 1) requested. (output)

Return

(MSKrescodee) – The function response code.

Groups

Information items and statistics

MSK_getinfname
MSKrescodee (MSKAPI MSK_getinfname) (
  MSKtask_t task,
  MSKinftypee inftype,
  MSKint32t whichinf,
  char * infname)

Obtains the name of an information item.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • inftype (MSKinftypee) – Type of the information item. (input)

  • whichinf (MSKint32t) – An information item. (input)

  • infname (char*) – Name of the information item. (output)

Return

(MSKrescodee) – The function response code.

Groups

Information items and statistics, Names

MSK_getintinf
MSKrescodee (MSKAPI MSK_getintinf) (
  MSKtask_t task,
  MSKiinfiteme whichiinf,
  MSKint32t * ivalue)

Obtains an integer information item from the task information database.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichiinf (MSKiinfiteme) – Specifies an integer information item. (input)

  • ivalue (MSKint32t by reference) – The value of the required integer information item. (output)

Return

(MSKrescodee) – The function response code.

Groups

Information items and statistics

MSK_getintparam
MSKrescodee (MSKAPI MSK_getintparam) (
  MSKtask_t task,
  MSKiparame param,
  MSKint32t * parvalue)

Obtains the value of an integer parameter.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Parameters

MSK_getlasterror
MSKrescodee (MSKAPI MSK_getlasterror) (
  MSKtask_t task,
  MSKrescodee * lastrescode,
  MSKint32t sizelastmsg,
  MSKint32t * lastmsglen,
  char * lastmsg)

Obtains the last response code and corresponding message reported in MOSEK.

If there is no previous error, warning or termination code for this task, lastrescode returns MSK_RES_OK and lastmsg returns an empty string, otherwise the last response code different from MSK_RES_OK and the corresponding message are returned.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • lastrescode (MSKrescodee by reference) – Returns the last error code reported in the task. (output)

  • sizelastmsg (MSKint32t) – The length of the lastmsg buffer. (input)

  • lastmsglen (MSKint32t by reference) – Returns the length of the last error message reported in the task. (output)

  • lastmsg (char*) – Returns the last error message reported in the task. (output)

Return

(MSKrescodee) – The function response code.

Groups

Responses, errors and warnings

MSK_getlasterror64
MSKrescodee (MSKAPI MSK_getlasterror64) (
  MSKtask_t task,
  MSKrescodee * lastrescode,
  MSKint64t sizelastmsg,
  MSKint64t * lastmsglen,
  char * lastmsg)

Obtains the last response code and corresponding message reported in MOSEK.

If there is no previous error, warning or termination code for this task, lastrescode returns MSK_RES_OK and lastmsg returns an empty string, otherwise the last response code different from MSK_RES_OK and the corresponding message are returned.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • lastrescode (MSKrescodee by reference) – Returns the last error code reported in the task. (output)

  • sizelastmsg (MSKint64t) – The length of the lastmsg buffer. (input)

  • lastmsglen (MSKint64t by reference) – Returns the length of the last error message reported in the task. (output)

  • lastmsg (char*) – Returns the last error message reported in the task. (output)

Return

(MSKrescodee) – The function response code.

Groups

Responses, errors and warnings

MSK_getlenbarvarj
MSKrescodee (MSKAPI MSK_getlenbarvarj) (
  MSKtask_t task,
  MSKint32t j,
  MSKint64t * lenbarvarj)

Obtains the length of the \(j\)-th semidefinite variable i.e. the number of elements in the lower triangular part.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • j (MSKint32t) – Index of the semidefinite variable whose length if requested. (input)

  • lenbarvarj (MSKint64t by reference) – Number of scalar elements in the lower triangular part of the semidefinite variable. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - semidefinite

MSK_getlintinf
MSKrescodee (MSKAPI MSK_getlintinf) (
  MSKtask_t task,
  MSKliinfiteme whichliinf,
  MSKint64t * ivalue)

Obtains a long integer information item from the task information database.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichliinf (MSKliinfiteme) – Specifies a long information item. (input)

  • ivalue (MSKint64t by reference) – The value of the required long integer information item. (output)

Return

(MSKrescodee) – The function response code.

Groups

Information items and statistics

MSK_getmaxnamelen
MSKrescodee (MSKAPI MSK_getmaxnamelen) (
  MSKtask_t task,
  MSKint32t * maxlen)

Obtains the maximum length (not including terminating zero character) of any objective, constraint, variable, domain or cone name.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Names

MSK_getmaxnumanz
MSKrescodee (MSKAPI MSK_getmaxnumanz) (
  MSKtask_t task,
  MSKint32t * maxnumanz)

Obtains number of preallocated non-zeros in \(A\). When this number of non-zeros is reached MOSEK will automatically allocate more space for \(A\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • maxnumanz (MSKint32t by reference) – Number of preallocated non-zero linear matrix elements. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - linear part

MSK_getmaxnumanz64
MSKrescodee (MSKAPI MSK_getmaxnumanz64) (
  MSKtask_t task,
  MSKint64t * maxnumanz)

Obtains number of preallocated non-zeros in \(A\). When this number of non-zeros is reached MOSEK will automatically allocate more space for \(A\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • maxnumanz (MSKint64t by reference) – Number of preallocated non-zero linear matrix elements. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - linear part

MSK_getmaxnumbarvar
MSKrescodee (MSKAPI MSK_getmaxnumbarvar) (
  MSKtask_t task,
  MSKint32t * maxnumbarvar)

Obtains maximum number of symmetric matrix variables for which space is currently preallocated.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • maxnumbarvar (MSKint32t by reference) – Maximum number of symmetric matrix variables for which space is currently preallocated. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - semidefinite

MSK_getmaxnumcon
MSKrescodee (MSKAPI MSK_getmaxnumcon) (
  MSKtask_t task,
  MSKint32t * maxnumcon)

Obtains the number of preallocated constraints in the optimization task. When this number of constraints is reached MOSEK will automatically allocate more space for constraints.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • maxnumcon (MSKint32t by reference) – Number of preallocated constraints in the optimization task. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - linear part, Problem data - constraints

MSK_getmaxnumcone Deprecated
MSKrescodee (MSKAPI MSK_getmaxnumcone) (
  MSKtask_t task,
  MSKint32t * maxnumcone)

NOTE: This interface to conic optimization is deprecated and will be removed in a future major release. Conic problems should be specified using the affine conic constraints interface (ACC), see Sec. 6.2 (From Linear to Conic Optimization) for details.

Obtains the number of preallocated cones in the optimization task. When this number of cones is reached MOSEK will automatically allocate space for more cones.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • maxnumcone (MSKint32t by reference) – Number of preallocated conic constraints in the optimization task. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - cones (deprecated)

MSK_getmaxnumqnz
MSKrescodee (MSKAPI MSK_getmaxnumqnz) (
  MSKtask_t task,
  MSKint32t * maxnumqnz)

Obtains the number of preallocated non-zeros for \(Q\) (both objective and constraints). When this number of non-zeros is reached MOSEK will automatically allocate more space for \(Q\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • maxnumqnz (MSKint32t by reference) – Number of non-zero elements preallocated in quadratic coefficient matrices. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - quadratic part

MSK_getmaxnumqnz64
MSKrescodee (MSKAPI MSK_getmaxnumqnz64) (
  MSKtask_t task,
  MSKint64t * maxnumqnz)

Obtains the number of preallocated non-zeros for \(Q\) (both objective and constraints). When this number of non-zeros is reached MOSEK will automatically allocate more space for \(Q\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • maxnumqnz (MSKint64t by reference) – Number of non-zero elements preallocated in quadratic coefficient matrices. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - quadratic part

MSK_getmaxnumvar
MSKrescodee (MSKAPI MSK_getmaxnumvar) (
  MSKtask_t task,
  MSKint32t * maxnumvar)

Obtains the number of preallocated variables in the optimization task. When this number of variables is reached MOSEK will automatically allocate more space for variables.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • maxnumvar (MSKint32t by reference) – Number of preallocated variables in the optimization task. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - linear part, Problem data - variables

MSK_getmemusagetask
MSKrescodee (MSKAPI MSK_getmemusagetask) (
  MSKtask_t task,
  MSKint64t * meminuse,
  MSKint64t * maxmemuse)

Obtains information about the amount of memory used by a task.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

System, memory and debugging

MSK_getnadouinf
MSKrescodee (MSKAPI MSK_getnadouinf) (
  MSKtask_t task,
  const char * infitemname,
  MSKrealt * dvalue)

Obtains a named double information item from task information database.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • infitemname (char*) – The name of a double information item. (input)

  • dvalue (MSKrealt by reference) – The value of the required double information item. (output)

Return

(MSKrescodee) – The function response code.

Groups

Information items and statistics

MSK_getnadouparam
MSKrescodee (MSKAPI MSK_getnadouparam) (
  MSKtask_t task,
  const char * paramname,
  MSKrealt * parvalue)

Obtains the value of a named double parameter.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • paramname (char*) – Name of a parameter. (input)

  • parvalue (MSKrealt by reference) – Parameter value. (output)

Return

(MSKrescodee) – The function response code.

Groups

Parameters

MSK_getnaintinf
MSKrescodee (MSKAPI MSK_getnaintinf) (
  MSKtask_t task,
  const char * infitemname,
  MSKint32t * ivalue)

Obtains a named integer information item from the task information database.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • infitemname (char*) – The name of an integer information item. (input)

  • ivalue (MSKint32t by reference) – The value of the required integer information item. (output)

Return

(MSKrescodee) – The function response code.

Groups

Information items and statistics

MSK_getnaintparam
MSKrescodee (MSKAPI MSK_getnaintparam) (
  MSKtask_t task,
  const char * paramname,
  MSKint32t * parvalue)

Obtains the value of a named integer parameter.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • paramname (char*) – Name of a parameter. (input)

  • parvalue (MSKint32t by reference) – Parameter value. (output)

Return

(MSKrescodee) – The function response code.

Groups

Parameters

MSK_getnastrparam
MSKrescodee (MSKAPI MSK_getnastrparam) (
  MSKtask_t task,
  const char * paramname,
  MSKint32t sizeparamname,
  MSKint32t * len,
  char * parvalue)

Obtains the value of a named string parameter.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • paramname (char*) – Name of a parameter. (input)

  • sizeparamname (MSKint32t) – Size of the name buffer parvalue. (input)

  • len (MSKint32t by reference) – Length of the string in parvalue. (output)

  • parvalue (char*) – Parameter value. (output)

Return

(MSKrescodee) – The function response code.

Groups

Parameters, Names

MSK_getnastrparamal
MSKrescodee (MSKAPI MSK_getnastrparamal) (
  MSKtask_t task,
  const char * paramname,
  MSKint32t numaddchr,
  char ** value)

Obtains the value of a named string parameter.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • paramname (char*) – Name of a parameter. (input)

  • numaddchr (MSKint32t) – Number of additional characters for which room is left in value. (input)

  • value (char* by reference) – Parameter value. MOSEK will allocate this char buffer of size equal to the actual length of the string parameter plus numaddchr. This memory must be freed by MSK_freetask. (output)

Return

(MSKrescodee) – The function response code.

Groups

Parameters

MSK_getnumacc
MSKrescodee (MSKAPI MSK_getnumacc) (
  MSKtask_t task,
  MSKint64t * num)

Obtains the number of affine conic constraints.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine conic constraints, Inspecting the task

MSK_getnumafe
MSKrescodee (MSKAPI MSK_getnumafe) (
  MSKtask_t task,
  MSKint64t * numafe)

Obtains the number of affine expressions.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions, Inspecting the task

MSK_getnumanz
MSKrescodee (MSKAPI MSK_getnumanz) (
  MSKtask_t task,
  MSKint32t * numanz)

Obtains the number of non-zeros in \(A\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • numanz (MSKint32t by reference) – Number of non-zero elements in the linear constraint matrix. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - linear part

MSK_getnumanz64
MSKrescodee (MSKAPI MSK_getnumanz64) (
  MSKtask_t task,
  MSKint64t * numanz)

Obtains the number of non-zeros in \(A\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • numanz (MSKint64t by reference) – Number of non-zero elements in the linear constraint matrix. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - linear part

MSK_getnumbarablocktriplets
MSKrescodee (MSKAPI MSK_getnumbarablocktriplets) (
  MSKtask_t task,
  MSKint64t * num)

Obtains an upper bound on the number of elements in the block triplet form of \(\barA\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • num (MSKint64t by reference) – An upper bound on the number of elements in the block triplet form of \(\barA.\) (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite, Inspecting the task

MSK_getnumbaranz
MSKrescodee (MSKAPI MSK_getnumbaranz) (
  MSKtask_t task,
  MSKint64t * nz)

Get the number of nonzero elements in \(\barA\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • nz (MSKint64t by reference) – The number of nonzero block elements in \(\barA\) i.e. the number of \(\barA_{ij}\) elements that are nonzero. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite, Inspecting the task

MSK_getnumbarcblocktriplets
MSKrescodee (MSKAPI MSK_getnumbarcblocktriplets) (
  MSKtask_t task,
  MSKint64t * num)

Obtains an upper bound on the number of elements in the block triplet form of \(\barC\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • num (MSKint64t by reference) – An upper bound on the number of elements in the block triplet form of \(\barC.\) (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite, Inspecting the task

MSK_getnumbarcnz
MSKrescodee (MSKAPI MSK_getnumbarcnz) (
  MSKtask_t task,
  MSKint64t * nz)

Obtains the number of nonzero elements in \(\barC\).

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • nz (MSKint64t by reference) – The number of nonzeros in \(\barC\) i.e. the number of elements \(\barC_j\) that are nonzero. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite, Inspecting the task

MSK_getnumbarvar
MSKrescodee (MSKAPI MSK_getnumbarvar) (
  MSKtask_t task,
  MSKint32t * numbarvar)

Obtains the number of semidefinite variables.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - semidefinite

MSK_getnumcon
MSKrescodee (MSKAPI MSK_getnumcon) (
  MSKtask_t task,
  MSKint32t * numcon)

Obtains the number of constraints.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Problem data - constraints, Inspecting the task

MSK_getnumcone Deprecated
MSKrescodee (MSKAPI MSK_getnumcone) (
  MSKtask_t task,
  MSKint32t * numcone)

NOTE: This interface to conic optimization is deprecated and will be removed in a future major release. Conic problems should be specified using the affine conic constraints interface (ACC), see Sec. 6.2 (From Linear to Conic Optimization) for details.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - cones (deprecated), Inspecting the task

MSK_getnumconemem Deprecated
MSKrescodee (MSKAPI MSK_getnumconemem) (
  MSKtask_t task,
  MSKint32t k,
  MSKint32t * nummem)

NOTE: This interface to conic optimization is deprecated and will be removed in a future major release. Conic problems should be specified using the affine conic constraints interface (ACC), see Sec. 6.2 (From Linear to Conic Optimization) for details.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - cones (deprecated), Inspecting the task

MSK_getnumdjc
MSKrescodee (MSKAPI MSK_getnumdjc) (
  MSKtask_t task,
  MSKint64t * num)

Obtains the number of disjunctive constraints.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - disjunctive constraints, Inspecting the task

MSK_getnumdomain
MSKrescodee (MSKAPI MSK_getnumdomain) (
  MSKtask_t task,
  MSKint64t * numdomain)

Obtain the number of domains defined.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - domain

MSK_getnumintvar
MSKrescodee (MSKAPI MSK_getnumintvar) (
  MSKtask_t task,
  MSKint32t * numintvar)

Obtains the number of integer-constrained variables.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - variables

MSK_getnumparam
MSKrescodee (MSKAPI MSK_getnumparam) (
  MSKtask_t task,
  MSKparametertypee partype,
  MSKint32t * numparam)

Obtains the number of parameters of a given type.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Parameters

MSK_getnumqconknz
MSKrescodee (MSKAPI MSK_getnumqconknz) (
  MSKtask_t task,
  MSKint32t k,
  MSKint32t * numqcnz)

Obtains the number of non-zero quadratic terms in a constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • k (MSKint32t) – Index of the constraint for which the number of non-zero quadratic terms should be obtained. (input)

  • numqcnz (MSKint32t by reference) – Number of quadratic terms. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - constraints, Problem data - quadratic part

MSK_getnumqconknz64
MSKrescodee (MSKAPI MSK_getnumqconknz64) (
  MSKtask_t task,
  MSKint32t k,
  MSKint64t * numqcnz)

Obtains the number of non-zero quadratic terms in a constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • k (MSKint32t) – Index of the constraint for which the number quadratic terms should be obtained. (input)

  • numqcnz (MSKint64t by reference) – Number of quadratic terms. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - constraints, Problem data - quadratic part

MSK_getnumqobjnz
MSKrescodee (MSKAPI MSK_getnumqobjnz) (
  MSKtask_t task,
  MSKint32t * numqonz)

Obtains the number of non-zero quadratic terms in the objective.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • numqonz (MSKint32t by reference) – Number of non-zero elements in the quadratic objective terms. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - quadratic part

MSK_getnumqobjnz64
MSKrescodee (MSKAPI MSK_getnumqobjnz64) (
  MSKtask_t task,
  MSKint64t * numqonz)

Obtains the number of non-zero quadratic terms in the objective.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • numqonz (MSKint64t by reference) – Number of non-zero elements in the quadratic objective terms. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - quadratic part

MSK_getnumsymmat
MSKrescodee (MSKAPI MSK_getnumsymmat) (
  MSKtask_t task,
  MSKint64t * num)

Obtains the number of symmetric matrices stored in the vector \(E\).

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite, Inspecting the task

MSK_getnumvar
MSKrescodee (MSKAPI MSK_getnumvar) (
  MSKtask_t task,
  MSKint32t * numvar)

Obtains the number of variables.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - variables

MSK_getobjname
MSKrescodee (MSKAPI MSK_getobjname) (
  MSKtask_t task,
  MSKint32t sizeobjname,
  char * objname)

Obtains the name assigned to the objective function.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • sizeobjname (MSKint32t) – Length of objname. (input)

  • objname (char*) – Assigned the objective name. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Names

MSK_getobjnamelen
MSKrescodee (MSKAPI MSK_getobjnamelen) (
  MSKtask_t task,
  MSKint32t * len)

Obtains the length of the name assigned to the objective function.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Names

MSK_getobjsense
MSKrescodee (MSKAPI MSK_getobjsense) (
  MSKtask_t task,
  MSKobjsensee * sense)

Gets the objective sense of the task.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part

MSK_getparammax
MSKrescodee (MSKAPI MSK_getparammax) (
  MSKtask_t task,
  MSKparametertypee partype,
  MSKint32t * parammax)

Obtains the maximum index of a parameter of type partype plus 1.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Parameters

MSK_getparamname
MSKrescodee (MSKAPI MSK_getparamname) (
  MSKtask_t task,
  MSKparametertypee partype,
  MSKint32t param,
  char * parname)

Obtains the name for a parameter param of type partype.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • partype (MSKparametertypee) – Parameter type. (input)

  • param (MSKint32t) – Which parameter. (input)

  • parname (char*) – Parameter name. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names, Parameters

MSK_getpowerdomainalpha
MSKrescodee (MSKAPI MSK_getpowerdomainalpha) (
  MSKtask_t task,
  MSKint64t domidx,
  MSKrealt * alpha)

Obtains the exponent vector \(\alpha\) of a primal or dual power cone domain.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • domidx (MSKint64t) – Index of the domain. (input)

  • alpha (MSKrealt*) – The vector \(\alpha\). (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain, Inspecting the task

MSK_getpowerdomaininfo
MSKrescodee (MSKAPI MSK_getpowerdomaininfo) (
  MSKtask_t task,
  MSKint64t domidx,
  MSKint64t * n,
  MSKint64t * nleft)

Obtains structural information about a primal or dual power cone domain.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain, Inspecting the task

MSK_getprimalobj
MSKrescodee (MSKAPI MSK_getprimalobj) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKrealt * primalobj)

Computes the primal objective value for the desired solution. Note that if the solution is an infeasibility certificate, then the fixed term in the objective is not included.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • primalobj (MSKrealt by reference) – Objective value corresponding to the primal solution. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information, Solution - primal

MSK_getprimalsolutionnorms
MSKrescodee (MSKAPI MSK_getprimalsolutionnorms) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKrealt * nrmxc,
  MSKrealt * nrmxx,
  MSKrealt * nrmbarx)

Compute norms of the primal solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getprobtype
MSKrescodee (MSKAPI MSK_getprobtype) (
  MSKtask_t task,
  MSKproblemtypee * probtype)

Obtains the problem type.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task

MSK_getprosta
MSKrescodee (MSKAPI MSK_getprosta) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKprostae * problemsta)

Obtains the problem status.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getpviolacc
MSKrescodee (MSKAPI MSK_getpviolacc) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint64t numaccidx,
  const MSKint64t * accidxlist,
  MSKrealt * viol)

Computes the primal solution violation for a set of affine conic constraints. Let \(x^*\) be the value of the variable \(x\) for the specified solution. For simplicity let us assume that \(x\) is a member of a quadratic cone, then the violation is computed as follows

\[\begin{split}\left\{ \begin{array}{ll} \max(0,\|x_{2:n}\|-x_1) / \sqrt{2}, & x_1 \geq -\|x_{2:n}\|, \\ \|x\|, & \mbox{otherwise.} \end{array} \right.\end{split}\]

Both when the solution is a certificate of dual infeasibility or when it is primal feasible the violation should be small.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • numaccidx (MSKint64t) – Length of sub and viol. (input)

  • accidxlist (MSKint64t*) – An array of indexes of conic constraints. (input)

  • viol (MSKrealt*) – viol[k] is the violation of the solution associated with the affine conic constraint number accidxlist[k]. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getpviolbarvar
MSKrescodee (MSKAPI MSK_getpviolbarvar) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t num,
  const MSKint32t * sub,
  MSKrealt * viol)

Computes the primal solution violation for a set of semidefinite variables. Let \((\barX_j)^*\) be the value of the variable \(\barX_j\) for the specified solution. Then the primal violation of the solution associated with variable \(\barX_j\) is given by

\[\max(-\lambda_{\min}(\barX_j),\ 0.0).\]

Both when the solution is a certificate of dual infeasibility or when it is primal feasible the violation should be small.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • num (MSKint32t) – Length of sub and viol. (input)

  • sub (MSKint32t*) – An array of indexes of \(\barX\) variables. (input)

  • viol (MSKrealt*) – viol[k] is how much the solution violates the constraint \(\barX_{\mathtt{sub}[k]} \in \PSD\). (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getpviolcon
MSKrescodee (MSKAPI MSK_getpviolcon) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t num,
  const MSKint32t * sub,
  MSKrealt * viol)

Computes the primal solution violation for a set of constraints. The primal violation of the solution associated with the \(i\)-th constraint is given by

\[\max(\tau l_i^c - (x_i^c)^*,\ (x_i^c)^* - \tau u_i^c),\ |\sum_{j=\idxbeg}^{\idxend{numvar}} a_{ij} x_j^* - x_i^c|)\]

where \(\tau=0\) if the solution is a certificate of dual infeasibility and \(\tau=1\) otherwise. Both when the solution is a certificate of dual infeasibility and when it is primal feasible the violation should be small. The above formula applies for the linear case but is appropriately generalized in other cases.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • num (MSKint32t) – Length of sub and viol. (input)

  • sub (MSKint32t*) – An array of indexes of constraints. (input)

  • viol (MSKrealt*) – viol[k] is the violation associated with the solution for the constraint sub[k]. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getpviolcones Deprecated
MSKrescodee (MSKAPI MSK_getpviolcones) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t num,
  const MSKint32t * sub,
  MSKrealt * viol)

NOTE: This interface to conic optimization is deprecated and will be removed in a future major release. Conic problems should be specified using the affine conic constraints interface (ACC), see Sec. 6.2 (From Linear to Conic Optimization) for details.

Computes the primal solution violation for a set of conic constraints. Let \(x^*\) be the value of the variable \(x\) for the specified solution. For simplicity let us assume that \(x\) is a member of a quadratic cone, then the violation is computed as follows

\[\begin{split}\left\{ \begin{array}{ll} \max(0,\|x_{2:n}\|-x_1) / \sqrt{2}, & x_1 \geq -\|x_{2:n}\|, \\ \|x\|, & \mbox{otherwise.} \end{array} \right.\end{split}\]

Both when the solution is a certificate of dual infeasibility or when it is primal feasible the violation should be small.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • num (MSKint32t) – Length of sub and viol. (input)

  • sub (MSKint32t*) – An array of indexes of conic constraints. (input)

  • viol (MSKrealt*) – viol[k] is the violation of the solution associated with the conic constraint number sub[k]. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getpvioldjc
MSKrescodee (MSKAPI MSK_getpvioldjc) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint64t numdjcidx,
  const MSKint64t * djcidxlist,
  MSKrealt * viol)

Computes the primal solution violation for a set of disjunctive constraints. For a single DJC the violation is defined as

\[\mathrm{viol}\left(\bigvee_{i=1}^t \bigwedge_{j=1}^{s_i} T_{i,j}\right) = \min_{i=1,\ldots,t}\left(\max_{j=1,\ldots,s_j}(\mathrm{viol}(T_{i,j}))\right)\]

where the violation of each simple term \(T_{i,j}\) is defined as for an ordinary linear constraint.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • numdjcidx (MSKint64t) – Length of sub and viol. (input)

  • djcidxlist (MSKint64t*) – An array of indexes of disjunctive constraints. (input)

  • viol (MSKrealt*) – viol[k] is the violation of the solution associated with the disjunctive constraint number djcidxlist[k]. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getpviolvar
MSKrescodee (MSKAPI MSK_getpviolvar) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t num,
  const MSKint32t * sub,
  MSKrealt * viol)

Computes the primal solution violation associated to a set of variables. Let \(x_j^*\) be the value of \(x_j\) for the specified solution. Then the primal violation of the solution associated with variable \(x_j\) is given by

\[\max( \tau l_j^x - x_j^*,\ x_j^* - \tau u_j^x,\ 0).\]

where \(\tau=0\) if the solution is a certificate of dual infeasibility and \(\tau=1\) otherwise. Both when the solution is a certificate of dual infeasibility and when it is primal feasible the violation should be small.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • num (MSKint32t) – Length of sub and viol. (input)

  • sub (MSKint32t*) – An array of indexes of \(x\) variables. (input)

  • viol (MSKrealt*) – viol[k] is the violation associated with the solution for the variable \(x_\mathtt{sub[k]}\). (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getqconk
MSKrescodee (MSKAPI MSK_getqconk) (
  MSKtask_t task,
  MSKint32t k,
  MSKint32t maxnumqcnz,
  MSKint32t * numqcnz,
  MSKint32t * qcsubi,
  MSKint32t * qcsubj,
  MSKrealt * qcval)

Obtains all the quadratic terms in a constraint. The quadratic terms are stored sequentially in qcsubi, qcsubj, and qcval.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • k (MSKint32t) – Which constraint. (input)

  • maxnumqcnz (MSKint32t) – Length of the arrays qcsubi, qcsubj, and qcval. (input)

  • numqcnz (MSKint32t by reference) – Number of quadratic terms. (output)

  • qcsubi (MSKint32t*) – Row subscripts for quadratic constraint matrix. (output)

  • qcsubj (MSKint32t*) – Column subscripts for quadratic constraint matrix. (output)

  • qcval (MSKrealt*) – Quadratic constraint coefficient values. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - quadratic part, Problem data - constraints

MSK_getqconk64
MSKrescodee (MSKAPI MSK_getqconk64) (
  MSKtask_t task,
  MSKint32t k,
  MSKint64t maxnumqcnz,
  MSKint64t * numqcnz,
  MSKint32t * qcsubi,
  MSKint32t * qcsubj,
  MSKrealt * qcval)

Obtains all the quadratic terms in a constraint. The quadratic terms are stored sequentially in qcsubi, qcsubj, and qcval.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • k (MSKint32t) – Which constraint. (input)

  • maxnumqcnz (MSKint64t) – Length of the arrays qcsubi, qcsubj, and qcval. (input)

  • numqcnz (MSKint64t by reference) – Number of quadratic terms. (output)

  • qcsubi (MSKint32t*) – Row subscripts for quadratic constraint matrix. (output)

  • qcsubj (MSKint32t*) – Column subscripts for quadratic constraint matrix. (output)

  • qcval (MSKrealt*) – Quadratic constraint coefficient values. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - quadratic part, Problem data - constraints

MSK_getqobj
MSKrescodee (MSKAPI MSK_getqobj) (
  MSKtask_t task,
  MSKint32t maxnumqonz,
  MSKint32t * numqonz,
  MSKint32t * qosubi,
  MSKint32t * qosubj,
  MSKrealt * qoval)

Obtains the quadratic terms in the objective. The required quadratic terms are stored sequentially in qosubi, qosubj, and qoval.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • maxnumqonz (MSKint32t) – The length of the arrays qosubi, qosubj, and qoval. (input)

  • numqonz (MSKint32t by reference) – Number of non-zero elements in the quadratic objective terms. (output)

  • qosubi (MSKint32t*) – Row subscripts for quadratic objective coefficients. (output)

  • qosubj (MSKint32t*) – Column subscripts for quadratic objective coefficients. (output)

  • qoval (MSKrealt*) – Quadratic objective coefficient values. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - quadratic part

MSK_getqobj64
MSKrescodee (MSKAPI MSK_getqobj64) (
  MSKtask_t task,
  MSKint64t maxnumqonz,
  MSKint64t * numqonz,
  MSKint32t * qosubi,
  MSKint32t * qosubj,
  MSKrealt * qoval)

Obtains the quadratic terms in the objective. The required quadratic terms are stored sequentially in qosubi, qosubj, and qoval.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • maxnumqonz (MSKint64t) – The length of the arrays qosubi, qosubj, and qoval. (input)

  • numqonz (MSKint64t by reference) – Number of non-zero elements in the quadratic objective terms. (output)

  • qosubi (MSKint32t*) – Row subscripts for quadratic objective coefficients. (output)

  • qosubj (MSKint32t*) – Column subscripts for quadratic objective coefficients. (output)

  • qoval (MSKrealt*) – Quadratic objective coefficient values. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - quadratic part

MSK_getqobjij
MSKrescodee (MSKAPI MSK_getqobjij) (
  MSKtask_t task,
  MSKint32t i,
  MSKint32t j,
  MSKrealt * qoij)

Obtains one coefficient \(q_{ij}^o\) in the quadratic term of the objective.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - quadratic part

MSK_getreducedcosts
MSKrescodee (MSKAPI MSK_getreducedcosts) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t first,
  MSKint32t last,
  MSKrealt * redcosts)

Computes the reduced costs for a slice of variables and returns them in the array redcosts i.e.

(15.2)\[\mathtt{redcosts}[j-\mathtt{first}] = (s_l^x)_j-(s_u^x)_j, ~j=\mathtt{first},\ldots,\mathtt{last}-1\]
Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • first (MSKint32t) – The index of the first variable in the sequence. (input)

  • last (MSKint32t) – The index of the last variable in the sequence plus 1. (input)

  • redcosts (MSKrealt*) – The reduced costs for the required slice of variables. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getresponseclass
MSKrescodee (MSKAPI MSK_getresponseclass) (
  MSKrescodee r,
  MSKrescodetypee * rc)

Obtain the class of a response code.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Responses, errors and warnings

MSK_getskc
MSKrescodee (MSKAPI MSK_getskc) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKstakeye * skc)

Obtains the status keys for the constraints.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • skc (MSKstakeye*) – Status keys for the constraints. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getskcslice
MSKrescodee (MSKAPI MSK_getskcslice) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t first,
  MSKint32t last,
  MSKstakeye * skc)

Obtains the status keys for a slice of the constraints.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • first (MSKint32t) – First index in the sequence. (input)

  • last (MSKint32t) – Last index plus 1 in the sequence. (input)

  • skc (MSKstakeye*) – Status keys for the constraints. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getskn
MSKrescodee (MSKAPI MSK_getskn) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKstakeye * skn)

Obtains the status keys for the conic constraints.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • skn (MSKstakeye*) – Status keys for the conic constraints. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getskx
MSKrescodee (MSKAPI MSK_getskx) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKstakeye * skx)

Obtains the status keys for the scalar variables.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • skx (MSKstakeye*) – Status keys for the variables. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getskxslice
MSKrescodee (MSKAPI MSK_getskxslice) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t first,
  MSKint32t last,
  MSKstakeye * skx)

Obtains the status keys for a slice of the scalar variables.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • first (MSKint32t) – First index in the sequence. (input)

  • last (MSKint32t) – Last index plus 1 in the sequence. (input)

  • skx (MSKstakeye*) – Status keys for the variables. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getslc
MSKrescodee (MSKAPI MSK_getslc) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKrealt * slc)

Obtains the \(s_l^c\) vector for a solution.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • slc (MSKrealt*) – Dual variables corresponding to the lower bounds on the constraints. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getslcslice
MSKrescodee (MSKAPI MSK_getslcslice) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t first,
  MSKint32t last,
  MSKrealt * slc)

Obtains a slice of the \(s_l^c\) vector for a solution.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • first (MSKint32t) – First index in the sequence. (input)

  • last (MSKint32t) – Last index plus 1 in the sequence. (input)

  • slc (MSKrealt*) – Dual variables corresponding to the lower bounds on the constraints. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getslx
MSKrescodee (MSKAPI MSK_getslx) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKrealt * slx)

Obtains the \(s_l^x\) vector for a solution.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • slx (MSKrealt*) – Dual variables corresponding to the lower bounds on the variables. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getslxslice
MSKrescodee (MSKAPI MSK_getslxslice) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t first,
  MSKint32t last,
  MSKrealt * slx)

Obtains a slice of the \(s_l^x\) vector for a solution.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • first (MSKint32t) – First index in the sequence. (input)

  • last (MSKint32t) – Last index plus 1 in the sequence. (input)

  • slx (MSKrealt*) – Dual variables corresponding to the lower bounds on the variables. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getsnx
MSKrescodee (MSKAPI MSK_getsnx) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKrealt * snx)

Obtains the \(s_n^x\) vector for a solution.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • snx (MSKrealt*) – Dual variables corresponding to the conic constraints on the variables. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getsnxslice
MSKrescodee (MSKAPI MSK_getsnxslice) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t first,
  MSKint32t last,
  MSKrealt * snx)

Obtains a slice of the \(s_n^x\) vector for a solution.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • first (MSKint32t) – First index in the sequence. (input)

  • last (MSKint32t) – Last index plus 1 in the sequence. (input)

  • snx (MSKrealt*) – Dual variables corresponding to the conic constraints on the variables. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getsolsta
MSKrescodee (MSKAPI MSK_getsolsta) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKsolstae * solutionsta)

Obtains the solution status.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getsolution
MSKrescodee (MSKAPI MSK_getsolution) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKprostae * problemsta,
  MSKsolstae * solutionsta,
  MSKstakeye * skc,
  MSKstakeye * skx,
  MSKstakeye * skn,
  MSKrealt * xc,
  MSKrealt * xx,
  MSKrealt * y,
  MSKrealt * slc,
  MSKrealt * suc,
  MSKrealt * slx,
  MSKrealt * sux,
  MSKrealt * snx)

Obtains the complete solution.

Consider the case of linear programming. The primal problem is given by

\[\begin{split}\begin{array}{lccccl} \mbox{minimize} & & & c^T x+c^f & & \\ \mbox{subject to} & l^c & \leq & A x & \leq & u^c, \\ & l^x & \leq & x & \leq & u^x. \\ \end{array}\end{split}\]

and the corresponding dual problem is

\[\begin{split}\begin{array}{lccl} \mbox{maximize} & (l^c)^T s_l^c - (u^c)^T s_u^c & \\ & + (l^x)^T s_l^x - (u^x)^T s_u^x + c^f & \\ \mbox{subject to} & A^T y + s_l^x - s_u^x & = & c, \\ & -y + s_l^c - s_u^c & = & 0, \\ & s_l^c,s_u^c,s_l^x,s_u^x \geq 0. & & \\ \end{array}\end{split}\]

A conic optimization problem has the same primal variables as in the linear case. Recall that the dual of a conic optimization problem is given by:

\[\begin{split}\begin{array}{lccccc} \mbox{maximize} & (l^c)^T s_l^c - (u^c)^T s_u^c & & \\ & +(l^x)^T s_l^x - (u^x)^T s_u^x + c^f & & \\ \mbox{subject to} & A^T y + s_l^x - s_u^x + s_n^x & = & c, \\ & -y + s_l^c - s_u^c & = & 0, \\ & s_l^c,s_u^c,s_l^x,s_u^x & \geq & 0, \\ & s_n^x \in \K^* & & \\ \end{array}\end{split}\]

The mapping between variables and arguments to the function is as follows:

  • xx : Corresponds to variable \(x\) (also denoted \(x^x\)).

  • xc : Corresponds to \(x^c:=Ax\).

  • y : Corresponds to variable \(y\).

  • slc: Corresponds to variable \(s_l^c\).

  • suc: Corresponds to variable \(s_u^c\).

  • slx: Corresponds to variable \(s_l^x\).

  • sux: Corresponds to variable \(s_u^x\).

  • snx: Corresponds to variable \(s_n^x\).

The meaning of the values returned by this function depend on the solution status returned in the argument solsta. The most important possible values of solsta are:

In order to retrieve the primal and dual values of semidefinite variables see MSK_getbarxj and MSK_getbarsj.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • problemsta (MSKprostae by reference) – Problem status. (output)

  • solutionsta (MSKsolstae by reference) – Solution status. (output)

  • skc (MSKstakeye*) – Status keys for the constraints. (output)

  • skx (MSKstakeye*) – Status keys for the variables. (output)

  • skn (MSKstakeye*) – Status keys for the conic constraints. (output)

  • xc (MSKrealt*) – Primal constraint solution. (output)

  • xx (MSKrealt*) – Primal variable solution. (output)

  • y (MSKrealt*) – Vector of dual variables corresponding to the constraints. (output)

  • slc (MSKrealt*) – Dual variables corresponding to the lower bounds on the constraints. (output)

  • suc (MSKrealt*) – Dual variables corresponding to the upper bounds on the constraints. (output)

  • slx (MSKrealt*) – Dual variables corresponding to the lower bounds on the variables. (output)

  • sux (MSKrealt*) – Dual variables corresponding to the upper bounds on the variables. (output)

  • snx (MSKrealt*) – Dual variables corresponding to the conic constraints on the variables. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information, Solution - primal, Solution - dual

MSK_getsolutioninfo
MSKrescodee (MSKAPI MSK_getsolutioninfo) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKrealt * pobj,
  MSKrealt * pviolcon,
  MSKrealt * pviolvar,
  MSKrealt * pviolbarvar,
  MSKrealt * pviolcone,
  MSKrealt * pviolitg,
  MSKrealt * dobj,
  MSKrealt * dviolcon,
  MSKrealt * dviolvar,
  MSKrealt * dviolbarvar,
  MSKrealt * dviolcone)

Obtains information about a solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getsolutioninfonew
MSKrescodee (MSKAPI MSK_getsolutioninfonew) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKrealt * pobj,
  MSKrealt * pviolcon,
  MSKrealt * pviolvar,
  MSKrealt * pviolbarvar,
  MSKrealt * pviolcone,
  MSKrealt * pviolacc,
  MSKrealt * pvioldjc,
  MSKrealt * pviolitg,
  MSKrealt * dobj,
  MSKrealt * dviolcon,
  MSKrealt * dviolvar,
  MSKrealt * dviolbarvar,
  MSKrealt * dviolcone,
  MSKrealt * dviolacc)

Obtains information about a solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getsolutionnew
MSKrescodee (MSKAPI MSK_getsolutionnew) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKprostae * problemsta,
  MSKsolstae * solutionsta,
  MSKstakeye * skc,
  MSKstakeye * skx,
  MSKstakeye * skn,
  MSKrealt * xc,
  MSKrealt * xx,
  MSKrealt * y,
  MSKrealt * slc,
  MSKrealt * suc,
  MSKrealt * slx,
  MSKrealt * sux,
  MSKrealt * snx,
  MSKrealt * doty)

Obtains the complete solution. See MSK_getsolution for further information.

In order to retrieve the primal and dual values of semidefinite variables see MSK_getbarxj and MSK_getbarsj.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • problemsta (MSKprostae by reference) – Problem status. (output)

  • solutionsta (MSKsolstae by reference) – Solution status. (output)

  • skc (MSKstakeye*) – Status keys for the constraints. (output)

  • skx (MSKstakeye*) – Status keys for the variables. (output)

  • skn (MSKstakeye*) – Status keys for the conic constraints. (output)

  • xc (MSKrealt*) – Primal constraint solution. (output)

  • xx (MSKrealt*) – Primal variable solution. (output)

  • y (MSKrealt*) – Vector of dual variables corresponding to the constraints. (output)

  • slc (MSKrealt*) – Dual variables corresponding to the lower bounds on the constraints. (output)

  • suc (MSKrealt*) – Dual variables corresponding to the upper bounds on the constraints. (output)

  • slx (MSKrealt*) – Dual variables corresponding to the lower bounds on the variables. (output)

  • sux (MSKrealt*) – Dual variables corresponding to the upper bounds on the variables. (output)

  • snx (MSKrealt*) – Dual variables corresponding to the conic constraints on the variables. (output)

  • doty (MSKrealt*) – Dual variables corresponding to affine conic constraints. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution information, Solution - primal, Solution - dual

MSK_getsolutionslice
MSKrescodee (MSKAPI MSK_getsolutionslice) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKsoliteme solitem,
  MSKint32t first,
  MSKint32t last,
  MSKrealt * values)

Obtains a slice of one item from the solution. The format of the solution is exactly as in MSK_getsolution. The parameter solitem determines which of the solution vectors should be returned.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • solitem (MSKsoliteme) – Which part of the solution is required. (input)

  • first (MSKint32t) – First index in the sequence. (input)

  • last (MSKint32t) – Last index plus 1 in the sequence. (input)

  • values (MSKrealt*) – The values in the required sequence are stored sequentially in values. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - primal, Solution - dual, Solution information

MSK_getsparsesymmat
MSKrescodee (MSKAPI MSK_getsparsesymmat) (
  MSKtask_t task,
  MSKint64t idx,
  MSKint64t maxlen,
  MSKint32t * subi,
  MSKint32t * subj,
  MSKrealt * valij)

Get a single symmetric matrix from the matrix store.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • idx (MSKint64t) – Index of the matrix to retrieve. (input)

  • maxlen (MSKint64t) – Length of the output arrays subi, subj and valij. (input)

  • subi (MSKint32t*) – Row subscripts of the matrix non-zero elements. (output)

  • subj (MSKint32t*) – Column subscripts of the matrix non-zero elements. (output)

  • valij (MSKrealt*) – Coefficients of the matrix non-zero elements. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite, Inspecting the task

MSK_getstrparam
MSKrescodee (MSKAPI MSK_getstrparam) (
  MSKtask_t task,
  MSKsparame param,
  MSKint32t maxlen,
  MSKint32t * len,
  char * parvalue)

Obtains the value of a string parameter.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • param (MSKsparame) – Which parameter. (input)

  • maxlen (MSKint32t) – Length of the parvalue buffer. (input)

  • len (MSKint32t by reference) – The length of the parameter value. (output)

  • parvalue (char*) – Parameter value. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names, Parameters

MSK_getstrparamal
MSKrescodee (MSKAPI MSK_getstrparamal) (
  MSKtask_t task,
  MSKsparame param,
  MSKint32t numaddchr,
  char ** value)

Obtains the value of a string parameter.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • param (MSKsparame) – Which parameter. (input)

  • numaddchr (MSKint32t) – Number of additional characters for which room is left in value. (input)

  • value (char* by reference) – Parameter value. MOSEK will allocate this char buffer of size equal to the actual length of the string parameter plus numaddchr. This memory must be freed by MSK_freetask. (input/output)

Return

(MSKrescodee) – The function response code.

Groups

Parameters

MSK_getstrparamlen
MSKrescodee (MSKAPI MSK_getstrparamlen) (
  MSKtask_t task,
  MSKsparame param,
  MSKint32t * len)

Obtains the length of a string parameter.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Names, Parameters

MSK_getsuc
MSKrescodee (MSKAPI MSK_getsuc) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKrealt * suc)

Obtains the \(s_u^c\) vector for a solution.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • suc (MSKrealt*) – Dual variables corresponding to the upper bounds on the constraints. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getsucslice
MSKrescodee (MSKAPI MSK_getsucslice) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t first,
  MSKint32t last,
  MSKrealt * suc)

Obtains a slice of the \(s_u^c\) vector for a solution.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • first (MSKint32t) – First index in the sequence. (input)

  • last (MSKint32t) – Last index plus 1 in the sequence. (input)

  • suc (MSKrealt*) – Dual variables corresponding to the upper bounds on the constraints. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getsux
MSKrescodee (MSKAPI MSK_getsux) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKrealt * sux)

Obtains the \(s_u^x\) vector for a solution.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • sux (MSKrealt*) – Dual variables corresponding to the upper bounds on the variables. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getsuxslice
MSKrescodee (MSKAPI MSK_getsuxslice) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t first,
  MSKint32t last,
  MSKrealt * sux)

Obtains a slice of the \(s_u^x\) vector for a solution.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • first (MSKint32t) – First index in the sequence. (input)

  • last (MSKint32t) – Last index plus 1 in the sequence. (input)

  • sux (MSKrealt*) – Dual variables corresponding to the upper bounds on the variables. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getsymbcon
MSKrescodee (MSKAPI MSK_getsymbcon) (
  MSKtask_t task,
  MSKint32t i,
  MSKint32t sizevalue,
  char * name,
  MSKint32t * value)

Obtains the name and corresponding value for the \(i\)th symbolic constant.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • i (MSKint32t) – Index. (input)

  • sizevalue (MSKint32t) – The length of the buffer pointed to by the value argument. (input)

  • name (char*) – Name of the \(i\)th symbolic constant. (output)

  • value (MSKint32t by reference) – The corresponding value. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names

MSK_getsymbcondim
MSKrescodee (MSKAPI MSK_getsymbcondim) (
  MSKenv_t env,
  MSKint32t * num,
  size_t * maxlen)

Obtains the number of symbolic constants defined by MOSEK and the maximum length of the name of any symbolic constant.

Parameters
  • env (MSKenv_t) – The MOSEK environment. (input)

  • num (MSKint32t by reference) – Number of symbolic constants defined by MOSEK. (output)

  • maxlen (size_t by reference) – Maximum length of the name of any symbolic constants. (output)

Return

(MSKrescodee) – The function response code.

Groups

Parameters

MSK_getsymmatinfo
MSKrescodee (MSKAPI MSK_getsymmatinfo) (
  MSKtask_t task,
  MSKint64t idx,
  MSKint32t * dim,
  MSKint64t * nz,
  MSKsymmattypee * mattype)

MOSEK maintains a vector denoted by \(E\) of symmetric data matrices. This function makes it possible to obtain important information about a single matrix in \(E\).

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite, Inspecting the task

MSK_gettaskname
MSKrescodee (MSKAPI MSK_gettaskname) (
  MSKtask_t task,
  MSKint32t sizetaskname,
  char * taskname)

Obtains the name assigned to the task.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • sizetaskname (MSKint32t) – Length of the taskname buffer. (input)

  • taskname (char*) – Returns the task name. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names, Inspecting the task

MSK_gettasknamelen
MSKrescodee (MSKAPI MSK_gettasknamelen) (
  MSKtask_t task,
  MSKint32t * len)

Obtains the length the task name.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Names, Inspecting the task

MSK_getvarbound
MSKrescodee (MSKAPI MSK_getvarbound) (
  MSKtask_t task,
  MSKint32t i,
  MSKboundkeye * bk,
  MSKrealt * bl,
  MSKrealt * bu)

Obtains bound information for one variable.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task, Problem data - bounds, Problem data - variables

MSK_getvarboundslice
MSKrescodee (MSKAPI MSK_getvarboundslice) (
  MSKtask_t task,
  MSKint32t first,
  MSKint32t last,
  MSKboundkeye * bk,
  MSKrealt * bl,
  MSKrealt * bu)

Obtains bounds information for a slice of the variables.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • first (MSKint32t) – First index in the sequence. (input)

  • last (MSKint32t) – Last index plus 1 in the sequence. (input)

  • bk (MSKboundkeye*) – Bound keys. (output)

  • bl (MSKrealt*) – Values for lower bounds. (output)

  • bu (MSKrealt*) – Values for upper bounds. (output)

Return

(MSKrescodee) – The function response code.

Groups

Problem data - linear part, Inspecting the task, Problem data - bounds, Problem data - variables

MSK_getvarname
MSKrescodee (MSKAPI MSK_getvarname) (
  MSKtask_t task,
  MSKint32t j,
  MSKint32t sizename,
  char * name)

Obtains the name of a variable.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • j (MSKint32t) – Index of a variable. (input)

  • sizename (MSKint32t) – The length of the buffer pointed to by the name argument. (input)

  • name (char*) – Returns the required name. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names, Problem data - linear part, Problem data - variables, Inspecting the task

MSK_getvarnameindex
MSKrescodee (MSKAPI MSK_getvarnameindex) (
  MSKtask_t task,
  const char * somename,
  MSKint32t * asgn,
  MSKint32t * index)

Checks whether the name somename has been assigned to any variable. If so, the index of the variable is reported.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • somename (char*) – The name which should be checked. (input)

  • asgn (MSKint32t by reference) – Is non-zero if the name somename is assigned to a variable. (output)

  • index (MSKint32t by reference) – If the name somename is assigned to a variable, then index is the index of the variable. (output)

Return

(MSKrescodee) – The function response code.

Groups

Names, Problem data - linear part, Problem data - variables, Inspecting the task

MSK_getvarnamelen
MSKrescodee (MSKAPI MSK_getvarnamelen) (
  MSKtask_t task,
  MSKint32t i,
  MSKint32t * len)

Obtains the length of the name of a variable.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Names, Problem data - linear part, Problem data - variables, Inspecting the task

MSK_getvartype
MSKrescodee (MSKAPI MSK_getvartype) (
  MSKtask_t task,
  MSKint32t j,
  MSKvariabletypee * vartype)

Gets the variable type of one variable.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - variables

MSK_getvartypelist
MSKrescodee (MSKAPI MSK_getvartypelist) (
  MSKtask_t task,
  MSKint32t num,
  const MSKint32t * subj,
  MSKvariabletypee * vartype)

Obtains the variable type of one or more variables. Upon return vartype[k] is the variable type of variable subj[k].

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • num (MSKint32t) – Number of variables for which the variable type should be obtained. (input)

  • subj (MSKint32t*) – A list of variable indexes. (input)

  • vartype (MSKvariabletypee*) – The variables types corresponding to the variables specified by subj. (output)

Return

(MSKrescodee) – The function response code.

Groups

Inspecting the task, Problem data - variables

MSK_getversion
MSKrescodee (MSKAPI MSK_getversion) (
  MSKint32t * major,
  MSKint32t * minor,
  MSKint32t * revision)

Obtains MOSEK version information.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Versions

MSK_getxc
MSKrescodee (MSKAPI MSK_getxc) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKrealt * xc)

Obtains the \(x^c\) vector for a solution.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • xc (MSKrealt*) – Primal constraint solution. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - primal

MSK_getxcslice
MSKrescodee (MSKAPI MSK_getxcslice) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t first,
  MSKint32t last,
  MSKrealt * xc)

Obtains a slice of the \(x^c\) vector for a solution.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • first (MSKint32t) – First index in the sequence. (input)

  • last (MSKint32t) – Last index plus 1 in the sequence. (input)

  • xc (MSKrealt*) – Primal constraint solution. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - primal

MSK_getxx
MSKrescodee (MSKAPI MSK_getxx) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKrealt * xx)

Obtains the \(x^x\) vector for a solution.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • xx (MSKrealt*) – Primal variable solution. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - primal

MSK_getxxslice
MSKrescodee (MSKAPI MSK_getxxslice) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t first,
  MSKint32t last,
  MSKrealt * xx)

Obtains a slice of the \(x^x\) vector for a solution.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • first (MSKint32t) – First index in the sequence. (input)

  • last (MSKint32t) – Last index plus 1 in the sequence. (input)

  • xx (MSKrealt*) – Primal variable solution. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - primal

MSK_gety
MSKrescodee (MSKAPI MSK_gety) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKrealt * y)

Obtains the \(y\) vector for a solution.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • y (MSKrealt*) – Vector of dual variables corresponding to the constraints. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getyslice
MSKrescodee (MSKAPI MSK_getyslice) (
  MSKtask_t task,
  MSKsoltypee whichsol,
  MSKint32t first,
  MSKint32t last,
  MSKrealt * y)

Obtains a slice of the \(y\) vector for a solution.

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichsol (MSKsoltypee) – Selects a solution. (input)

  • first (MSKint32t) – First index in the sequence. (input)

  • last (MSKint32t) – Last index plus 1 in the sequence. (input)

  • y (MSKrealt*) – Vector of dual variables corresponding to the constraints. (output)

Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_infeasibilityreport
MSKrescodee (MSKAPI MSK_infeasibilityreport) (
  MSKtask_t task,
  MSKstreamtypee whichstream,
  MSKsoltypee whichsol)

TBD

Parameters
  • task (MSKtask_t) – An optimization task. (input)

  • whichstream (