15.3 Functions in alphabetical order¶

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


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

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Names

MSK_analyzeproblem
MSKrescodee (MSKAPI MSK_analyzeproblem) (
MSKstreamtypee whichstream)


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

Parameters
Return

(MSKrescodee) – The function response code.

Groups

MSK_analyzesolution
MSKrescodee (MSKAPI MSK_analyzesolution) (
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:

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_appendacc
MSKrescodee (MSKAPI MSK_appendacc) (
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) (
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) (
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
Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine conic constraints

MSK_appendaccsseq
MSKrescodee (MSKAPI MSK_appendaccsseq) (
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) (
MSKint64t num)


Appends a number of empty affine expressions to the task.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions

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


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

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite

MSK_appendcone Deprecated
MSKrescodee (MSKAPI MSK_appendcone) (
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
Return

(MSKrescodee) – The function response code.

Groups

Problem data - cones (deprecated)

MSK_appendconeseq Deprecated
MSKrescodee (MSKAPI MSK_appendconeseq) (
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
Return

(MSKrescodee) – The function response code.

Groups

Problem data - cones (deprecated)

MSK_appendconesseq Deprecated
MSKrescodee (MSKAPI MSK_appendconesseq) (
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
Return

(MSKrescodee) – The function response code.

Groups

Problem data - cones (deprecated)

MSK_appendcons
MSKrescodee (MSKAPI MSK_appendcons) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_appenddjcs
MSKrescodee (MSKAPI MSK_appenddjcs) (
MSKint64t num)


Appends a number of empty disjunctive constraints to the task.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - disjunctive constraints

MSK_appenddualexpconedomain
MSKrescodee (MSKAPI MSK_appenddualexpconedomain) (
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) (
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) (
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
Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain

MSK_appendprimalexpconedomain
MSKrescodee (MSKAPI MSK_appendprimalexpconedomain) (
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) (
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) (
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
Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain

MSKrescodee (MSKAPI MSK_appendquadraticconedomain) (
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) (
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) (
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) (
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

MSKrescodee (MSKAPI MSK_appendrquadraticconedomain) (
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) (
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) (
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
Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite

MSK_appendsparsesymmatlist
MSKrescodee (MSKAPI MSK_appendsparsesymmatlist) (
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
Return

(MSKrescodee) – The function response code.

Groups

Problem data - semidefinite

MSK_appendsvecpsdconedomain
MSKrescodee (MSKAPI MSK_appendsvecpsdconedomain) (
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
Return

(MSKrescodee) – The function response code.

Groups

Problem data - domain

MSK_appendvars
MSKrescodee (MSKAPI MSK_appendvars) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_asyncgetresult
MSKrescodee (MSKAPI MSK_asyncgetresult) (
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) (
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) (
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) (
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
Return

(MSKrescodee) – The function response code.

Groups

Linear algebra

MSK_basiscond
MSKrescodee (MSKAPI MSK_basiscond) (
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) (
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

void * (MSKAPI MSK_callocdbgtask) (
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

void * (MSKAPI MSK_calloctask) (
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)


Parameters

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

Return

(MSKrescodee) – The function response code.

Groups

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
Return

(MSKrescodee) – The function response code.

Groups

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

MSKrescodee (MSKAPI MSK_checkmemtask) (
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

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
Return

(MSKrescodee) – The function response code.

Groups

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
Return

(MSKrescodee) – The function response code.

Groups

Versions

MSK_chgconbound
MSKrescodee (MSKAPI MSK_chgconbound) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_chgvarbound
MSKrescodee (MSKAPI MSK_chgvarbound) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSKrescodee (MSKAPI MSK_clonetask) (


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

MSK_commitchanges
MSKrescodee (MSKAPI MSK_commitchanges) (


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

MSK_computesparsecholesky
MSKrescodee (MSKAPI MSK_computesparsecholesky) (
MSKenv_t env,
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) (
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

MSK_deletesolution
MSKrescodee (MSKAPI MSK_deletesolution) (
MSKsoltypee whichsol)


Undefine a solution and free the memory it uses.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSKrescodee (MSKAPI MSK_deletetask) (


Parameters

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

Return

(MSKrescodee) – The function response code.

Groups

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
Return

(MSKrescodee) – The function response code.

Groups

Linear algebra

MSK_dualsensitivity
MSKrescodee (MSKAPI MSK_dualsensitivity) (
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
Return

(MSKrescodee) – The function response code.

Groups

Logging

MSKrescodee (MSKAPIVA MSK_echotask) (
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) (
MSKint64t afeidx)


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

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_emptyafebarfrowlist
MSKrescodee (MSKAPI MSK_emptyafebarfrowlist) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_emptyafefcol
MSKrescodee (MSKAPI MSK_emptyafefcol) (
MSKint32t varidx)


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

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions

MSK_emptyafefcollist
MSKrescodee (MSKAPI MSK_emptyafefcollist) (
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
Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions

MSK_emptyafefrow
MSKrescodee (MSKAPI MSK_emptyafefrow) (
MSKint64t afeidx)


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

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions

MSK_emptyafefrowlist
MSKrescodee (MSKAPI MSK_emptyafefrowlist) (
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
Return

(MSKrescodee) – The function response code.

Groups

Problem data - affine expressions

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


Evaluates the activity of an affine conic constraint.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_evaluateaccs
MSKrescodee (MSKAPI MSK_evaluateaccs) (
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
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
Return

(MSKrescodee) – The function response code.

Groups

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

void (MSKAPI MSK_freedbgtask) (
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

void (MSKAPI MSK_freetask) (
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
Return

(MSKrescodee) – The function response code.

Groups

Linear algebra

MSK_generateaccnames
MSKrescodee (MSKAPI MSK_generateaccnames) (
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) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_generateconenames Deprecated
MSKrescodee (MSKAPI MSK_generateconenames) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_generateconnames
MSKrescodee (MSKAPI MSK_generateconnames) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_generatedjcnames
MSKrescodee (MSKAPI MSK_generatedjcnames) (
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) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getaccafeidxlist
MSKrescodee (MSKAPI MSK_getaccafeidxlist) (
MSKint64t accidx,
MSKint64t * afeidxlist)


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

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getaccb
MSKrescodee (MSKAPI MSK_getaccb) (
MSKint64t accidx,
MSKrealt * b)


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

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getaccbarfblocktriplet
MSKrescodee (MSKAPI MSK_getaccbarfblocktriplet) (
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
MSK_getaccbarfnumblocktriplets
MSKrescodee (MSKAPI MSK_getaccbarfnumblocktriplets) (
MSKint64t * numtrip)


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

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getaccdomain
MSKrescodee (MSKAPI MSK_getaccdomain) (
MSKint64t accidx,
MSKint64t * domidx)


Obtains the domain appearing in the affine conic constraint.

Parameters
Return

(MSKrescodee) – The function response code.

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


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

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getaccdotys
MSKrescodee (MSKAPI MSK_getaccdotys) (
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
MSK_getaccfnumnz
MSKrescodee (MSKAPI MSK_getaccfnumnz) (
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
MSK_getaccftrip
MSKrescodee (MSKAPI MSK_getaccftrip) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getaccgvector
MSKrescodee (MSKAPI MSK_getaccgvector) (
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
MSK_getaccn
MSKrescodee (MSKAPI MSK_getaccn) (
MSKint64t accidx,
MSKint64t * n)


Obtains the dimension of the affine conic constraint.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getaccname
MSKrescodee (MSKAPI MSK_getaccname) (
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
MSK_getaccnamelen
MSKrescodee (MSKAPI MSK_getaccnamelen) (
MSKint64t accidx,
MSKint32t * len)


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

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getaccntot
MSKrescodee (MSKAPI MSK_getaccntot) (
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
MSK_getaccs
MSKrescodee (MSKAPI MSK_getaccs) (
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
MSK_getacol
MSKrescodee (MSKAPI MSK_getacol) (
MSKint32t j,
MSKint32t * nzj,
MSKint32t * subj,
MSKrealt * valj)


Obtains one column of $$A$$ in a sparse format.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getacolnumnz
MSKrescodee (MSKAPI MSK_getacolnumnz) (
MSKint32t i,
MSKint32t * nzj)


Obtains the number of non-zero elements in one column of $$A$$.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getacolslice
MSKrescodee (MSKAPI MSK_getacolslice) (
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
MSK_getacolslice64
MSKrescodee (MSKAPI MSK_getacolslice64) (
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
MSK_getacolslicenumnz
MSKrescodee (MSKAPI MSK_getacolslicenumnz) (
MSKint32t first,
MSKint32t last,
MSKint32t * numnz)


Obtains the number of non-zeros in a slice of columns of $$A$$.

Parameters
Return

(MSKrescodee) – The function response code.

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


Obtains the number of non-zeros in a slice of columns of $$A$$.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getacolslicetrip
MSKrescodee (MSKAPI MSK_getacolslicetrip) (
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
Return

(MSKrescodee) – The function response code.

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


Obtains $$\barF$$ in block triplet form.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getafebarfnumblocktriplets
MSKrescodee (MSKAPI MSK_getafebarfnumblocktriplets) (
MSKint64t * numtrip)


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

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getafebarfnumrowentries
MSKrescodee (MSKAPI MSK_getafebarfnumrowentries) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getafebarfrow
MSKrescodee (MSKAPI MSK_getafebarfrow) (
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
MSK_getafebarfrowinfo
MSKrescodee (MSKAPI MSK_getafebarfrowinfo) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getafefnumnz
MSKrescodee (MSKAPI MSK_getafefnumnz) (
MSKint64t * numnz)


Obtains the total number of nonzeros in $$F$$.

Parameters
Return

(MSKrescodee) – The function response code.

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


Obtains one row of $$F$$ in sparse format.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getafefrownumnz
MSKrescodee (MSKAPI MSK_getafefrownumnz) (
MSKint64t afeidx,
MSKint32t * numnz)


Obtains the number of nonzeros in one row of $$F$$.

Parameters
Return

(MSKrescodee) – The function response code.

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


Obtains the $$F$$ in triplet format.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getafeg
MSKrescodee (MSKAPI MSK_getafeg) (
MSKint64t afeidx,
MSKrealt * g)


Obtains a single coefficient in $$g$$.

Parameters
Return

(MSKrescodee) – The function response code.

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


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

Parameters
Return

(MSKrescodee) – The function response code.

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


Obtains a single coefficient in $$A$$.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getapiecenumnz
MSKrescodee (MSKAPI MSK_getapiecenumnz) (
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
Return

(MSKrescodee) – The function response code.

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


Obtains one row of $$A$$ in a sparse format.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getarownumnz
MSKrescodee (MSKAPI MSK_getarownumnz) (
MSKint32t i,
MSKint32t * nzi)


Obtains the number of non-zero elements in one row of $$A$$.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getarowslice
MSKrescodee (MSKAPI MSK_getarowslice) (
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
MSK_getarowslice64
MSKrescodee (MSKAPI MSK_getarowslice64) (
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
MSK_getarowslicenumnz
MSKrescodee (MSKAPI MSK_getarowslicenumnz) (
MSKint32t first,
MSKint32t last,
MSKint32t * numnz)


Obtains the number of non-zeros in a slice of rows of $$A$$.

Parameters
Return

(MSKrescodee) – The function response code.

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


Obtains the number of non-zeros in a slice of rows of $$A$$.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getarowslicetrip
MSKrescodee (MSKAPI MSK_getarowslicetrip) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getatrip
MSKrescodee (MSKAPI MSK_getatrip) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getatruncatetol
MSKrescodee (MSKAPI MSK_getatruncatetol) (
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
MSK_getbarablocktriplet
MSKrescodee (MSKAPI MSK_getbarablocktriplet) (
MSKint64t maxnum,
MSKint64t * num,
MSKint32t * subi,
MSKint32t * subj,
MSKint32t * subk,
MSKint32t * subl,
MSKrealt * valijkl)


Obtains $$\barA$$ in block triplet form.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getbaraidx
MSKrescodee (MSKAPI MSK_getbaraidx) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getbaraidxij
MSKrescodee (MSKAPI MSK_getbaraidxij) (
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
MSK_getbaraidxinfo
MSKrescodee (MSKAPI MSK_getbaraidxinfo) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getbarasparsity
MSKrescodee (MSKAPI MSK_getbarasparsity) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getbarcblocktriplet
MSKrescodee (MSKAPI MSK_getbarcblocktriplet) (
MSKint64t maxnum,
MSKint64t * num,
MSKint32t * subj,
MSKint32t * subk,
MSKint32t * subl,
MSKrealt * valjkl)


Obtains $$\barC$$ in block triplet form.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getbarcidx
MSKrescodee (MSKAPI MSK_getbarcidx) (
MSKint64t idx,
MSKint64t maxnum,
MSKint32t * j,
MSKint64t * num,
MSKint64t * sub,
MSKrealt * weights)


Obtains information about an element in $$\barC$$.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getbarcidxinfo
MSKrescodee (MSKAPI MSK_getbarcidxinfo) (
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
MSK_getbarcidxj
MSKrescodee (MSKAPI MSK_getbarcidxj) (
MSKint64t idx,
MSKint32t * j)


Obtains the row index of an element in $$\barC$$.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getbarcsparsity
MSKrescodee (MSKAPI MSK_getbarcsparsity) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getbarsj
MSKrescodee (MSKAPI MSK_getbarsj) (
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
Return

(MSKrescodee) – The function response code.

Groups

Solution - semidefinite

MSKrescodee (MSKAPI MSK_getbarsslice) (
MSKsoltypee whichsol,
MSKint32t first,
MSKint32t last,
MSKint64t slicesize,


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
Return

(MSKrescodee) – The function response code.

Groups

Solution - semidefinite

MSK_getbarvarname
MSKrescodee (MSKAPI MSK_getbarvarname) (
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
MSK_getbarvarnameindex
MSKrescodee (MSKAPI MSK_getbarvarnameindex) (
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
MSK_getbarvarnamelen
MSKrescodee (MSKAPI MSK_getbarvarnamelen) (
MSKint32t i,
MSKint32t * len)


Obtains the length of the name of a semidefinite variable.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getbarxj
MSKrescodee (MSKAPI MSK_getbarxj) (
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
Return

(MSKrescodee) – The function response code.

Groups

Solution - semidefinite

MSK_getbarxslice
MSKrescodee (MSKAPI MSK_getbarxslice) (
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
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) (
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
MSK_getcallbackfunc
MSKrescodee (MSKAPI MSK_getcallbackfunc) (
MSKcallbackfunc * func,
MSKuserhandle_t * handle)


Obtains the current user-defined callback function and associated user handle.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Callback

MSK_getcfix
MSKrescodee (MSKAPI MSK_getcfix) (
MSKrealt * cfix)


Obtains the fixed term in the objective.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getcj
MSKrescodee (MSKAPI MSK_getcj) (
MSKint32t j,
MSKrealt * cj)


Obtains one coefficient of $$c$$.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getclist
MSKrescodee (MSKAPI MSK_getclist) (
MSKint32t num,
const MSKint32t * subj,
MSKrealt * c)


Obtains a sequence of elements in $$c$$.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
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
MSK_getconbound
MSKrescodee (MSKAPI MSK_getconbound) (
MSKint32t i,
MSKboundkeye * bk,
MSKrealt * bl,
MSKrealt * bu)


Obtains bound information for one constraint.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getconboundslice
MSKrescodee (MSKAPI MSK_getconboundslice) (
MSKint32t first,
MSKint32t last,
MSKboundkeye * bk,
MSKrealt * bl,
MSKrealt * bu)


Obtains bounds information for a slice of the constraints.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getcone Deprecated
MSKrescodee (MSKAPI MSK_getcone) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getconeinfo Deprecated
MSKrescodee (MSKAPI MSK_getconeinfo) (
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
MSK_getconename Deprecated
MSKrescodee (MSKAPI MSK_getconename) (
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
MSK_getconenameindex Deprecated
MSKrescodee (MSKAPI MSK_getconenameindex) (
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
MSK_getconenamelen Deprecated
MSKrescodee (MSKAPI MSK_getconenamelen) (
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
MSK_getconname
MSKrescodee (MSKAPI MSK_getconname) (
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
MSK_getconnameindex
MSKrescodee (MSKAPI MSK_getconnameindex) (
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
MSK_getconnamelen
MSKrescodee (MSKAPI MSK_getconnamelen) (
MSKint32t i,
MSKint32t * len)


Obtains the length of the name of a constraint.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getcslice
MSKrescodee (MSKAPI MSK_getcslice) (
MSKint32t first,
MSKint32t last,
MSKrealt * c)


Obtains a sequence of elements in $$c$$.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getdimbarvarj
MSKrescodee (MSKAPI MSK_getdimbarvarj) (
MSKint32t j,
MSKint32t * dimbarvarj)


Obtains the dimension of a symmetric matrix variable.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getdjcafeidxlist
MSKrescodee (MSKAPI MSK_getdjcafeidxlist) (
MSKint64t djcidx,
MSKint64t * afeidxlist)


Obtains the list of affine expression indexes in a disjunctive constraint.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getdjcb
MSKrescodee (MSKAPI MSK_getdjcb) (
MSKint64t djcidx,
MSKrealt * b)


Obtains the optional constant term vector of a disjunctive constraint.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getdjcdomainidxlist
MSKrescodee (MSKAPI MSK_getdjcdomainidxlist) (
MSKint64t djcidx,
MSKint64t * domidxlist)


Obtains the list of domain indexes in a disjunctive constraint.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getdjcname
MSKrescodee (MSKAPI MSK_getdjcname) (
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
MSK_getdjcnamelen
MSKrescodee (MSKAPI MSK_getdjcnamelen) (
MSKint64t djcidx,
MSKint32t * len)


Obtains the length of the name of a disjunctive constraint.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getdjcnumafe
MSKrescodee (MSKAPI MSK_getdjcnumafe) (
MSKint64t djcidx,
MSKint64t * numafe)


Obtains the number of affine expressions in the disjunctive constraint.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getdjcnumafetot
MSKrescodee (MSKAPI MSK_getdjcnumafetot) (
MSKint64t * numafetot)


Obtains the total number of affine expressions in all disjunctive constraints.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getdjcnumdomain
MSKrescodee (MSKAPI MSK_getdjcnumdomain) (
MSKint64t djcidx,
MSKint64t * numdomain)


Obtains the number of domains in the disjunctive constraint.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getdjcnumdomaintot
MSKrescodee (MSKAPI MSK_getdjcnumdomaintot) (
MSKint64t * numdomaintot)


Obtains the total number of domains in all disjunctive constraints.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getdjcnumterm
MSKrescodee (MSKAPI MSK_getdjcnumterm) (
MSKint64t djcidx,
MSKint64t * numterm)


Obtains the number terms in the disjunctive constraint.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getdjcnumtermtot
MSKrescodee (MSKAPI MSK_getdjcnumtermtot) (
MSKint64t * numtermtot)


Obtains the total number of terms in all disjunctive constraints.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getdjcs
MSKrescodee (MSKAPI MSK_getdjcs) (
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
MSK_getdjctermsizelist
MSKrescodee (MSKAPI MSK_getdjctermsizelist) (
MSKint64t djcidx,
MSKint64t * termsizelist)


Obtains the list of term sizes in a disjunctive constraint.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getdomainn
MSKrescodee (MSKAPI MSK_getdomainn) (
MSKint64t domidx,
MSKint64t * n)


Obtains the dimension of the domain.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getdomainname
MSKrescodee (MSKAPI MSK_getdomainname) (
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
MSK_getdomainnamelen
MSKrescodee (MSKAPI MSK_getdomainnamelen) (
MSKint64t domidx,
MSKint32t * len)


Obtains the length of the name of a domain.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getdomaintype
MSKrescodee (MSKAPI MSK_getdomaintype) (
MSKint64t domidx,
MSKdomaintypee * domtype)


Returns the type of the domain.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getdouinf
MSKrescodee (MSKAPI MSK_getdouinf) (
MSKdinfiteme whichdinf,
MSKrealt * dvalue)


Obtains a double information item from the task information database.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Information items and statistics

MSK_getdouparam
MSKrescodee (MSKAPI MSK_getdouparam) (
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) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getdualsolutionnorms
MSKrescodee (MSKAPI MSK_getdualsolutionnorms) (
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) (
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) (
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
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getdviolcon
MSKrescodee (MSKAPI MSK_getdviolcon) (
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
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getdviolcones Deprecated
MSKrescodee (MSKAPI MSK_getdviolcones) (
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
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getdviolvar
MSKrescodee (MSKAPI MSK_getdviolvar) (
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
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getenv
MSKrescodee (MSKAPI MSK_getenv) (
MSKenv_t * env)


Obtains the environment used to create the task.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

MSK_getinfeasiblesubproblem
MSKrescodee (MSKAPI MSK_getinfeasiblesubproblem) (
MSKsoltypee whichsol,


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
Return

(MSKrescodee) – The function response code.

Groups

Infeasibility diagnostic

MSK_getinfindex
MSKrescodee (MSKAPI MSK_getinfindex) (
MSKinftypee inftype,
const char * infname,
MSKint32t * infindex)


Obtains the index of a named information item.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Information items and statistics

MSK_getinfmax
MSKrescodee (MSKAPI MSK_getinfmax) (
MSKinftypee inftype,
MSKint32t * infmax)


Obtains the maximum index of an information item of a given type inftype plus 1.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Information items and statistics

MSK_getinfname
MSKrescodee (MSKAPI MSK_getinfname) (
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
MSK_getintinf
MSKrescodee (MSKAPI MSK_getintinf) (
MSKiinfiteme whichiinf,
MSKint32t * ivalue)


Obtains an integer information item from the task information database.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Information items and statistics

MSK_getintparam
MSKrescodee (MSKAPI MSK_getintparam) (
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) (
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) (
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) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getlintinf
MSKrescodee (MSKAPI MSK_getlintinf) (
MSKliinfiteme whichliinf,
MSKint64t * ivalue)


Obtains a long integer information item from the task information database.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Information items and statistics

MSK_getmaxnamelen
MSKrescodee (MSKAPI MSK_getmaxnamelen) (
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
MSK_getmaxnumanz
MSKrescodee (MSKAPI MSK_getmaxnumanz) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getmaxnumanz64
MSKrescodee (MSKAPI MSK_getmaxnumanz64) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getmaxnumbarvar
MSKrescodee (MSKAPI MSK_getmaxnumbarvar) (
MSKint32t * maxnumbarvar)


Obtains maximum number of symmetric matrix variables for which space is currently preallocated.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getmaxnumcon
MSKrescodee (MSKAPI MSK_getmaxnumcon) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getmaxnumcone Deprecated
MSKrescodee (MSKAPI MSK_getmaxnumcone) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getmaxnumqnz
MSKrescodee (MSKAPI MSK_getmaxnumqnz) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getmaxnumqnz64
MSKrescodee (MSKAPI MSK_getmaxnumqnz64) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getmaxnumvar
MSKrescodee (MSKAPI MSK_getmaxnumvar) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSKrescodee (MSKAPI MSK_getmemusagetask) (
MSKint64t * meminuse,
MSKint64t * maxmemuse)


Parameters
Return

(MSKrescodee) – The function response code.

Groups

System, memory and debugging

MSKrescodee (MSKAPI MSK_getnadouinf) (
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

MSKrescodee (MSKAPI MSK_getnadouparam) (
const char * paramname,
MSKrealt * parvalue)


Obtains the value of a named double parameter.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Parameters

MSK_getnaintinf
MSKrescodee (MSKAPI MSK_getnaintinf) (
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) (
const char * paramname,
MSKint32t * parvalue)


Obtains the value of a named integer parameter.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Parameters

MSK_getnastrparam
MSKrescodee (MSKAPI MSK_getnastrparam) (
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
MSK_getnastrparamal
MSKrescodee (MSKAPI MSK_getnastrparamal) (
const char * paramname,
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) (
MSKint64t * num)


Obtains the number of affine conic constraints.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getnumafe
MSKrescodee (MSKAPI MSK_getnumafe) (
MSKint64t * numafe)


Obtains the number of affine expressions.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getnumanz
MSKrescodee (MSKAPI MSK_getnumanz) (
MSKint32t * numanz)


Obtains the number of non-zeros in $$A$$.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getnumanz64
MSKrescodee (MSKAPI MSK_getnumanz64) (
MSKint64t * numanz)


Obtains the number of non-zeros in $$A$$.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getnumbarablocktriplets
MSKrescodee (MSKAPI MSK_getnumbarablocktriplets) (
MSKint64t * num)


Obtains an upper bound on the number of elements in the block triplet form of $$\barA$$.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getnumbaranz
MSKrescodee (MSKAPI MSK_getnumbaranz) (
MSKint64t * nz)


Get the number of nonzero elements in $$\barA$$.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getnumbarcblocktriplets
MSKrescodee (MSKAPI MSK_getnumbarcblocktriplets) (
MSKint64t * num)


Obtains an upper bound on the number of elements in the block triplet form of $$\barC$$.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getnumbarcnz
MSKrescodee (MSKAPI MSK_getnumbarcnz) (
MSKint64t * nz)


Obtains the number of nonzero elements in $$\barC$$.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getnumbarvar
MSKrescodee (MSKAPI MSK_getnumbarvar) (
MSKint32t * numbarvar)


Obtains the number of semidefinite variables.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getnumcon
MSKrescodee (MSKAPI MSK_getnumcon) (
MSKint32t * numcon)


Obtains the number of constraints.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getnumcone Deprecated
MSKrescodee (MSKAPI MSK_getnumcone) (
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
MSK_getnumconemem Deprecated
MSKrescodee (MSKAPI MSK_getnumconemem) (
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
MSK_getnumdjc
MSKrescodee (MSKAPI MSK_getnumdjc) (
MSKint64t * num)


Obtains the number of disjunctive constraints.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getnumdomain
MSKrescodee (MSKAPI MSK_getnumdomain) (
MSKint64t * numdomain)


Obtain the number of domains defined.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getnumintvar
MSKrescodee (MSKAPI MSK_getnumintvar) (
MSKint32t * numintvar)


Obtains the number of integer-constrained variables.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getnumparam
MSKrescodee (MSKAPI MSK_getnumparam) (
MSKparametertypee partype,
MSKint32t * numparam)


Obtains the number of parameters of a given type.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getnumqconknz
MSKrescodee (MSKAPI MSK_getnumqconknz) (
MSKint32t k,
MSKint32t * numqcnz)


Obtains the number of non-zero quadratic terms in a constraint.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getnumqconknz64
MSKrescodee (MSKAPI MSK_getnumqconknz64) (
MSKint32t k,
MSKint64t * numqcnz)


Obtains the number of non-zero quadratic terms in a constraint.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getnumqobjnz
MSKrescodee (MSKAPI MSK_getnumqobjnz) (
MSKint32t * numqonz)


Obtains the number of non-zero quadratic terms in the objective.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getnumqobjnz64
MSKrescodee (MSKAPI MSK_getnumqobjnz64) (
MSKint64t * numqonz)


Obtains the number of non-zero quadratic terms in the objective.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getnumsymmat
MSKrescodee (MSKAPI MSK_getnumsymmat) (
MSKint64t * num)


Obtains the number of symmetric matrices stored in the vector $$E$$.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getnumvar
MSKrescodee (MSKAPI MSK_getnumvar) (
MSKint32t * numvar)


Obtains the number of variables.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getobjname
MSKrescodee (MSKAPI MSK_getobjname) (
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
MSK_getobjnamelen
MSKrescodee (MSKAPI MSK_getobjnamelen) (
MSKint32t * len)


Obtains the length of the name assigned to the objective function.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getobjsense
MSKrescodee (MSKAPI MSK_getobjsense) (
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) (
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) (
MSKparametertypee partype,
MSKint32t param,
char * parname)


Obtains the name for a parameter param of type partype.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getpowerdomainalpha
MSKrescodee (MSKAPI MSK_getpowerdomainalpha) (
MSKint64t domidx,
MSKrealt * alpha)


Obtains the exponent vector $$\alpha$$ of a primal or dual power cone domain.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getpowerdomaininfo
MSKrescodee (MSKAPI MSK_getpowerdomaininfo) (
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
MSK_getprimalobj
MSKrescodee (MSKAPI MSK_getprimalobj) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getprimalsolutionnorms
MSKrescodee (MSKAPI MSK_getprimalsolutionnorms) (
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) (
MSKproblemtypee * probtype)


Obtains the problem type.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

MSK_getprosta
MSKrescodee (MSKAPI MSK_getprosta) (
MSKsoltypee whichsol,
MSKprostae * problemsta)


Obtains the problem status.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getpviolacc
MSKrescodee (MSKAPI MSK_getpviolacc) (
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) (
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
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getpviolcon
MSKrescodee (MSKAPI MSK_getpviolcon) (
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
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getpviolcones Deprecated
MSKrescodee (MSKAPI MSK_getpviolcones) (
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
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getpvioldjc
MSKrescodee (MSKAPI MSK_getpvioldjc) (
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) (
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
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getqconk
MSKrescodee (MSKAPI MSK_getqconk) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getqconk64
MSKrescodee (MSKAPI MSK_getqconk64) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getqobj
MSKrescodee (MSKAPI MSK_getqobj) (
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
MSK_getqobj64
MSKrescodee (MSKAPI MSK_getqobj64) (
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
MSK_getqobjij
MSKrescodee (MSKAPI MSK_getqobjij) (
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
MSK_getreducedcosts
MSKrescodee (MSKAPI MSK_getreducedcosts) (
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
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) (
MSKsoltypee whichsol,
MSKstakeye * skc)


Obtains the status keys for the constraints.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getskcslice
MSKrescodee (MSKAPI MSK_getskcslice) (
MSKsoltypee whichsol,
MSKint32t first,
MSKint32t last,
MSKstakeye * skc)


Obtains the status keys for a slice of the constraints.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getskn
MSKrescodee (MSKAPI MSK_getskn) (
MSKsoltypee whichsol,
MSKstakeye * skn)


Obtains the status keys for the conic constraints.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getskx
MSKrescodee (MSKAPI MSK_getskx) (
MSKsoltypee whichsol,
MSKstakeye * skx)


Obtains the status keys for the scalar variables.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getskxslice
MSKrescodee (MSKAPI MSK_getskxslice) (
MSKsoltypee whichsol,
MSKint32t first,
MSKint32t last,
MSKstakeye * skx)


Obtains the status keys for a slice of the scalar variables.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getslc
MSKrescodee (MSKAPI MSK_getslc) (
MSKsoltypee whichsol,
MSKrealt * slc)


Obtains the $$s_l^c$$ vector for a solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getslcslice
MSKrescodee (MSKAPI MSK_getslcslice) (
MSKsoltypee whichsol,
MSKint32t first,
MSKint32t last,
MSKrealt * slc)


Obtains a slice of the $$s_l^c$$ vector for a solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getslx
MSKrescodee (MSKAPI MSK_getslx) (
MSKsoltypee whichsol,
MSKrealt * slx)


Obtains the $$s_l^x$$ vector for a solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getslxslice
MSKrescodee (MSKAPI MSK_getslxslice) (
MSKsoltypee whichsol,
MSKint32t first,
MSKint32t last,
MSKrealt * slx)


Obtains a slice of the $$s_l^x$$ vector for a solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getsnx
MSKrescodee (MSKAPI MSK_getsnx) (
MSKsoltypee whichsol,
MSKrealt * snx)


Obtains the $$s_n^x$$ vector for a solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getsnxslice
MSKrescodee (MSKAPI MSK_getsnxslice) (
MSKsoltypee whichsol,
MSKint32t first,
MSKint32t last,
MSKrealt * snx)


Obtains a slice of the $$s_n^x$$ vector for a solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getsolsta
MSKrescodee (MSKAPI MSK_getsolsta) (
MSKsoltypee whichsol,
MSKsolstae * solutionsta)


Obtains the solution status.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getsolution
MSKrescodee (MSKAPI MSK_getsolution) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getsolutioninfo
MSKrescodee (MSKAPI MSK_getsolutioninfo) (
MSKsoltypee whichsol,
MSKrealt * pobj,
MSKrealt * pviolcon,
MSKrealt * pviolvar,
MSKrealt * pviolbarvar,
MSKrealt * pviolcone,
MSKrealt * pviolitg,
MSKrealt * dobj,
MSKrealt * dviolcon,
MSKrealt * dviolvar,
MSKrealt * dviolbarvar,
MSKrealt * dviolcone)


Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getsolutioninfonew
MSKrescodee (MSKAPI MSK_getsolutioninfonew) (
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)


Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution information

MSK_getsolutionnew
MSKrescodee (MSKAPI MSK_getsolutionnew) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getsolutionslice
MSKrescodee (MSKAPI MSK_getsolutionslice) (
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
Return

(MSKrescodee) – The function response code.

Groups
MSK_getsparsesymmat
MSKrescodee (MSKAPI MSK_getsparsesymmat) (
MSKint64t idx,
MSKint64t maxlen,
MSKint32t * subi,
MSKint32t * subj,
MSKrealt * valij)


Get a single symmetric matrix from the matrix store.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getstrparam
MSKrescodee (MSKAPI MSK_getstrparam) (
MSKsparame param,
MSKint32t maxlen,
MSKint32t * len,
char * parvalue)


Obtains the value of a string parameter.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getstrparamal
MSKrescodee (MSKAPI MSK_getstrparamal) (
MSKsparame param,
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) (
MSKsparame param,
MSKint32t * len)


Obtains the length of a string parameter.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getsuc
MSKrescodee (MSKAPI MSK_getsuc) (
MSKsoltypee whichsol,
MSKrealt * suc)


Obtains the $$s_u^c$$ vector for a solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getsucslice
MSKrescodee (MSKAPI MSK_getsucslice) (
MSKsoltypee whichsol,
MSKint32t first,
MSKint32t last,
MSKrealt * suc)


Obtains a slice of the $$s_u^c$$ vector for a solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getsux
MSKrescodee (MSKAPI MSK_getsux) (
MSKsoltypee whichsol,
MSKrealt * sux)


Obtains the $$s_u^x$$ vector for a solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getsuxslice
MSKrescodee (MSKAPI MSK_getsuxslice) (
MSKsoltypee whichsol,
MSKint32t first,
MSKint32t last,
MSKrealt * sux)


Obtains a slice of the $$s_u^x$$ vector for a solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getsymbcon
MSKrescodee (MSKAPI MSK_getsymbcon) (
MSKint32t i,
MSKint32t sizevalue,
char * name,
MSKint32t * value)


Obtains the name and corresponding value for the $$i$$th symbolic constant.

Parameters
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
Return

(MSKrescodee) – The function response code.

Groups

Parameters

MSK_getsymmatinfo
MSKrescodee (MSKAPI MSK_getsymmatinfo) (
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
MSKrescodee (MSKAPI MSK_gettaskname) (


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
MSKrescodee (MSKAPI MSK_gettasknamelen) (
MSKint32t * len)


Obtains the length the task name.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getvarbound
MSKrescodee (MSKAPI MSK_getvarbound) (
MSKint32t i,
MSKboundkeye * bk,
MSKrealt * bl,
MSKrealt * bu)


Obtains bound information for one variable.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getvarboundslice
MSKrescodee (MSKAPI MSK_getvarboundslice) (
MSKint32t first,
MSKint32t last,
MSKboundkeye * bk,
MSKrealt * bl,
MSKrealt * bu)


Obtains bounds information for a slice of the variables.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getvarname
MSKrescodee (MSKAPI MSK_getvarname) (
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
MSK_getvarnameindex
MSKrescodee (MSKAPI MSK_getvarnameindex) (
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
MSK_getvarnamelen
MSKrescodee (MSKAPI MSK_getvarnamelen) (
MSKint32t i,
MSKint32t * len)


Obtains the length of the name of a variable.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getvartype
MSKrescodee (MSKAPI MSK_getvartype) (
MSKint32t j,
MSKvariabletypee * vartype)


Gets the variable type of one variable.

Parameters
Return

(MSKrescodee) – The function response code.

Groups
MSK_getvartypelist
MSKrescodee (MSKAPI MSK_getvartypelist) (
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
Return

(MSKrescodee) – The function response code.

Groups
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) (
MSKsoltypee whichsol,
MSKrealt * xc)


Obtains the $$x^c$$ vector for a solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution - primal

MSK_getxcslice
MSKrescodee (MSKAPI MSK_getxcslice) (
MSKsoltypee whichsol,
MSKint32t first,
MSKint32t last,
MSKrealt * xc)


Obtains a slice of the $$x^c$$ vector for a solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution - primal

MSK_getxx
MSKrescodee (MSKAPI MSK_getxx) (
MSKsoltypee whichsol,
MSKrealt * xx)


Obtains the $$x^x$$ vector for a solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution - primal

MSK_getxxslice
MSKrescodee (MSKAPI MSK_getxxslice) (
MSKsoltypee whichsol,
MSKint32t first,
MSKint32t last,
MSKrealt * xx)


Obtains a slice of the $$x^x$$ vector for a solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution - primal

MSK_gety
MSKrescodee (MSKAPI MSK_gety) (
MSKsoltypee whichsol,
MSKrealt * y)


Obtains the $$y$$ vector for a solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_getyslice
MSKrescodee (MSKAPI MSK_getyslice) (
MSKsoltypee whichsol,
MSKint32t first,
MSKint32t last,
MSKrealt * y)


Obtains a slice of the $$y$$ vector for a solution.

Parameters
Return

(MSKrescodee) – The function response code.

Groups

Solution - dual

MSK_infeasibilityreport
MSKrescodee (MSKAPI MSK_infeasibilityreport) (