Subsections


2. Functions


2.1 MSK_append

Description:

Appends a number of constraints or variables to the model. Appended constraints will be declared free and appended variables will be fixed at the level zero. Note MOSEK will automatically expand the problem dimension to accommodate the additional constraints and variables.

Syntax:
MSKrescodee MSK_append
       (MSKtask_t task,
        MSKaccmodee iscon,
        MSKintt num);
Arguments:
task
An optimization task.
iscon
Determine if constraints or variables are appended.
num
Number of constraints or variables which should be appended.
See also:
MSK_remove
The function removes a number of constraints or variables.


2.2 MSK_appendcone

Description:

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

\begin{displaymath}x^t \in \mathcal{C}\end{displaymath}

to the problem where $\mathcal{C}$ is a convex cone. $x^t$ is a subset of the variables which will specified by the argument submem. Note that the sets of variables appearing in different conic constraints must be disjoint.

Syntax:
MSKrescodee MSK_appendcone
       (MSKtask_t task,
        MSKconetypee conetype,
        MSKrealt conepar,
        MSKintt nummem,
        MSKCONST MSKidxt * submem);
Arguments:
task
An optimization task.
conetype
Specifies the type of the cone.
conepar
The parameter of the cone.
nummem
Number of member variables in the cone.
submem
Variable subscripts of the members in the cone.


2.3 MSK_appendcons

Description:

The function appends one or more constraints to the optimization task. The bounds and $A$ are modified as follows

\begin{displaymath}
\begin{array}{lcll}
l_{\mathtt{numcon+k}}^c & = & \mathtt{...
...c[k]}, & \mathtt{k}= 0,\ldots,\mathtt{num}-1, \\
\end{array} \end{displaymath} (2.1)

and
\begin{displaymath}
\begin{array}{lclll}
a_{\mathtt{numcon+k,\mathtt{asub[l]}}...
...l = \mathtt{aptrb[k]},\ldots,\mathtt{aptre[k]-1}.
\end{array} \end{displaymath} (2.2)

Syntax:
MSKrescodee MSK_appendcons
       (MSKtask_t task,
        MSKintt num,
        MSKCONST MSKlidxt * aptrb,
        MSKCONST MSKlidxt * aptre,
        MSKCONST MSKidxt * asub,
        MSKCONST MSKrealt * aval,
        MSKCONST MSKboundkeye * bkc,
        MSKCONST MSKrealt * blc,
        MSKCONST MSKrealt * buc);
Arguments:
task
An optimization task.
num
Number of constraints to be appended.
aptrb
See ([*]).
aptre
See ([*]).
asub
Variables subscripts of the new $A$ coefficients. See ([*]).
aval
$A$ coefficients of the new constraints. See ([*]).
bkc
Bound keys for constraints to be appended. See ([*]).
blc
Lower bounds on constraints to be appended. See ([*]).
buc
Upper bounds on constraints to be appended. See ([*]).
See also:
MSK_putmaxnumcon
Modifies the maximum number of constraints.


2.4 MSK_appendstat

Description:

Appends a record to the statistics file.

Syntax:
MSKrescodee MSK_appendstat (MSKtask_t task);
Arguments:
task
An optimization task.


2.5 MSK_appendvars

Description:

The function appends one or more variables to the optimization problem. Moreover, the function initializes $c$, $A$ and the bounds corresponding to the appended variables as follows

\begin{displaymath}
\begin{array}{lcll}
c_{\mathtt{numvar+k}} & = & \mathtt{cv...
...x[k]}, & \mathtt{k}= 0,\ldots,\mathtt{num}-1, \\
\end{array} \end{displaymath} (2.3)

and
\begin{displaymath}
\begin{array}{lclll}
a_{\mathtt{asub[l]},\mathtt{numvar+k}...
... l = \mathtt{aptrb[k]},\ldots,\mathtt{aptre[k]-1}
\end{array} \end{displaymath} (2.4)

where numvar is the number variables before the new variables are appended.

Syntax:
MSKrescodee MSK_appendvars
       (MSKtask_t task,
        MSKintt num,
        MSKCONST MSKrealt * cval,
        MSKCONST MSKlidxt * aptrb,
        MSKCONST MSKlidxt * aptre,
        MSKCONST MSKidxt * asub,
        MSKCONST MSKrealt * aval,
        MSKCONST MSKboundkeye * bkx,
        MSKCONST MSKrealt * blx,
        MSKCONST MSKrealt * bux);
Arguments:
task
An optimization task.
num
Number of variables to be appended.
cval
Values of $c$ for the variables to be appended. See ([*]).
aptrb
See ([*]).
aptre
See ([*]).
asub
Constraint subscripts of the $A$ coefficients to be added. See ([*]).
aval
The $A$ coefficients corresponding to appended variables. See ([*]).
bkx
Bound Keyes on variables to be appended. See ([*]).
blx
Lower bounds on variables to be appended. See ([*]).
bux
Upper bounds on variables to be appended. See ([*]).
See also:
MSK_putmaxnumvar
Modifies the maximum number of variables allowed.


2.6 MSK_bktostr

Description:

Obtains a identifier string corresponding to a bound key.

Syntax:
MSKrescodee MSK_bktostr
       (MSKtask_t task,
        MSKboundkeye bk,
        MSKstring_t str);
Arguments:
task
An optimization task.
bk
Bound key.
str~
String corresponding to the bound key code bk.


2.7 MSK_callocdbgenv

Description:

Debug version of MSK_callocenv.

Syntax:
MSKCONST MSKrescodee * MSK_callocdbgenv
       (MSKenv_t env,
        size_t number,
        size_t size,
        MSKCONST MSKstring_t file,
        unsigned line);
Arguments:
env
The MOSEK environment.
number
Number of elements.
size
Size of each individual element.
file
File from which the function is called.
line
Line in the file from which the function is called.


2.8 MSK_callocdbgtask

Description:

Debug version of MSK_calloctask.

Syntax:
MSKCONST MSKrescodee * MSK_callocdbgtask
       (MSKtask_t task,
        size_t number,
        size_t size,
        MSKCONST MSKstring_t file,
        unsigned line);
Arguments:
task
An optimization task.
number
Number of elements.
size
Size of each individual element.
file
File from which the function is called.
line
Line in the file from which the function is called.


2.9 MSK_callocenv

Description:

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

Syntax:
MSKCONST void * MSK_callocenv
       (MSKenv_t env,
        size_t number,
        size_t size);
Arguments:
env
The MOSEK environment.
number
Number of elements.
size
Size of each individual element.
Return:
A pointer to the memory allocated through the environment.


2.10 MSK_calloctask

Description:

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

Syntax:
MSKCONST void * MSK_calloctask
       (MSKtask_t task,
        size_t number,
        size_t size);
Arguments:
task
An optimization task.
number
Number of elements.
size
Size of each individual element.
Return:
A pointer to the memory allocated through the task.


2.11 MSK_checkconvexity

Description:

This function checks if a quadratic optimization problem is convex. The amount of checking is controlled by MSK_IPAR_CHECK_CONVEXITY. The function returns MSK_RES_ERR_NONCONVEX if the problem is not convex.

Syntax:
MSKrescodee MSK_checkconvexity (MSKtask_t task);
Arguments:
task
An optimization task.
See also:
MSK_IPAR_CHECK_CONVEXITY


2.12 MSK_checkmemenv

Description:

Checks the memory allocated by the environment.

Syntax:
MSKrescodee MSK_checkmemenv
       (MSKenv_t env,
        MSKCONST MSKstring_t file,
        MSKintt line);
Arguments:
env
The MOSEK environment.
file
File from which the function is called.
line
Line in the file from which the function is called.


2.13 MSK_checkmemtask

Description:

Checks the memory allocated by the task.

Syntax:
MSKrescodee MSK_checkmemtask
       (MSKtask_t task,
        MSKCONST MSKstring_t file,
        MSKintt line);
Arguments:
task
An optimization task.
file
File from which the function is called.
line
Line in the file from which the function is called.


2.14 MSK_checkversion

Description:

Compares the version of the MOSEK DLL with a specified version. Normally the specified version is the version at the build time.

Syntax:
MSKrescodee MSK_checkversion
       (MSKenv_t env,
        MSKintt major,
        MSKintt minor,
        MSKintt build,
        MSKintt revision);
Arguments:
env
The MOSEK environment.
major
Major version number.
minor
Minor version number.
build
Build number.
revision
Revision number.


2.15 MSK_chgbound

Description:

Changes the bounds for one constraint or variable. If con is nonzero, then the bounds are changed for a bound. Otherwise the bounds is changed for a variable.

If lower is nonzero, then the lower bound is changed as follows:

\begin{displaymath}
\mbox{new lower bound} = \left \{ \begin{array}{ll}
- \inf...
... \mathtt{value} & \mbox{otherwise}. \\
\end{array} \right .
\end{displaymath}

Otherwise if lower is zero, then

\begin{displaymath}
\mbox{new upper bound} = \left \{ \begin{array}{ll}
\infty...
... \mathtt{value} & \mbox{otherwise}. \\
\end{array} \right .
\end{displaymath}

Note this function automatically updates the bound key for bound.

Syntax:
MSKrescodee MSK_chgbound
       (MSKtask_t task,
        MSKaccmodee con,
        MSKidxt i,
        MSKintt lower,
        MSKintt finite,
        MSKrealt value);
Arguments:
task
An optimization task.
con
Defines if bounds for constraints or bounds for variables variables are changed.
i
Index of the constraint or variable for which the bounds should be changed.
lower
If nonzero, then the lower bound is changed. Otherwise the upper bound is changed.
finite
If nonzero, then value is assumed to be finite.
value
New value for the bound.


2.16 MSK_clonetask

Description:

Creates a clone (or copy if you wish) of an existing task. Callback functions are not included in the cloned task. A task that has nonlinear function callbacks cannot be cloned.

Syntax:
MSKrescodee MSK_clonetask
       (MSKtask_t task,
        MSKtask_t * clonedtask);
Arguments:
task
An optimization task.
clonedtask~
The cloned task i.e. an clone of task.


2.17 MSK_conetypetostr

Description:

Obtains the cone string identifier corresponding to a cone type.

Syntax:
MSKrescodee MSK_conetypetostr
       (MSKtask_t task,
        MSKconetypee conetype,
        MSKstring_t str);
Arguments:
task
An optimization task.
conetype
Cone type.
str~
String corresponding to the cone type code codetype.


2.18 MSK_deleteenv

Description:

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

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

Syntax:
MSKrescodee MSK_deleteenv (MSKenv_t * env);
Arguments:
env~~
The MOSEK environment.


2.19 MSK_deletefile

Description:

Deletes a MOSEK file file descriptor.

Syntax:
MSKrescodee MSK_deletefile (MSKCONST MSKfile_t * file);
Arguments:
file
A handle to an open file.


2.20 MSK_deletesolution

Description:

Deletes a solution and frees the memory it uses.

Syntax:
MSKrescodee MSK_deletesolution
       (MSKtask_t task,
        MSKintt whichsol);
Arguments:
task
An optimization task.
whichsol
The solution index which can take the values listed in Appendix [*].


2.21 MSK_deletetask

Description:

Deletes a task.

Syntax:
MSKrescodee MSK_deletetask (MSKtask_t * task);
Arguments:
task~~
An optimization task.


2.22 MSK_dualsensitivity

Description:

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

\begin{displaymath}
\{\mathtt{subj}[i] \vert i \in 0,\ldots,\mathtt{numj}-1\}
\end{displaymath}

The results are returned such that e.g $\mathtt{leftprice}[j]$ is the left shadow price of the objective coefficient with index $\mathtt{subj}[j]$.

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

Syntax:
MSKrescodee MSK_dualsensitivity
       (MSKtask_t task,
        MSKlintt numj,
        MSKCONST MSKidxt * subj,
        MSKrealt * leftpricej,
        MSKrealt * rightpricej,
        MSKrealt * leftrangej,
        MSKrealt * rightrangej);
Arguments:
task
An optimization task.
numj
Number of coefficients to be analyzed. Length of subj.
subj
Index of objective coefficients to analyze.
leftpricej~
$\mathtt{leftpricej}[j]$ is the left shadow price for the coefficients with index $\mathtt{subj[j]}$.
rightpricej~
$\mathtt{rightpricej}[j]$ is the right shadow price for the coefficients with index $\mathtt{subj[j]}$.
leftrangej~
$\mathtt{leftrangej}[j]$ is the left range $\beta_1$ for the coefficient with index $\mathtt{subj[j]}$.
rightrangej~
$\mathtt{leftrangej}[j]$ is the right range $\beta_2$ for the coefficient with index $\mathtt{subj[j]}$.
See also:
MSK_primalsensitivity
Perform sensitivity analysis on bounds.
MSK_sensitivityreport
Create a sensitivity report.
MSK_IPAR_SENSITIVITY_TYPE
MSK_IPAR_LOG_SENSITIVITY
MSK_IPAR_LOG_SENSITIVITY_OPT


2.23 MSK_echocodeenv

Description:

Prints the code to the environment message stream formatted ``nicely''. code must be a valid response code listed in Appendix [*]. Moreover, the corresponding response string listed in Appendix [*] is printed. It is the users responsibility to provide appropriate arguments for the response string listed in Appendix [*] too.

Syntax:
MSKrescodee MSK_echocodeenv
       (MSKenv_t env,
        MSKrescodee code,
        ...);
Arguments:
env
The MOSEK environment.
code
A valid MOSEK response code.


2.24 MSK_echocodetask

Description:

Prints the code to the message task stream formatted ``nicely''. code must be a valid response code listed in Appendix [*]. Moreover, the corresponding response string listed in Appendix [*] is printed. It is the users responsibility to provide appropriate arguments for the response string listed in Appendix [*] too.

Syntax:
MSKrescodee MSK_echocodetask
       (MSKtask_t task,
        MSKrescodee code,
        ...);
Arguments:
task
An optimization task.
code


2.25 MSK_echoenv

Description:

Sends a message to a given environment stream.

Syntax:
MSKrescodee MSK_echoenv
       (MSKenv_t env,
        MSKstreamtypee whichstream,
        MSKCONST MSKstring_t format,
        ...);
Arguments:
env
The MOSEK environment.
whichstream
Index of the stream.
format
Is a valid C format string which matches the arguments in `...'.


2.26 MSK_echointro

Description:

Prints a intro to message stream.

Syntax:
MSKrescodee MSK_echointro
       (MSKenv_t env,
        MSKintt longver);
Arguments:
env
The MOSEK environment.
longver
If nonzero, then the intro is slightly longer.


2.27 MSK_echotask

Description:

Prints a format string to a task stream.

Syntax:
MSKrescodee MSK_echotask
       (MSKtask_t task,
        MSKstreamtypee whichstream,
        MSKCONST MSKstring_t format,
        ...);
Arguments:
task
An optimization task.
whichstream
Index of the stream.
format


2.28 MSK_freedbgenv

Description:

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

Syntax:
MSKrescodee MSK_freedbgenv
       (MSKenv_t env,
        MSKCONST void * buffer,
        MSKCONST MSKstring_t file,
        unsigned line);
Arguments:
env
The MOSEK environment.
buffer
A pointer.
file
File from which the function is called.
line
Line in the file from which the function is called.


2.29 MSK_freedbgtask

Description:

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

Syntax:
MSKrescodee MSK_freedbgtask
       (MSKtask_t task,
        MSKCONST void * buffer,
        MSKCONST MSKstring_t file,
        unsigned line);
Arguments:
task
An optimization task.
buffer
A pointer.
file
File from which the function is called.
line
Line in the file from which the function is called.


2.30 MSK_freeenv

Description:

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

Syntax:
void MSK_freeenv
       (MSKenv_t env,
        MSKCONST void * buffer);
Arguments:
env
The MOSEK environment.
buffer
A pointer.


2.31 MSK_freetask

Description:

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

Syntax:
void MSK_freetask
       (MSKtask_t task,
        MSKCONST void * buffer);
Arguments:
task
An optimization task.
buffer
A pointer.


2.32 MSK_getaij

Description:

Obtains a single coefficient in $A$.

Syntax:
MSKrescodee MSK_getaij
       (MSKtask_t task,
        MSKidxt i,
        MSKidxt j,
        MSKrealt * aij);
Arguments:
task
An optimization task.
i
Row index of coefficient to be returned.
j
Column index of coefficient to be returned.
aij~
The required coefficient $a_{i,j}$.


2.33 MSK_getapiecenumnz

Description:

Obtains the number nonzeros of a rectangular piece of $A$ i.e. the number

\begin{displaymath}
\vert\{ (i,j):  a_{i,j} \not = 0,  \mathtt{firsti} \leq i ...
...sti}-1, \mathtt{firstj} \leq j \leq \mathtt{lastj}-1\} \vert
\end{displaymath}

where $\vert\mathcal{I}\vert$ means the number of elements in the set $\mathcal{I}$.

This function is not a an efficient way to obtain the number of nonzeros in one row or column. In that case use the function MSK_getavecnumnz.

Syntax:
MSKrescodee MSK_getapiecenumnz
       (MSKtask_t task,
        MSKidxt firsti,
        MSKidxt lasti,
        MSKidxt firstj,
        MSKidxt lastj,
        MSKlintt * numnz);
Arguments:
task
An optimization task.
firsti
Index of the first row in the rectangular piece.
lasti
Index of the last row plus one in the rectangular piece.
firstj
Index of the first column in the rectangular piece.
lastj
Index of the last column plus one in the rectangular piece.
numnz~
Number of nonzero $A$ elements in the rectangular piece.
See also:
MSK_getavecnumnz
Obtains the number of nonzero elements in one row or column of $A$.
MSK_getaslicenumnz
Obtains the number of nonzeros in a row or column slice of $A$.


2.34 MSK_getaslice

Description:

Obtains a sequence of rows or columns from $A$ in sparse format.

Syntax:
MSKrescodee MSK_getaslice
       (MSKtask_t task,
        MSKaccmodee iscon,
        MSKidxt first,
        MSKidxt last,
        MSKlintt maxnumnz,
        MSKlintt * surp,
        MSKlidxt * ptrb,
        MSKlidxt * ptre,
        MSKidxt * sub,
        MSKrealt * val);
Arguments:
task
An optimization task.
iscon
Defines whether a column-slice or a row-slice is requested.
first
Index of the first row or variable in the sequence.
last
Index of the last row or variable plus one in the sequence plus one.
maxnumnz
Denotes the length of the arrays sub and val.
surp~~
The required rows and columns are stored sequentially in sub and val starting from position maxnumnz-surp[0]. On return surp has been decremented by the total number of nonzero elements in the obtained rows and columns.
ptrb~
ptrb[t] is a index pointing to the first element in the $t$th row or column obtained.
ptre~
ptre[t] is a index pointing to the last element plus one in the $t$th row or column obtained.
sub~
Contains the row or columns subscripts.
val~
Contains the numerical elements.
See also:
MSK_getaslicenumnz
Obtains the number of nonzeros in a row or column slice of $A$.


2.35 MSK_getaslicenumnz

Description:

Obtains the number of nonzeros in a row or column slice of $A$.

Syntax:
MSKrescodee MSK_getaslicenumnz
       (MSKtask_t task,
        MSKaccmodee iscon,
        MSKidxt first,
        MSKidxt last,
        MSKlintt * numnz);
Arguments:
task
An optimization task.
iscon
Defines whether non-zeros are counted in a column-slice or a row-slice.
first
Index of the first row or variable in the sequence.
last
Index of the last row or variable plus one in the sequence plus one.
numnz~
Number of nonzeros in the slice.


2.36 MSK_getaslicetrip

Description:

Obtains a sequence of rows or columns from $A$ in a sparse triplet format. Define $p^1$ by

\begin{displaymath}p^1 = \mathtt{maxnumnz-surp[ 0]}\end{displaymath}

when the function is called and $p^2$ by

\begin{displaymath}p^2 = \mathtt{maxnumnz-surp[ 0]},\end{displaymath}

where surp[ 0] is the value upon termination. Using this notation then

\begin{displaymath}\mathtt{val}[k] = a_{\mathtt{subi[k]},\mathtt{subj[k]}}, \quad k=p^1,\ldots,p^2-1.\end{displaymath}

Syntax:
MSKrescodee MSK_getaslicetrip
       (MSKtask_t task,
        MSKaccmodee iscon,
        MSKidxt first,
        MSKidxt last,
        MSKlintt maxnumnz,
        MSKlintt * surp,
        MSKidxt * subi,
        MSKidxt * subj,
        MSKrealt * val);
Arguments:
task
An optimization task.
iscon
Defines whether a column-slice or a row-slice is requested.
first
Index of the first row or variable in the sequence.
last
Index of the last row or variable in the sequence plus one.
maxnumnz
Denotes the length of the arrays subi, subj, and aval.
surp~~
The required rows and columns are stored sequentially in sub and val starting from position maxnumnz-surp[0]. On return surp has been decremented by the total number of nonzero elements in the obtained rows and columns.
subi~
Constraint subscripts.
subj~
Variable subscripts.
val~
Values.
See also:
MSK_getaslicenumnz
Obtains the number of nonzeros in a row or column slice of $A$.


2.37 MSK_getavec

Description:

Obtains one row or column of $A$ in a sparse format. Hence if isrow is nonzero, then

\begin{displaymath}
\mathtt{vali}[k] = a_{i,\mathtt{subi}[k]}, \quad i= 0,\ldots,\mathtt{nzi[ 0]}-1
\end{displaymath}

else

\begin{displaymath}
\mathtt{vali}[k] = a_{\mathtt{subi}[k],i} , \quad i= 0,\ldots,\mathtt{nzi[ 0]}-1.
\end{displaymath}

Syntax:
MSKrescodee MSK_getavec
       (MSKtask_t task,
        MSKaccmodee isrow,
        MSKidxt i,
        MSKintt * nzi,
        MSKidxt * subi,
        MSKrealt * vali);
Arguments:
task
An optimization task.
isrow
Determine if a column or a row is requested.
i
Index of the row or column.
nzi~
Number of nonzeros in the vector obtained.
subi~
Index of the nonzeros in the vector obtained.
vali~
Numerical values of the vector to be obtained.


2.38 MSK_getavecnumnz

Description:

Obtains the number of nonzero elements in one row or column of $A$.

Syntax:
MSKrescodee MSK_getavecnumnz
       (MSKtask_t task,
        MSKaccmodee isrow,
        MSKidxt i,
        MSKintt * nzj);
Arguments:
task
An optimization task.
isrow
Defines whether nonzeros are counted by columns or by rows.
i
Index of the row or column.
nzj~
Number of nonzeros in the $i$th row or column of $A$.


2.39 MSK_getbound

Description:

Obtains bounds information for one constraint or variable.

Syntax:
MSKrescodee MSK_getbound
       (MSKtask_t task,
        MSKaccmodee iscon,
        MSKidxt i,
        MSKboundkeye * bk,
        MSKrealt * bl,
        MSKrealt * bu);
Arguments:
task
An optimization task.
iscon
Defines whether bounds for constraints or variables should be obtained.
i
Index of the constraint or variable for which the bound information should be obtained.
bk~
Bound keys.
bl~
Values for lower bounds.
bu~
Values for upper bounds.


2.40 MSK_getboundslice

Description:

Obtains bounds information for a sequence of variables or constraints.

Syntax:
MSKrescodee MSK_getboundslice
       (MSKtask_t task,
        MSKaccmodee iscon,
        MSKidxt first,
        MSKidxt last,
        MSKboundkeye * bk,
        MSKrealt * bl,
        MSKrealt * bu);
Arguments:
task
An optimization task.
iscon
Defines whether bounds for constraints or variables should be obtained.
first
First index in the sequence.
last
Last index plus 1 in the sequence.
bk~
Bound keys.
bl~
Values for lower bounds.
bu~
Values for upper bounds.


2.41 MSK_getbuildinfo

Description:

Obtains build information.

Syntax:
MSKrescodee MSK_getbuildinfo
       (MSKstring_t buildstate,
        MSKstring_t builddate,
        MSKstring_t buildtool);
Arguments:
buildstate~
State of binaries i.e. a debug, candidate, or final release build.
builddate~
Date the binaries was build.
buildtool~
Tool(s) used to build the binaries.


2.42 MSK_getc

Description:

Obtains whole $c$.

Syntax:
MSKrescodee MSK_getc
       (MSKtask_t task,
        MSKrealt * c);
Arguments:
task
An optimization task.
c~
Linear term in the objective.


2.43 MSK_getcallbackfunc

Description:

Obtains the current user defined call-back function and associated userhandle.

Syntax:
MSKrescodee MSK_getcallbackfunc
       (MSKtask_t task,
        MSKcallbackfunc * func,
        void ** handle);
Arguments:
task
An optimization task.
func~
The user defined call-back function associated with task. If func is identical to NULL, then no call-back function is associated with the task.
handle~
The user defined pointer associated with the user defined call-back function.


2.44 MSK_getcfix

Description:

Obtains the fixed term in the objective.

Syntax:
MSKrescodee MSK_getcfix
       (MSKtask_t task,
        MSKrealt * cfix);
Arguments:
task
An optimization task.
cfix~
Fixed term in the objective.


2.45 MSK_getcodedisc

Description:

Obtains a short description of the meaning of a response code code.

Syntax:
MSKrescodee MSK_getcodedisc
       (MSKrescodee code,
        MSKstring_t symname,
        MSKstring_t str);
Arguments:
code
A valid MOSEK response code.
symname~
Symbolic name corresponding to code.
str~
Obtains a short description of a response code.


2.46 MSK_getcone

Description:

Obtains a conic constraint.

Syntax:
MSKrescodee MSK_getcone
       (MSKtask_t task,
        MSKidxt k,
        MSKconetypee * conetype,
        MSKrealt * conepar,
        MSKintt * nummem,
        MSKidxt * submem);
Arguments:
task
An optimization task.
k
Index of the cone constraint.
conetype~
Is the type of the cone.
conepar~
Is the parameter of the cone.
nummem~
Is the number of members in the cone.
submem~
Variable subscripts of the cone members.


2.47 MSK_getconeinfo

Description:

Obtains information about a conic constraint.

Syntax:
MSKrescodee MSK_getconeinfo
       (MSKtask_t task,
        MSKidxt k,
        MSKconetypee * conetype,
        MSKrealt * conepar,
        MSKintt * nummem);
Arguments:
task
An optimization task.
k
Index of the conic constraint.
conetype~
Is the type of the cone.
conepar~
Is the parameter of the cone.
nummem~
Is the number of members in the cone.


2.48 MSK_getcslice

Description:

Obtains a sequence of elements in $c$.

Syntax:
MSKrescodee MSK_getcslice
       (MSKtask_t task,
        MSKidxt first,
        MSKidxt last,
        MSKrealt * c);
Arguments:
task
An optimization task.
first
First index in the sequence.
last
Last index plus 1 in the sequence.
c~
Linear term in the objective.


2.49 MSK_getdouinf

Description:

Obtains a double information item from task information database.

Syntax:
MSKrescodee MSK_getdouinf
       (MSKtask_t task,
        MSKdinfiteme whichdinf,
        MSKrealt * dvalue);
Arguments:
task
An optimization task.
whichdinf
An double information item. See Section [*] for the possible values.
dvalue~
The value of the required double information item.


2.50 MSK_getdouparam

Description:

Obtains the value of a double parameter.

Syntax:
MSKrescodee MSK_getdouparam
       (MSKtask_t task,
        MSKdparame param,
        MSKrealt * parvalue);
Arguments:
task
An optimization task.
param
Which parameter.
parvalue~
Parameter value.


2.51 MSK_getdualobj

Description:

Obtains the dual objective value for a solution.

Syntax:
MSKrescodee MSK_getdualobj
       (MSKtask_t task,
        MSKsoltypee whichsol,
        MSKrealt * dualobj);
Arguments:
task
An optimization task.
whichsol
The solution index which can take the values listed in Appendix [*].
dualobj~
Objective value corresponding to the dual solution.


2.52 MSK_getenv

Description:

Obtains the environment used to create the task.

Syntax:
MSKrescodee MSK_getenv
       (MSKtask_t task,
        MSKenv_t * env);
Arguments:
task
An optimization task.
env~
The MOSEK environment.


2.53 MSK_getglbdllname

Description:

Obtains the name of the global optimizer DLL.

Syntax:
MSKrescodee MSK_getglbdllname
       (MSKenv_t env,
        size_t sizedllname,
        MSKstring_t dllname);
Arguments:
env
The MOSEK environment.
sizedllname
dllname~
The DLL name.


2.54 MSK_getinfeasiblesubproblem

Description:

Obtains an infeasible sub problem based on the certificate of in feasibility. The subproblem returned is often smaller than the original problem and can therefor be used to diagnose the infeasibility.

Syntax:
MSKrescodee MSK_getinfeasiblesubproblem
       (MSKtask_t task,
        MSKintt whichsol,
        MSKtask_t * inftask);
Arguments:
task
An optimization task.
whichsol
The solution which should be used as the certificate.
inftask~
Task containing a subset of constraints/variables of task such that inftask is still infeasible.
See also:
MSK_IPAR_INFEAS_PREFER_PRIMAL


2.55 MSK_getinfindex

Description:

Obtains the index of a named information item.

Syntax:
MSKrescodee MSK_getinfindex
       (MSKtask_t task,
        MSKinftypee inftype,
        MSKCONST MSKstring_t infname,
        MSKintt * infindex);
Arguments:
task
An optimization task.
inftype
Type of the information item.
infname
Name of the information item.
infindex~


2.56 MSK_getinfmax

Description:

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

Syntax:
MSKrescodee MSK_getinfmax
       (MSKtask_t task,
        MSKinftypee inftype,
        MSKintt * infmax);
Arguments:
task
An optimization task.
inftype
Type of the information item.
infmax~


2.57 MSK_getinfname

Description:

Obtains the name of an information item.

Syntax:
MSKrescodee MSK_getinfname
       (MSKtask_t task,
        MSKinftypee inftype,
        MSKintt whichinf,
        MSKstring_t infname);
Arguments:
task
An optimization task.
inftype
Type of the information item.
whichinf
An information item. See Section [*] and Section [*] for the possible values.
infname~
Name of the information item.


2.58 MSK_getintinf

Description:

Obtains an integer information item from the task information database.

Syntax:
MSKrescodee MSK_getintinf
       (MSKtask_t task,
        MSKiinfiteme whichiinf,
        MSKintt * ivalue);
Arguments:
task
An optimization task.
whichiinf
An integer information type. See Section [*] for the possible values.
ivalue~
The value of the required integer information item.


2.59 MSK_getintparam

Description:

Obtains the value of an integer parameter.

Syntax:
MSKrescodee MSK_getintparam
       (MSKtask_t task,
        MSKiparame param,
        MSKintt * parvalue);
Arguments:
task
An optimization task.
param
Which parameter.
parvalue~
Parameter value.


2.60 MSK_getmaxnamelen

Description:

Obtains the maximum length of any objective, constraint, variable, or cone name.

Syntax:
MSKrescodee MSK_getmaxnamelen
       (MSKtask_t task,
        size_t * maxlen);
Arguments:
task
An optimization task.
maxlen~
The maximum length of any name.


2.61 MSK_getmaxnumanz

Description:

Obtains the maximum number of non-zeros allowed in $A$ in the optimization task.

Syntax:
MSKrescodee MSK_getmaxnumanz
       (MSKtask_t task,
        MSKlintt * maxnumanz);
Arguments:
task
An optimization task.
maxnumanz~
Maximum number of nonzero elements allowed in $A$.


2.62 MSK_getmaxnumcon

Description:

Obtains the maximum number constraints allowed in the optimization task.

Syntax:
MSKrescodee MSK_getmaxnumcon
       (MSKtask_t task,
        MSKintt * maxnumcon);
Arguments:
task
An optimization task.
maxnumcon~
Maximum number of constraints allowed in the optimization task.


2.63 MSK_getmaxnumcone

Description:

Obtains the maximum number cones allowed in the optimization task.

Syntax:
MSKrescodee MSK_getmaxnumcone
       (MSKtask_t task,
        MSKintt * maxnumcone);
Arguments:
task
An optimization task.
maxnumcone~
Maximum number of conic constraints allowed in the optimization task.


2.64 MSK_getmaxnumqnz

Description:

Obtains the maximum number of nonzeros allowed in all the $Q$ matrices (both objective and constraints).

Syntax:
MSKrescodee MSK_getmaxnumqnz
       (MSKtask_t task,
        MSKintt * maxnumqnz);
Arguments:
task
An optimization task.
maxnumqnz~
Maximum number of nonzero elements allowed in quadratic coefficient matrixes.


2.65 MSK_getmaxnumvar

Description:

Obtains the maximum number variables allowed in the optimization task.

Syntax:
MSKrescodee MSK_getmaxnumvar
       (MSKtask_t task,
        MSKintt * maxnumvar);
Arguments:
task
An optimization task.
maxnumvar~
Maximum number of variables allowed in the optimization task.


2.66 MSK_getmemusagetask

Description:

Obtains information about the amount of memeory use by a task.

Syntax:
MSKrescodee MSK_getmemusagetask
       (MSKtask_t task,
        size_t * meminuse,
        size_t * maxmemuse);
Arguments:
task
An optimization task.
meminuse~
Amount of memory/space used the task currently.
maxmemuse~
Maximum amount of memory/space by used the task until now.


2.67 MSK_getnadouinf

Description:

Obtains a double information item from task information database.

Syntax:
MSKrescodee MSK_getnadouinf
       (MSKtask_t task,
        MSKCONST MSKstring_t whichdinf,
        MSKrealt * dvalue);
Arguments:
task
An optimization task.
whichdinf
An double information item. See Section [*] for the possible values.
dvalue~
The value of the required double information item.


2.68 MSK_getnadouparam

Description:

Obtains the value of a named double parameter.

Syntax:
MSKrescodee MSK_getnadouparam
       (MSKtask_t task,
        MSKCONST MSKstring_t paramname,
        MSKrealt * parvalue);
Arguments:
task
An optimization task.
paramname
Name of a MOSEK parameter.
parvalue~
Parameter value.


2.69 MSK_getnaintinf

Description:

Obtains an integer information item from the task information database.

Syntax:
MSKrescodee MSK_getnaintinf
       (MSKtask_t task,
        MSKCONST MSKstring_t whichiinf,
        MSKintt * ivalue);
Arguments:
task
An optimization task.
whichiinf
An integer information type. See Section [*] for the possible values.
ivalue~
The value of the required integer information item.


2.70 MSK_getnaintparam

Description:

Obtains the value of a named integer parameter.

Syntax:
MSKrescodee MSK_getnaintparam
       (MSKtask_t task,
        MSKCONST MSKstring_t paramname,
        MSKintt * parvalue);
Arguments:
task
An optimization task.
paramname
Name of a MOSEK parameter.
parvalue~
Parameter value.


2.71 MSK_getname

Description:

Obtains a name of a item i.e. for instance a problem name.

Syntax:
MSKrescodee MSK_getname
       (MSKtask_t task,
        MSKproblemiteme whichitem,
        MSKidxt i,
        size_t maxlen,
        size_t * len,
        MSKstring_t name);
Arguments:
task
An optimization task.
whichitem
Problem item which can take the values listed in Appendix [*].
i
Index.
maxlen
Maximum length of name that can be stored in name.
len~
Is assigned the length of the required name.
name~
Is assigned the required name.
See also:
MSK_getmaxnamelen
Obtains the maximum length of any objective, constraint, variable, or cone name.


2.72 MSK_getnameindex

Description:

Checks whether a name has already been assigned to an item i.e. a constraint, a variable, or a cone. If the name has already been assigned, then the index of the item that name has been assigned to is returned.

Syntax:
MSKrescodee MSK_getnameindex
       (MSKtask_t task,
        MSKproblemiteme whichitem,
        MSKCONST MSKstring_t name,
        MSKintt * asgn,
        MSKidxt * index);
Arguments:
task
An optimization task.
whichitem
Problem item which can take the values listed in Appendix [*].
name
The name which should be checked.
asgn~
Is nonzero if name is assigned.
index~
If the name is assigned, assigned the required name.


2.73 MSK_getnastrparam

Description:

Obtains the value of a named string parameter.

Syntax:
MSKrescodee MSK_getnastrparam
       (MSKtask_t task,
        MSKCONST MSKstring_t paramname,
        size_t maxlen,
        size_t * len,
        MSKstring_t parvalue);
Arguments:
task
An optimization task.
paramname
Name of a MOSEK parameter.
maxlen
Length of parvalue.
len~
Identical to length of string hold by parvalue.
parvalue~
Parameter value.


2.74 MSK_getnastrparamal

Description:

Obtains the value of a string parameter.

Syntax:
MSKrescodee MSK_getnastrparamal
       (MSKtask_t task,
        MSKCONST MSKstring_t paramname,
        size_t numaddchr,
        MSKstring_t * value);
Arguments:
task
An optimization task.
paramname
Name of a MOSEK parameter.
numaddchr
Number of additional chars that is made room for in value[ 0].
value~~
Is the value corresponding to string parameter param. value[ 0] is char buffer allocated MOSEK and it must be freed by MSK_freetask.


2.75 MSK_getnlfunc

Description:

This function is used to retrieve the nonlinear callback functions. If NULL no nonlinear callback function exists.

Syntax:
MSKrescodee MSK_getnlfunc
       (MSKtask_t task,
        void ** nlhandle,
        MSKCONST MSKnlgetspfunc * nlgetsp,
        MSKCONST MSKnlgetvafunc * nlgetva);
Arguments:
task
An optimization task.
nlhandle
Retrieve the pointer to the user defined data structure. This structure is passed to the functions nlgetsp and nlgetva whenever those two functions called.
nlgetsp
Retrieve the function which provide information about the structure of the nonlinear functions in the optimization problem.
nlgetva
Retrieve the function which is used to evaluate the nonlinear function in the optimization problem at a given point.


2.76 MSK_getnumanz

Description:

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

Syntax:
MSKrescodee MSK_getnumanz
       (MSKtask_t task,
        MSKlintt * numanz);
Arguments:
task
An optimization task.
numanz~
Number of nonzero elements in $A$.


2.77 MSK_getnumcon

Description:

Obtains the number of constraints.

Syntax:
MSKrescodee MSK_getnumcon
       (MSKtask_t task,
        MSKintt * numcon);
Arguments:
task
An optimization task.
numcon~
Number of constraints.


2.78 MSK_getnumcone

Description:

Obtains the number of cones.

Syntax:
MSKrescodee MSK_getnumcone
       (MSKtask_t task,
        MSKintt * numcone);
Arguments:
task
An optimization task.
numcone~
Number conic constraints.


2.79 MSK_getnumconemem

Description:

Obtains the number of members in a cone.

Syntax:
MSKrescodee MSK_getnumconemem
       (MSKtask_t task,
        MSKidxt k,
        MSKintt * nummem);
Arguments:
task
An optimization task.
k
Index of the cone.
nummem~
Number of members in the cone.


2.80 MSK_getnumintvar

Description:

Obtains the number of integer constrained variables.

Syntax:
MSKrescodee MSK_getnumintvar
       (MSKtask_t task,
        MSKintt * numintvar);
Arguments:
task
An optimization task.
numintvar~
Number of integer variables.


2.81 MSK_getnumparam

Description:

Obtains the number of parameters of a given type.

Syntax:
MSKrescodee MSK_getnumparam
       (MSKtask_t task,
        MSKparametertypee partype,
        MSKintt * numparam);
Arguments:
task
An optimization task.
partype
Parameter type.
numparam~
Identical to the number of parameters of the type partype.


2.82 MSK_getnumqconnz

Description:

Obtains the number of nonzero quadratic terms in a constraint.

Syntax:
MSKrescodee MSK_getnumqconnz
       (MSKtask_t task,
        MSKidxt i,
        MSKlintt * numqcnz);
Arguments:
task
An optimization task.
i
Index of the constraint for which the quadratic terms should be obtained.
numqcnz~
Number of quadratic terms. See ([*]).


2.83 MSK_getnumqobjnz

Description:

Obtains the number of nonzero quadratic terms in the objective.

Syntax:
MSKrescodee MSK_getnumqobjnz
       (MSKtask_t task,
        MSKlintt * numqonz);
Arguments:
task
An optimization task.
numqonz~
Number of nonzero elements in $Q^o$.


2.84 MSK_getnumvar

Description:

Obtains the number of variables.

Syntax:
MSKrescodee MSK_getnumvar
       (MSKtask_t task,
        MSKintt * numvar);
Arguments:
task
An optimization task.
numvar~
Number of variables.


2.85 MSK_getobjname

Description:

Obtains the name assigned to the objective function.

Syntax:
MSKrescodee MSK_getobjname
       (MSKtask_t task,
        size_t maxlen,
        size_t * len,
        MSKstring_t objname);
Arguments:
task
An optimization task.
maxlen
Length of objname.
len~
Assigned the length of objective name.
objname~
Assigned the objective name.


2.86 MSK_getparammax

Description:

Obtains the maximum index of a parameter of a given type plus 1.

Syntax:
MSKrescodee MSK_getparammax
       (MSKtask_t task,
        MSKparametertypee partype,
        MSKCONST MSKintt * parammax);
Arguments:
task
An optimization task.
partype
Parameter type.
parammax


2.87 MSK_getparamname

Description:

Obtains the name for a parameter param of type partype.

Syntax:
MSKrescodee MSK_getparamname
       (MSKtask_t task,
        MSKparametertypee partype,
        MSKparametertypee param,
        MSKstring_t parname);
Arguments:
task
An optimization task.
partype
Parameter type.
param
Which parameter.
parname~
Parameter name.


2.88 MSK_getprimalobj

Description:

Obtains the primal objective value for a solution.

Syntax:
MSKrescodee MSK_getprimalobj
       (MSKtask_t task,
        MSKsoltypee whichsol,
        MSKrealt * primalobj);
Arguments:
task
An optimization task.
whichsol
The solution index which can take the values listed in Appendix [*].
primalobj~
Objective value corresponding to the primal solution.


2.89 MSK_getprobtype

Description:

Obtains the problem type.

Syntax:
MSKrescodee MSK_getprobtype
       (MSKtask_t task,
        MSKintt * probtype);
Arguments:
task
An optimization task.
probtype~
The problem type.


2.90 MSK_getqconk

Description:

Obtains all the quadratic terms in a constraint. The quadratic terms are stored sequentially qcsubi, qcsubj, and qcval.

Syntax:
MSKrescodee MSK_getqconk
       (MSKtask_t task,
        MSKidxt k,
        MSKlintt maxnumqcnz,
        MSKlintt * qcsurp,
        MSKlintt * numqcnz,
        MSKidxt * qcsubi,
        MSKidxt * qcsubj,
        MSKrealt * qcval);
Arguments:
task
An optimization task.
k
Which constraint.
maxnumqcnz
Length of the arrays qcsubi, qcsubj, and qcval.
qcsurp~~
On entering the function it is assumed that last qcsurp[0] positions in qcsubi, qcsubj, and qcval are free. Hence, the quadratic terms are stored in this area. On return qcsurp is identical to the number of free positions left in.
numqcnz~
Number of quadratic terms. See ([*]).
qcsubi~
$i$ subscripts for $q_{ij}^k$. See ([*]).
qcsubj~
$j$ subscripts for $q_{ij}^k$. See ([*]).
qcval~
Numerical value for $q_{ij}^k$. See ([*]).


2.91 MSK_getqobj

Description:

Obtains the quadratic terms in the objective. The required quadratic terms are stored sequentially in qosubi, qosubj, and qoval.

Syntax:
MSKrescodee MSK_getqobj
       (MSKtask_t task,
        MSKlintt maxnumqonz,
        MSKlintt * qosurp,
        MSKlintt * numqonz,
        MSKidxt * qosubi,
        MSKidxt * qosubj,
        MSKrealt * qoval);
Arguments:
task
An optimization task.
maxnumqonz
Is the length of the arrays qosubi, qosubj, and qoval.
qosurp~~
Initially qosurp[0] is the number of free positions at end of the arrays qosubi, qosubj, and qoval. On return qosurp is the updated number of free positions left in those arrays.
numqonz~
Number of nonzero elements in $Q^o$.
qosubi~
$i$ subscript for $q_{ij}^o$. See ([*]).
qosubj~
$j$ subscript for $q_{ij}^o$. See ([*]).
qoval~
Numerical value for $q_{ij}^o$. See ([*]).


2.92 MSK_getqobjij

Description:

Obtains one coefficient in the quadratic term of the objective i.e. obtains

\begin{displaymath}
q_{ij}^o.
\end{displaymath}

Syntax:
MSKrescodee MSK_getqobjij
       (MSKtask_t task,
        MSKidxt i,
        MSKidxt j,
        MSKrealt * qoij);
Arguments:
task
An optimization task.
i
$i$ index for the coefficient.
j
$j$ index for coefficient.
qoij~
The required coefficient.


2.93 MSK_getresponseclass

Description:

Obtain the class of a response code.

Syntax:
MSKrescodee MSK_getresponseclass
       (MSKrescodee r,
        MSKrescodetypee * rc);
Arguments:
r
A response code indicating the status of function call.
rc~
The return response class


2.94 MSK_getsolution

Description:

Obtains the complete solution.

Syntax:
MSKrescodee MSK_getsolution
       (MSKtask_t task,
        MSKsoltypee whichsol,
        MSKprostae * prosta,
        MSKsolstae * solsta,
        MSKstakeye * skc,
        MSKstakeye * skx,
        MSKstakeye * skn,
        MSKrealt * xc,
        MSKrealt * xx,
        MSKrealt * y,
        MSKrealt * slc,
        MSKrealt * suc,
        MSKrealt * slx,
        MSKrealt * sux,
        MSKrealt * snx);
Arguments:
task
An optimization task.
whichsol
The solution index which can take the values listed in Appendix [*].
prosta~
Problem status.
solsta~
Solution status.
skc~
Status keys for the constraints.
skx~
Status keys for the variables.
skn~
Status keys for the conic constraints.
xc~
Primal constraint solution.
xx~
Primal variable solution
y~
Dual variables corresponding to the constraints.
slc~
Dual variables corresponding to the lower bounds on the constraints.
suc~
Dual variables corresponding to the upper bounds on the constraints.
slx~
Dual variables corresponding to the lower bounds on the variables.
sux~
Dual variables corresponding to the upper bounds on the variables.
snx~
Dual variables corresponding to the conic constraints on the variables.
See also:
MSK_getsolutioni
Obtains the solution for single constraint or variable.
MSK_getsolutionslice
Obtains slice of the solution.


2.95 MSK_getsolutioni

Description:

Obtains the primal and dual solution information for a single constraint or variable.

Syntax:
MSKrescodee MSK_getsolutioni
       (MSKtask_t task,
        MSKintt iscon,
        MSKidxt i,
        MSKsoltypee whichsol,
        MSKstakeye * sk,
        MSKrealt * x,
        MSKrealt * sl,
        MSKrealt * su,
        MSKrealt * sn);
Arguments:
task
An optimization task.
iscon
If nonzero, then solution information for a constraint are obtained. Otherwise for a variable.
i
Index of the constraint or variable.
whichsol
The solution index which can take the values listed in Appendix [*].
sk~
Status key of the constraint of variable.
x~
Solution value of the primal variable.
sl~
Solution value of the dual variable associated with the lower bound.
su~
Solution value of the dual variable associated with the upper bound.
sn~
Solution value of the dual variable associated with the cone constraint.
See also:
MSK_getsolution
Obtains the complete solution.
MSK_getsolutionslice
Obtains slice of the solution.


2.96 MSK_getsolutionincallback

Description:

Obtains the whole or a part of the solution. This function must only be called with progress callback function.

This is an experimental implementation. Please contact MOSEK support before using this function.

Syntax:
MSKrescodee MSK_getsolutionincallback
       (MSKtask_t task,
        MSKcallbackcodee where,
        MSKsoltypee whichsol,
        MSKprostae * prosta,
        MSKsolstae * solsta,
        MSKstakeye * skc,
        MSKstakeye * skx,
        MSKstakeye * skn,
        MSKrealt * xc,
        MSKrealt * xx,
        MSKrealt * y,
        MSKrealt * slc,
        MSKrealt * suc,
        MSKrealt * slx,
        MSKrealt * sux,
        MSKrealt * snx);
Arguments:
task
An optimization task.
where
The callback-key from the current callback
whichsol
The solution index which can take the values listed in Appendix [*].
prosta~
Problem status.
solsta~
Solution status.
skc~
Status keys for the constraints.
skx~
Status keys for the variables.
skn~
Status keys for the conic constraints.
xc~
Primal constraint solution.
xx~
Primal variable solution
y~
Dual variables corresponding to the constraints.
slc~
Dual variables corresponding to the lower bounds on the constraints.
suc~
Dual variables corresponding to the upper bounds on the constraints.
slx~
Dual variables corresponding to the lower bounds on the variables.
sux~
Dual variables corresponding to the upper bounds on the variables.
snx~
Dual variables corresponding to the conic constraints on the variables.


2.97 MSK_getsolutioninf

Description:

Obtains information about a solution.

Syntax:
MSKrescodee MSK_getsolutioninf
       (MSKtask_t task,
        MSKsoltypee whichsol,
        MSKprostae * prosta,
        MSKsolstae * solsta,
        MSKrealt * primalobj,
        MSKrealt * maxpbi,
        MSKrealt * maxpcni,
        MSKrealt * maxpeqi,
        MSKrealt * maxinti,
        MSKrealt * dualobj,
        MSKrealt * maxdbi,
        MSKrealt * maxdcni,
        MSKrealt * maxdeqi);
Arguments:
task
An optimization task.
whichsol
The solution index which can take the values listed in Appendix [*].
prosta~
Problem status.
solsta~
Solution status.
primalobj~
Objective value corresponding to the primal solution.
maxpbi~
Maximum primal bound infeasibility.
maxpcni~
Maximum infeasibility in the primal conic constraints.
maxpeqi~
Maximum infeasibility in the primal equality constraints.
maxinti~
Maximum infeasibility in integer constraints.
dualobj~
Objective value corresponding to the dual solution.
maxdbi~
Maximum dual bound infeasibility.
maxdcni~
Maximum infeasibility in the dual conic constraints.
maxdeqi~
Maximum infeasibility in the dual equality constraints.


2.98 MSK_getsolutionslice

Description:

Obtains a slice of the solution.

Syntax:
MSKrescodee MSK_getsolutionslice
       (MSKtask_t task,
        MSKsoltypee whichsol,
        MSKsoliteme solitem,
        MSKidxt first,
        MSKidxt last,
        MSKrealt * values);
Arguments:
task
An optimization task.
whichsol
The solution index which can take the values listed in Appendix [*].
solitem
Which solution is required.
first
Index of the fast value in the slice.
last
Index of the last index+1 in the slice. I.e. if $xx[5,\ldots,9]$ is required last should be identical to $10$.
values~
The value in the required sequence are stored sequentially in values starting at values[ 0].
See also:
MSK_getsolution
Obtains the complete solution.
MSK_getsolutioni
Obtains the solution for single constraint or variable.


2.99 MSK_getsolutionstatus

Description:

Obtains information about the prolem and solution statuses.

Syntax:
MSKrescodee MSK_getsolutionstatus
       (MSKtask_t task,
        MSKsoltypee whichsol,
        MSKprostae * prosta,
        MSKsolstae * solsta);
Arguments:
task
An optimization task.
whichsol
The solution index which can take the values listed in Appendix [*].
prosta~
Problem status.
solsta~
Solution status.


2.100 MSK_getstrparam

Description:

Obtains the value of a string parameter.

Syntax:
MSKrescodee MSK_getstrparam
       (MSKtask_t task,
        MSKsparame param,
        size_t maxlen,
        size_t * len,
        MSKstring_t parvalue);
Arguments:
task
An optimization task.
param
Which parameter.
maxlen
Length of the parvalue buffer.
len~
The length of the parameter value.
parvalue~
If a non NULL pointer, then the parameter value is stored in parvalue.


2.101 MSK_getstrparamal

Description:

Obtains the value of a string parameter.

Syntax:
MSKrescodee MSK_getstrparamal
       (MSKtask_t task,
        MSKsparame param,
        size_t numaddchr,
        MSKstring_t * value);
Arguments:
task
An optimization task.
param
Which parameter.
numaddchr
Number of additional chars that is made room for in value[ 0].
value~~
Is the value corresponding to string parameter param. value[ 0] is char buffer allocated MOSEK and it must be freed by MSK_freetask.


2.102 MSK_getsymbcon

Description:

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

Syntax:
MSKrescodee MSK_getsymbcon
       (MSKtask_t task,
        MSKidxt i,
        size_t maxlen,
        MSKstring_t name,
        MSKintt * value);
Arguments:
task
An optimization task.
i
Index.
maxlen
Maximum length allowed of name including terminating null char.
name~
Name of the $i$th symbolic constant.
value~
The corresponding value.


2.103 MSK_getsymbcondim

Description:

Obtains the number of symbolic constants defined by MOSEK and the maximum length of name of any symbolic constant.

Syntax:
MSKrescodee MSK_getsymbcondim
       (MSKenv_t env,
        MSKintt * num,
        size_t * maxlen);
Arguments:
env
The MOSEK environment.
num~
Number of symbolic constants defined by MOSEK.
maxlen~
Maximum length of the name of any symbolic constants.


2.104 MSK_gettaskname

Description:

Obtains the name assigned to the task.

Syntax:
MSKrescodee MSK_gettaskname
       (MSKtask_t task,
        size_t maxlen,
        size_t * len,
        MSKstring_t taskname);
Arguments:
task
An optimization task.
maxlen
Length of the array taskname.
len~
Is assigned the length of the task name.
taskname~
Is assigned the task name.


2.105 MSK_getvartype

Description:

Gets the variable type of one variable.

Syntax:
MSKrescodee MSK_getvartype
       (MSKtask_t task,
        MSKidxt j,
        MSKvariabletypee * vartype);
Arguments:
task
An optimization task.
j
Index of the variable.
vartype~
Variable type of variable j.


2.106 MSK_getvartypelist

Description:

obtains the variable type for one or more variables. I.e. variable vartype[k] is assigned the variable type of variable subj[k].

Syntax:
MSKrescodee MSK_getvartypelist
       (MSKtask_t task,
        MSKintt num,
        MSKCONST MSKidxt * subj,
        MSKintt * vartype);
Arguments:
task
An optimization task.
num
Number of variables for which the variable type should be obtained.
subj
A list of variable indexes.
vartype~
The variables types corresponding to the variables specified by subj.


2.107 MSK_getversion

Description:

Obtains information about the version of MOSEK.

Syntax:
MSKrescodee MSK_getversion
       (MSKintt * major,
        MSKintt * minor,
        MSKintt * build,
        MSKintt * revision);
Arguments:
major~
Major version number. Only modified if a non-null pointer.
minor~
Minor version number. Only modified if a non-null pointer.
build~
Build number. Only modified if a non-null pointer.
revision~
Revision number. Only modified if a non-null pointer.


2.108 MSK_initbasissolve

Description:

This function must be called before the first usage of the function MSK_solvewithbasis. The function initialize various internal data structures which are required by MSK_solvewithbasis.

Moreover, if the optimization task is modified between two calls of MSK_solvewithbasis, then MSK_initbasissolve should called again immediately before the second call to MSK_solvewithbasis.

Syntax:
MSKrescodee MSK_initbasissolve
       (MSKtask_t task,
        MSKidxt * basis);
Arguments:
task
An optimization task.
basis~
This is an array of basis indexes which shows the ordering of the basic variables employed in MOSEK. If

\begin{displaymath}
\mathtt{basis}[i] \leq \mathtt{numcon}-1,
\end{displaymath}

then this implies that $x_{\mathtt{basis}[i]}^c$ is in the basis at position $i$. Otherwise if $x_{\mathtt{basis}[i]-\mathtt{numcon}}$ is in the basis at position $i$.


2.109 MSK_initenv

Description:

This function initializes the MOSEK environment, for instance the function contacts the license server. Error messages from the license manager can be captured by linking to the environment message stream.

Syntax:
MSKrescodee MSK_initenv (MSKenv_t env);
Arguments:
env
The MOSEK environment.


2.110 MSK_inputdata

Description:

The procedure is used to input the linear part of an optimization task.

Syntax:
MSKrescodee MSK_inputdata
       (MSKtask_t task,
        MSKintt maxnumcon,
        MSKintt maxnumvar,
        MSKintt numcon,
        MSKintt numvar,
        MSKCONST MSKrealt * c,
        MSKrealt cfix,
        MSKCONST MSKlidxt * aptrb,
        MSKCONST MSKlidxt * aptre,
        MSKCONST MSKidxt * asub,
        MSKCONST MSKrealt * aval,
        MSKCONST MSKboundkeye * bkc,
        MSKCONST MSKrealt * blc,
        MSKCONST MSKrealt * buc,
        MSKCONST MSKboundkeye * bkx,
        MSKCONST MSKrealt * blx,
        MSKCONST MSKrealt * bux);
Arguments:
task
An optimization task.
maxnumcon
Maximum number of constraints allowed in the optimization task.
maxnumvar
Maximum number of variables allowed in the optimization task.
numcon
Number of constraints.
numvar
Number of variables.
c
Linear term in the objective.
cfix
Fixed term in the objective.
aptrb
Pointer to the first element in columns of $A$. See ([*]).
aptre
Pointer to the last element + 1 in columns of $A$. See ([*]).
asub
Constraint subscripts. See ([*]).
aval
Constraint values. See ([*]).
bkc
Bound keys for the constraints.
blc
Lower bounds for the constraints.
buc
Upper bounds for the constraints.
bkx
Bound keys for the variables.
blx
Lower bounds for the variables.
bux
Upper bounds for the variables.


2.111 MSK_iparvaltosymnam

Description:

Obtains the symbolic name corresponding to a value that can be assigned to a integer parameter.

Syntax:
MSKrescodee MSK_iparvaltosymnam
       (MSKenv_t env,
        MSKparametertypee whichparam,
        MSKiparame whichvalue,
        MSKstring_t symbolicname);
Arguments:
env
The MOSEK environment.
whichparam
Which parameter.
whichvalue
Which value.
symbolicname~
The symbolic name corresponding to whichvalue.


2.112 MSK_isdouparname

Description:

Checks whether parname is a valid double parameter name.

Syntax:
MSKrescodee MSK_isdouparname
       (MSKtask_t task,
        MSKCONST MSKstring_t parname,
        MSKdparame * param);
Arguments:
task
An optimization task.
parname
Parameter name.
param~
Which parameter.


2.113 MSK_isintparname

Description:

Checks whether parname is a valid integer parameter name.

Syntax:
MSKrescodee MSK_isintparname
       (MSKtask_t task,
        MSKCONST MSKstring_t parname,
        MSKiparame * param);
Arguments:
task
An optimization task.
parname
Parameter name.
param~
Which parameter.


2.114 MSK_isstrparname

Description:

Checks whether parname is a valid string parameter name.

Syntax:
MSKrescodee MSK_isstrparname
       (MSKtask_t task,
        MSKCONST MSKstring_t parname,
        MSKsparame * param);
Arguments:
task
An optimization task.
parname
Parameter name.
param~
Which parameter.


2.115 MSK_linkfiletoenvstream

Description:

Direct all output to a stream to a file.

Syntax:
MSKrescodee MSK_linkfiletoenvstream
       (MSKenv_t env,
        MSKstreamtypee whichstream,
        MSKCONST MSKstring_t filename,
        MSKintt append);
Arguments:
env
The MOSEK environment.
whichstream
Index of the stream.
filename
Sends all output to the stream whichstream to the file named filename.
append
If this argument is nonzero, then the output is append to the file.


2.116 MSK_linkfiletotaskstream

Description:

Direct all output to a task stream to a file.

Syntax:
MSKrescodee MSK_linkfiletotaskstream
       (MSKtask_t task,
        MSKstreamtypee whichstream,
        MSKCONST MSKstring_t filename,
        MSKintt append);
Arguments:
task
An optimization task.
whichstream
Index of the stream.
filename
Sends all output to the stream whichstream to the file named filename.
append
If this argument is nonzero, then the output is append to the file.


2.117 MSK_linkfunctoenvstream

Description:

Connects a user defined function to a stream.

Syntax:
MSKrescodee MSK_linkfunctoenvstream
       (MSKenv_t env,
        MSKstreamtypee whichstream,
        MSKCONST void * handle,
        MSKstreamfunc func);
Arguments:
env
The MOSEK environment.
whichstream
Index of the stream.
handle
A user defined handle which is passed to the user defined function func.
func
All output to the stream whichstream is passed to func.


2.118 MSK_linkfunctotaskstream

Description:

Connects a user defined function to a task stream.

Syntax:
MSKrescodee MSK_linkfunctotaskstream
       (MSKtask_t task,
        MSKstreamtypee whichstream,
        MSKCONST void * handle,
        MSKstreamfunc func);
Arguments:
task
An optimization task.
whichstream
Index of the stream.
handle
A user defined handle which is passed to the user defined function func.
func
All output to the stream whichstream is passed to func.


2.119 MSK_makeemptytask

Description:

Creates a new optimization task.

Syntax:
MSKrescodee MSK_makeemptytask
       (MSKenv_t env,
        MSKtask_t * task);
Arguments:
env
The MOSEK environment.
task~
An optimization task.


2.120 MSK_makeenv

Description:

Creates a new MOSEK environment. Before the created environment can be used to create a task, then the environment must be initialized using the function MSK_initenv.

Syntax:
MSKrescodee MSK_makeenv
       (MSKenv_t * env,
        MSKvoid_t usrptr,
        MSKmallocfunc usrmalloc,
        MSKfreefunc usrfree,
        MSKCONST MSKchart * dbgfile);
Arguments:
env~
The MOSEK environment.
usrptr
A pointer to user defined data structure. The pointer is feed into usrmalloc and usrfree.
usrmalloc
A user defined malloc function or a NULL pointer.
usrfree
A user defined free function which is used deallocate space allocated by usrmalloc. This function must be defined if usrmalloc!=NULL.
dbgfile
A user defined file debug file.
See also:
MSK_initenv
Initialize a MOSEK environment.
MSK_putdllpath
Sets the path to DLL/shared libraries that MOSEK are loading.
MSK_putlicensedefaults
Set defaults used by the license manager.
MSK_putcpudefaults
Set defaults default CPU type and cache sizes.


2.121 MSK_makefile

Description:

Creates a MOSEK file descriptor. It is important if the file is to be written to that the MSK_putfileiomode is used to make the function writable.

Syntax:
MSKrescodee MSK_makefile
       (MSKtask_t task,
        MSKCONST MSKwchart * path,
        MSKCONST MSKfile_t * file);
Arguments:
task
An optimization task.
path
file
A handle to an open file.
See also:
MSK_deletefile
Deletes a MOSEK file file descriptor.
MSK_putfileiomode
Sets the io mode for a file.


2.122 MSK_makefilechar

Description:

Creates a MOSEK file descriptor.

Syntax:
MSKrescodee MSK_makefilechar
       (MSKtask_t task,
        MSKCONST MSKchart * path,
        MSKCONST MSKfile_t * file);
Arguments:
task
An optimization task.
path
file
A handle to an open file.
See also:
MSK_deletefile
Deletes a MOSEK file file descriptor.


2.123 MSK_makesolutionstatusunknown

Description:

Set the solution status to unknown. Also all the status keys of constraints and variables are set to unknown.

Syntax:
MSKrescodee MSK_makesolutionstatusunknown
       (MSKtask_t task,
        MSKsoltypee whichsol);
Arguments:
task
An optimization task.
whichsol
The solution index which can take the values listed in Appendix [*].


2.124 MSK_maketask

Description:

Creates a new task.

Syntax:
MSKrescodee MSK_maketask
       (MSKenv_t env,
        MSKintt maxnumcon,
        MSKintt maxnumvar,
        MSKtask_t * task);
Arguments:
env
The MOSEK environment.
maxnumcon
An optional estimate on the maximum number of constraints in the task. Can e.g be $0$ if no such estimate is known.
maxnumvar
An optional estimate on the maximum number of variables in the task. Can be $0$ if no such estimate is known.
task~
An optimization task.


2.125 MSK_optimize

Description:

Optimizes the problem.

Syntax:
MSKrescodee MSK_optimize (MSKtask_t task);
Arguments:
task
An optimization task.


2.126 MSK_optimizeconcurrent

Description:

Solves several instances of the same problem in parallel, with unique parameter settings for each task. The argument task contains the problem to be solved. taskarray is a pointer to a array of num empty tasks. The task task and the num tasks pointed to by taskarray are solved in parallel. That is ${\tt num}
+ 1$ threads are started with one optimizer in each. Each of the tasks can be initialized with different parameters, e.g different selection of solver.

All the concurrently running tasks are stopped when the optimizer successfully terminates for one of the tasks. After the function returns task contains the solution found by the task that finished first.

If all the concurrent optimizations finished with an error code different from MSK_RES_OK, then the error code from the solution of the task task is returned.

After MSK_optimizeconcurrent returns task holds the optimal solution and other solution information of the task that finished first.

In summary a call to MSK_optimizeconcurrent does the following:

  1. All date except user defined parameters (IPAR, DPAR and SPAR) in task are copied to each of the tasks in taskarray. Callback functions are not copied.
  2. The tasks task and the num tasks in taskarray are started in parallel.
  3. The solution from the task that finishes its optimization first is copied to task.

Syntax:
MSKrescodee MSK_optimizeconcurrent
       (MSKtask_t task,
        MSKCONST MSKtask_t * taskarray,
        MSKintt num);
Arguments:
task
An optimization task.
taskarray
An array of num tasks.
num
Length of taskarray


2.127 MSK_primalsensitivity

Description:

Calculate sensitivity information for bounds on variables or constraints.

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

Syntax:
MSKrescodee MSK_primalsensitivity
       (MSKtask_t task,
        MSKlintt numi,
        MSKCONST MSKidxt * subi,
        MSKCONST MSKboundkeye * marki,
        MSKlintt numj,
        MSKCONST MSKidxt * subj,
        MSKCONST MSKboundkeye * markj,
        MSKrealt * leftpricei,
        MSKrealt * rightpricei,
        MSKrealt * leftrangei,
        MSKrealt * rightrangei,
        MSKrealt * leftpricej,
        MSKrealt * rightpricej,
        MSKrealt * leftrangej,
        MSKrealt * rightrangej);
Arguments:
task
An optimization task.
numi
Number of bounds on constraints to be analyzed. Length of subi and marki.
subi
Indexes of bounds on constraints to analyze.
marki
The value of marki[i] specify for which bound on constraint subi[i] sensitivity analysis should be performed.
numj
Number of bounds on variables to be analyzed. Length of subj and markj.
subj
Indexes of bounds on variables to analyze.
markj
The value of markj[j] specify for which bound on constraint subj[j] sensitivity analysis should be performed.
leftpricei~
leftpricei[i] is the left shadow price for the bound on the constraint with index subi[i] and bound key marki[i].
rightpricei~
rightpricei[i] is the right shadow price for the bound on the constraint with index subi[i] and bound key marki[i].
leftrangei~
leftrangei[i] is the left range for the bound on the constraint with index subi[i] and bound key marki[i].
rightrangei~
rightrangei[i] is the right range for the bound on the constraint with index subi[i] and bound key marki[i].
leftpricej~
leftpricej[j] is the left shadow price for the bound on variable subj[j] and bound key markj[j].
rightpricej~
rightpricej[j] is the right shadow price for the bound on variable subj[j] and bound key markj[j].
leftrangej~
leftrangej[j] is the left range for the bound on variable subj[j] and bound key markj[j].
rightrangej~
rightrangej[j] is the right range for the bound on variable subj[j] and bound key markj[j].
See also:
MSK_dualsensitivity
Perform sensitivity analysis on objective coefficients.
MSK_sensitivityreport
Create a sensitivity report.
MSK_IPAR_SENSITIVITY_TYPE
MSK_IPAR_LOG_SENSITIVITY
MSK_IPAR_LOG_SENSITIVITY_OPT


2.128 MSK_printdata

Description:

Prints a part of the problem data to a stream. This function is normally used for debugging purpose only. I.e. to verify that the correct data has been inputted.

Syntax:
MSKrescodee MSK_printdata
       (MSKtask_t task,
        MSKstreamtypee whichstream,
        MSKidxt firsti,
        MSKidxt lasti,
        MSKidxt firstj,
        MSKidxt lastj,
        MSKidxt firstk,
        MSKidxt lastk,
        MSKintt c,
        MSKintt qo,
        MSKintt a,
        MSKintt qc,
        MSKintt bc,
        MSKintt bx,
        MSKintt vartype,
        MSKintt cones);
Arguments:
task
An optimization task.
whichstream
Index of the stream.
firsti
Index of first constraint for data should be printed.
lasti
Index of last constraint plus 1 for which data is to be printed.
firstj
Index of first variable for data should be printed.
lastj
Index of last variable plus 1 for which data is to be printed.
firstk
Index of first cone for data should be printed.
lastk
Index of last cone plus 1 for which data is to be printed.
c
If nonzero, then $c$ is printed.
qo
If nonzero, then $Q^o$ is printed.
a
If nonzero, then $A$ is printed.
qc
If nonzero, then $Q^k$ is printed for the relevant constraints.
bc
If nonzero, then constraints bounds are printed.
bx
If nonzero, then variable bounds are printed.
vartype
If nonzero, then variable types are printed.
cones
If nonzero, then conic data are printed.


2.129 MSK_printparam

Description:

Prints the current parameter settings to the message stream.

Syntax:
MSKrescodee MSK_printparam (MSKtask_t task);
Arguments:
task
An optimization task.


2.130 MSK_probtypetostr

Description:

Obtains a explanatory string corresponding to a problem type.

Syntax:
MSKrescodee MSK_probtypetostr
       (MSKtask_t task,
        MSKproblemtypee probtype,
        MSKstring_t str);
Arguments:
task
An optimization task.
probtype
Problem type.
str~
String corresponding to the problem type key probtype.


2.131 MSK_prostatostr

Description:

Obtains a explanatory string corresponding to a problem status.

Syntax:
MSKrescodee MSK_prostatostr
       (MSKtask_t task,
        MSKprostae prosta,
        MSKstring_t str);
Arguments:
task
An optimization task.
prosta
Problem status.
str~
String corresponding to the status key prosta.


2.132 MSK_putaij

Description:

Changes a coefficient in $A$ using the method

\begin{displaymath}
a_{\mathtt{i}\mathtt{j}} = \mathtt{aij}.
\end{displaymath}

Syntax:
MSKrescodee MSK_putaij
       (MSKtask_t task,
        MSKidxt i,
        MSKidxt j,
        MSKrealt aij);
Arguments:
task
An optimization task.
i
Index of the constraint in which the change should occur.
j
Index of variable in which the change should occur.
aij
New coefficient for $a_{i,j}$.
See also:
MSK_putavec
Replaces all elements in one rows or columns in $A$ by new values.
MSK_putaijlist
Changes one or more coefficients in $A$.


2.133 MSK_putaijlist

Description:

Changes one or more coefficients in $A$ using the method

\begin{displaymath}
a_{\mathtt{subi[k]},\mathtt{subj[k]}} = \mathtt{valij[k]}, \quad k=0,\ldots,\mathtt{num}-1.
\end{displaymath}

Syntax:
MSKrescodee MSK_putaijlist
       (MSKtask_t task,
        MSKintt num,
        MSKCONST MSKidxt * subi,
        MSKCONST MSKidxt * subj,
        MSKCONST MSKrealt * valij);
Arguments:
task
An optimization task.
num
Number coefficients that should be changed.
subi
Constraint indexes in which the change should occur.
subj
Variable indexes in which the change should occur.
valij
New coefficients values for $a_{i,j}$.
See also:
MSK_putavec
Replaces all elements in one rows or columns in $A$ by new values.
MSK_putaij
Changes a coefficient in $A$.


2.134 MSK_putavec

Description:

Replaces all elements in one row or column of $A$ with another set of user specified elements. If isrow is nonzero, then

\begin{displaymath}
a_{i,\mathtt{subi}[k]} = \mathtt{vali}[k], \quad 0,\ldots,\mathtt{nzi}-1
\end{displaymath}

else

\begin{displaymath}
a_{\mathtt{subi}[k],i} = \mathtt{vali}[k], \quad 0,\ldots,\mathtt{nzi}-1.
\end{displaymath}

The above formulas assumes there are no duplicates in subi. If that is not the case, then the duplicate elements are added together.

Syntax:
MSKrescodee MSK_putavec
       (MSKtask_t task,
        MSKaccmodee isrow,
        MSKidxt i,
        MSKlintt nzi,
        MSKCONST MSKidxt * subi,
        MSKCONST MSKrealt * vali);
Arguments:
task
An optimization task.
isrow
Defines whether to replace a column or a row.
i
If isrow is nonzero, then $i$ is a constraint index. Otherwise it is a column index.
nzi
Number of nonzeros in the vector.
subi
Index of the $a_{i,j}$ values that should be changed.
vali
New $a_{i,j}$ values.


2.135 MSK_putaveclist

Description:

The function replaces all elements in one or more rows or columns of $A$ with another set of specified elements.

Assume isrow is nonzero then for $i= 0,\ldots,\mathtt{num}-1$ let

\begin{displaymath}
\begin{array}{rcl}
j & = & \mathtt{sub}[i], \\
a_{j,\mat...
...d k=\mathtt{aptrb}[i],\ldots,\mathtt{aptre}[i]-1.
\end{array} \end{displaymath}

Otherwise assume isrow is zero then for $i= 0,\ldots,\mathtt{num}-1$ let

\begin{displaymath}
\begin{array}{rcl}
j & = & \mathtt{sub}[i], \\
a_{\matht...
...d k=\mathtt{aptrb}[i],\ldots,\mathtt{aptre}[i]-1.
\end{array} \end{displaymath}

Syntax:
MSKrescodee MSK_putaveclist
       (MSKtask_t task,
        MSKaccmodee isrow,
        MSKlintt num,
        MSKCONST MSKidxt * sub,
        MSKCONST MSKlidxt * ptrb,
        MSKCONST MSKlidxt * ptre,
        MSKCONST MSKidxt * asub,
        MSKCONST MSKrealt * aval);
Arguments:
task
An optimization task.
isrow
Defines whether columns or rows are changed.
num
Number of rows or columns of $A$ that should be replaced.
sub
sub contain indexes of rows or columns that should be replaced. sub should not contain duplicate values.
ptrb
Pointer to the first element in the rows or columns stored in asub and aval.
ptre
Pointer to the last element plus one in the rows or columns stored in asub and aval.
asub
In the case con is nonzero, then asub contains the new variable indexes. Otherwise it contains the new constraint indexes.
aval
Constraint values. See ([*]).


2.136 MSK_putbound

Description:

Changes the bounds for either one constraint or one variable.

Syntax:
MSKrescodee MSK_putbound
       (MSKtask_t task,
        MSKaccmodee iscon,
        MSKidxt i,
        MSKboundkeye bk,
        MSKrealt bl,
        MSKrealt bu);
Arguments:
task
An optimization task.
iscon
Defines whether the bound for a constraint or a variable is changed.
i
Index of the constraint or variable.
bk
New bound key.
bl
New lower bound.
bu
New upper bound.
See also:
MSK_chgbound
Changes the bounds for one constraint or variable.
MSK_putboundlist
Changes the bounds of constraints or variables.


2.137 MSK_putboundlist

Description:

Changes the bounds for either some constraints or variables. In the case multiple bound changes are specified for a constraint or a variable, then only the last change has any effect.

Syntax:
MSKrescodee MSK_putboundlist
       (MSKtask_t task,
        MSKaccmodee iscon,
        MSKlintt num,
        MSKCONST MSKidxt * sub,
        MSKCONST MSKboundkeye * bk,
        MSKCONST MSKrealt * bl,
        MSKCONST MSKrealt * bu);
Arguments:
task
An optimization task.
iscon
Defines whether bounds for constraints or variables are changed.
num
Number of bounds that should be changed.
sub
Subscripts of the bounds that should be changed.
bk
If con is non-zero (zero), then constraint (variable) sub[t] is assigned the key bk[t].
bl
If con is non-zero (zero), then constraint (variable) sub[t] is assigned the lower bound bl[t].
bu
If con is non-zero (zero), then constraint (variable) sub[t] is assigned the upper bound bu[t].


2.138 MSK_putboundslice

Description:

Changes the bounds for a sequence of variables or constraints.

Syntax:
MSKrescodee MSK_putboundslice
       (MSKtask_t task,
        MSKaccmodee con,
        MSKidxt first,
        MSKidxt last,
        MSKCONST MSKboundkeye * bk,
        MSKCONST MSKrealt * bl,
        MSKCONST MSKrealt * bu);
Arguments:
task
An optimization task.
con
Defines whether bounds for constraints or variables are changed.
first
First index in the sequence.
last
Last index plus 1 in the sequence.
bk
Bound keys.
bl
Values for lower bounds.
bu
Values for upper bounds.


2.139 MSK_putcallbackfunc

Description:

The function is used to input a user defined call-back function. The call-back function is called frequently during the optimization process.

Syntax:
MSKrescodee MSK_putcallbackfunc
       (MSKtask_t task,
        MSKcallbackfunc func,
        MSKCONST void * handle);
Arguments:
task
An optimization task.
func
A user defined function which will be called occasionally from within the MOSEK optimizers. If the argument is a NULL pointer, then a previous inputted call-back function removed.
handle
A pointer to a user defined data structure. Whenever the function callbackfunc is called, then handle is passed to the function.


2.140 MSK_putcfix

Description:

Replaces the a fixed term in the objective by a new one.

Syntax:
MSKrescodee MSK_putcfix
       (MSKtask_t task,
        MSKrealt cfix);
Arguments:
task
An optimization task.
cfix
Fixed term in the objective.


2.141 MSK_putcj

Description:

Modifies one element in the linear term $c$ in the objective using the principle

\begin{displaymath}
c_{\mathtt{j}} = \mathtt{cj]}.
\end{displaymath}

Syntax:
MSKrescodee MSK_putcj
       (MSKtask_t task,
        MSKidxt j,
        MSKrealt cj);
Arguments:
task
An optimization task.
j
Index of the variable for which $c$ should be changed.
cj
New $c[j]$ value.


2.142 MSK_putclist

Description:

Modifies elements in the linear term $c$ in the objective using the principle

\begin{displaymath}
c_{\mathtt{subj[t]}} = \mathtt{val[t]}, \quad t=0,\ldots,\mathtt{num}-1.
\end{displaymath}

If a variable index is specified multiple times in subj, then the corresponding elements of val are added together.

Syntax:
MSKrescodee MSK_putclist
       (MSKtask_t task,
        MSKintt num,
        MSKCONST MSKidxt * subj,
        MSKCONST MSKrealt * val);
Arguments:
task
An optimization task.
num
Number of coefficients that should be changed.
subj
Index of variables for which $c$ should be changed.
val
New numerical values for coefficients in $c$ that should be modified.


2.143 MSK_putcone

Description:

Replaces a conic constraint with a new conic constraint.

Syntax:
MSKrescodee MSK_putcone
       (MSKtask_t task,
        MSKidxt k,
        MSKconetypee conetype,
        MSKrealt conepar,
        MSKintt nummem,
        MSKCONST MSKidxt * submem);
Arguments:
task
An optimization task.
k
Index of the cone.
conetype
Specifies the type of the cone.
conepar
The parameter of the cone.
nummem
Number of members in the cone.
submem
Variable subscripts of member in the cone.


2.144 MSK_putcpudefaults

Description:

Set defaults CPU type and cache sizes. This function should be called before MSK_initenv.

Syntax:
MSKrescodee MSK_putcpudefaults
       (MSKenv_t env,
        MSKintt cputype,
        MSKintt sizel1,
        MSKintt sizel2);
Arguments:
env
The MOSEK environment.
cputype
The CPU id.
sizel1
Size of the L1 cache.
sizel2
Size of the L2 cache.


2.145 MSK_putctrlcfunc

Description:

The function is used to input a user defined ctrl-c function which is called occasionally during the optimization process. If the ctrl-c function returns a nonzero value, then MOSEK terminates the optimization process and returns with the return code MSK_RES_TRM_USER_BREAK.

Note the function is only called if the parameter MSK_IPAR_CHECK_CTRL_C is set to MSK_ON.

Syntax:
MSKrescodee MSK_putctrlcfunc
       (MSKenv_t env,
        MSKctrlcfunc ctrlcfunc,
        MSKCONST void * handle);
Arguments:
env
The MOSEK environment.
ctrlcfunc
A user defined ctrl-c function.
handle
A pointer to some user defined data structure (or a NULL pointer). This pointer is passed to ctrlcfunc whenever it is called.


2.146 MSK_putdllpath

Description:

Sets the path to DLL/shared libraries that MOSEK are loading. If needed, then it should normally be called before MSK_initenv.

Syntax:
MSKrescodee MSK_putdllpath
       (MSKenv_t env,
        MSKCONST MSKstring_t dllpath);
Arguments:
env
The MOSEK environment.
dllpath
A path to where the MOSEK dynamic link/shared libraries are located. If dllpath is identical to NULL, then MOSEK assumes that operating system can locate the libraries.


2.147 MSK_putdouparam

Description:

Sets the value of a double parameter.

Syntax:
MSKrescodee MSK_putdouparam
       (MSKtask_t task,
        MSKdparame param,
        MSKrealt parvalue);
Arguments:
task
An optimization task.
param
Which parameter.
parvalue
Parameter value.


2.148 MSK_putexitfunc

Description:

In the case MOSEK has a fatal error, then an exit function is called. The exit function should terminate MOSEK. In general it is not necessary to define an exit function.

Syntax:
MSKrescodee MSK_putexitfunc
       (MSKenv_t env,
        MSKexitfunc exitfunc,
        MSKCONST void * handle);
Arguments:
env
The MOSEK environment.
exitfunc
A user defined exit function.
handle
A pointer to user defined data structure which is passed to exitfunc when called.


2.149 MSK_putfilecompression

Description:

Sets the compression type for a file.

Syntax:
MSKrescodee MSK_putfilecompression
       (MSKfile_t file,
        MSKintt compression);
Arguments:
file
A handle to an open file.
compression


2.150 MSK_putfileiomode

Description:

Sets the io mode for a file.

Syntax:
MSKrescodee MSK_putfileiomode
       (MSKfile_t file,
        MSKintt iomode);
Arguments:
file
A handle to an open file.
iomode


2.151 MSK_putintparam

Description:

Sets the value of an integer parameter.

Syntax:
MSKrescodee MSK_putintparam
       (MSKtask_t task,
        MSKiparame param,
        MSKintt parvalue);
Arguments:
task
An optimization task.
param
Which parameter.
parvalue
Parameter value.


2.152 MSK_putkeepdlls

Description:

Controls whether explicit loaded DLLs should be kept even after they no longer are in use.

Syntax:
MSKrescodee MSK_putkeepdlls
       (MSKenv_t env,
        MSKintt keepdlls);
Arguments:
env
Size of the L2 cache.
keepdlls
Controls whether explicit loaded DLLs should be kept.


2.153 MSK_putlicensedefaults

Description:

Set defaults used by the license manager. This function should be called before MSK_initenv.

Syntax:
MSKrescodee MSK_putlicensedefaults
       (MSKenv_t env,
        MSKCONST MSKstring_t licensefile,
        MSKCONST MSKintt * licensebuf,
        MSKintt licwait,
        MSKintt licdebug);
Arguments:
env
The MOSEK environment.
licensefile
A NULL pointer or the path to a valid MOSEK license file.
licensebuf
This is the license string authorizing the use of MOSEK in the runtime version of MOSEK. Therefore, most frequently this string is a NULL pointer.
licwait
If this argument is nonzero, then MOSEK will wait for a license if no license is available. Moreover, licwait-1 is used as the default value for MSK_IPAR_LICENSE_PAUSE_TIME.
licdebug
If this argument is nonzero, then MOSEK will print debug info regarding the license checkout.


2.154 MSK_putmaxnumanz

Description:

MOSEK stores only the nonzero elements in $A$. Therefore, MOSEK cannot predict how much storage is required to store $A$. Using this function it is possible to specify the maximum nonzeros reserved for storing $A$.

It may be advantageous to reserve more nonzeros for $A$ than actually needed because it may improve the internal efficiency of MOSEK. However, it is never worthwhile to specify more than the double of the anticipated number of nonzeros in $A$.

Syntax:
MSKrescodee MSK_putmaxnumanz
       (MSKtask_t task,
        MSKlintt maxnumanz);
Arguments:
task
An optimization task.
maxnumanz
New size of the storage reserved for storing $A$.
See also:
MSK_IPAR_MAXNUMANZ_DOUBLE_TRH
MSK_IINF_STO_NUM_A_REALLOC


2.155 MSK_putmaxnumcon

Description:

The function changes the maximum number of constraints allowed in a task. Observe that maxnumcon must be larger than the current number of constraints in the task.

Syntax:
MSKrescodee MSK_putmaxnumcon
       (MSKtask_t task,
        MSKintt maxnumcon);
Arguments:
task
An optimization task.
maxnumcon
Maximum number of constraints allowed in the optimization task.


2.156 MSK_putmaxnumcone

Description:

The function changes the maximum number of conic constraints allowed in a task. Observe that maxnumcone must be larger than the number of cones in the task.

Syntax:
MSKrescodee MSK_putmaxnumcone
       (MSKtask_t task,
        MSKintt maxnumcone);
Arguments:
task
An optimization task.
maxnumcone
Maximum number of conic constraints allowed in the optimization task.


2.157 MSK_putmaxnumqnz

Description:

Specifies the maximum number of nonzeros allowed in all the $Q$ matrices (both objective and constraints).

Syntax:
MSKrescodee MSK_putmaxnumqnz
       (MSKtask_t task,
        MSKlintt maxnumqnz);
Arguments:
task
An optimization task.
maxnumqnz
Maximum number of nonzero elements allowed in quadratic coefficient matrixes.


2.158 MSK_putmaxnumvar

Description:

The function changes the maximum number of variables allowed in a task. Observe that maxnumvar must be larger than the number of variables in the task.

Syntax:
MSKrescodee MSK_putmaxnumvar
       (MSKtask_t task,
        MSKintt maxnumvar);
Arguments:
task
An optimization task.
maxnumvar
Maximum number of variables allowed in the optimization task.


2.159 MSK_putnadouparam

Description:

Sets the value of a named double parameter.

Syntax:
MSKrescodee MSK_putnadouparam
       (MSKtask_t task,
        MSKCONST MSKstring_t paramname,
        MSKrealt parvalue);
Arguments:
task
An optimization task.
paramname
Name of a MOSEK parameter.
parvalue
Parameter value.


2.160 MSK_putnaintparam

Description:

Sets the value of a named integer parameter.

Syntax:
MSKrescodee MSK_putnaintparam
       (MSKtask_t task,
        MSKCONST MSKstring_t paramname,
        MSKintt parvalue);
Arguments:
task
An optimization task.
paramname
Name of a MOSEK parameter.
parvalue
Parameter value.


2.161 MSK_putname

Description:

Assigns the name name to a problem item such as a constraint.

Syntax:
MSKrescodee MSK_putname
       (MSKtask_t task,
        MSKproblemiteme whichitem,
        MSKidxt i,
        MSKCONST MSKstring_t name);
Arguments:
task
An optimization task.
whichitem
Problem item which can take the values listed in Appendix [*].
i
Index.
name
New name to be assigned to the item.


2.162 MSK_putnastrparam

Description:

Sets the value of a named string parameter.

Syntax:
MSKrescodee MSK_putnastrparam
       (MSKtask_t task,
        MSKCONST MSKstring_t paramname,
        MSKCONST MSKstring_t parvalue);
Arguments:
task
An optimization task.
paramname
Name of a MOSEK parameter.
parvalue
Parameter value.


2.163 MSK_putnlfunc

Description:

This function is used to communicate the nonlinear function information to MOSEK.

Syntax:
MSKrescodee MSK_putnlfunc
       (MSKtask_t task,
        MSKCONST void * nlhandle,
        MSKnlgetspfunc nlgetsp,
        MSKnlgetvafunc nlgetva);
Arguments:
task
An optimization task.
nlhandle
A pointer to a user defined data structure. It is passed to the functions nlgetsp and nlgetva whenever those two functions called.
nlgetsp
A user defined function which provide information about the structure of the nonlinear functions in the optimization problem.
nlgetva
A user defined function which is used to evaluate the nonlinear function in the optimization problem at a given point.


2.164 MSK_putobjname

Description:

Assigns the name objname to the objective function.

Syntax:
MSKrescodee MSK_putobjname
       (MSKtask_t task,
        MSKCONST MSKstring_t objname);
Arguments:
task
An optimization task.
objname
Name of the objective.


2.165 MSK_putparam

Description:

Checks if parname is valid parameter name. If yes then, then parameter is set to value specified by parvalue.

Syntax:
MSKrescodee MSK_putparam
       (MSKtask_t task,
        MSKCONST MSKstring_t parname,
        MSKCONST MSKstring_t parvalue);
Arguments:
task
An optimization task.
parname
Parameter name.
parvalue
Parameter value.


2.166 MSK_putqcon

Description:

Replaces all the quadratic terms in the constraints with new ones.

Syntax:
MSKrescodee MSK_putqcon
       (MSKtask_t task,
        MSKlintt numqcnz,
        MSKCONST MSKidxt * qcsubk,
        MSKCONST MSKidxt * qcsubi,
        MSKCONST MSKidxt * qcsubj,
        MSKCONST MSKrealt * qcval);
Arguments:
task
An optimization task.
numqcnz
Number of quadratic terms. See ([*]).
qcsubk
$k$ subscripts for $q_{ij}^k$. See ([*]).
qcsubi
$i$ subscripts for $q_{ij}^k$. See ([*]).
qcsubj
$j$ subscripts for $q_{ij}^k$. See ([*]).
qcval
Numerical value for $q_{ij}^k$. See ([*]).


2.167 MSK_putqconk

Description:

Replaces all the quadratic entries in one constraint.

Syntax:
MSKrescodee MSK_putqconk
       (MSKtask_t task,
        MSKidxt k,
        MSKlintt numqcnz,
        MSKCONST MSKidxt * qcsubi,
        MSKCONST MSKintt * qcsubj,
        MSKCONST MSKrealt * qcval);
Arguments:
task
An optimization task.
k
The constraint in which new the $Q$ elements are inserted.
numqcnz
Number of quadratic terms. See ([*]).
qcsubi
$i$ subscripts for $q_{ij}^k$. See ([*]).
qcsubj
$j$ subscripts for $q_{ij}^k$. See ([*]).
qcval
Numerical value for $q_{ij}^k$. See ([*]).


2.168 MSK_putqobj

Description:

Replaces all the quadratic terms in the objective with new ones.

Syntax:
MSKrescodee MSK_putqobj
       (MSKtask_t task,
        MSKlintt numqonz,
        MSKCONST MSKidxt * qosubi,
        MSKCONST MSKidxt * qosubj,
        MSKCONST MSKrealt * qoval);
Arguments:
task
An optimization task.
numqonz
Number of nonzero elements in $Q^o$.
qosubi
$i$ subscript for $q_{ij}^o$. See ([*]).
qosubj
$j$ subscript for $q_{ij}^o$. See ([*]).
qoval
Numerical value for $q_{ij}^o$. See ([*]).


2.169 MSK_putqobjij

Description:

Replaces one of the coefficients in the quadratic term in the objective. I.e. the procedure performs the assignment

\begin{displaymath}
q_{\mathtt{i}\mathtt{j}}^o = \mathtt{qoij}.
\end{displaymath}

Syntax:
MSKrescodee MSK_putqobjij
       (MSKtask_t task,
        MSKidxt i,
        MSKidxt j,
        MSKrealt qoij);
Arguments:
task
An optimization task.
i
$i$ index for the coefficient to be replaced.
j
$j$ index for the coefficient to be replaced.
qoij
The new value for $q_{ij}^o$.


2.170 MSK_putsolution

Description:

Inserts a solution into the task.

Syntax:
MSKrescodee MSK_putsolution
       (MSKtask_t task,
        MSKsoltypee whichsol,
        MSKCONST MSKstakeye * skc,
        MSKCONST MSKstakeye * skx,
        MSKCONST MSKstakeye * skn,
        MSKCONST MSKrealt * xc,
        MSKCONST MSKrealt * xx,
        MSKCONST MSKrealt * y,
        MSKCONST MSKrealt * slc,
        MSKCONST MSKrealt * suc,
        MSKCONST MSKrealt * slx,
        MSKCONST MSKrealt * sux,
        MSKCONST MSKrealt * snx);
Arguments:
task
An optimization task.
whichsol
The solution index which can take the values listed in Appendix [*].
skc
Status keys for the constraints.
skx
Status keys for the variables.
skn
Status keys for the conic constraints.
xc
Primal constraint solution.
xx
Primal variable solution
y
Dual variables corresponding to the constraints.
slc
Dual variables corresponding to the lower bounds on the constraints.
suc
Dual variables corresponding to the upper bounds on the constraints.
slx
Dual variables corresponding to the lower bounds on the variables.
sux
Dual variables corresponding to the upper bounds on the variables.
snx
Dual variables corresponding to the conic constraints on the variables.


2.171 MSK_putsolutioni

Description:

Sets the primal and dual solution information for a single constraint or variable. If a sequence of function calls MSK_putsolutioni is used defined to a new solution, then normally the function MSK_makesolutionstatusunknown should be called before the first call of the function MSK_putsolutioni.

Syntax:
MSKrescodee MSK_putsolutioni
       (MSKtask_t task,
        MSKaccmodee iscon,
        MSKidxt i,
        MSKsoltypee whichsol,
        MSKstakeye sk,
        MSKrealt x,
        MSKrealt sl,
        MSKrealt su,
        MSKrealt sn);
Arguments:
task
An optimization task.
iscon
If nonzero, then the solution information for a constraint is modified. Otherwise for a variable.
i
Index of the constraint or variable.
whichsol
The solution index which can take the values listed in Appendix [*].
sk
Status key of the constraint of variable.
x
Solution value of the primal variable.
sl
Solution value of the dual variable associated with the lower bound.
su
Solution value of the dual variable associated with the upper bound.
sn
Solution value of the dual variable associated with the cone constraint.
See also:
MSK_makesolutionstatusunknown
Inserts a solution.


2.172 MSK_putsolutionyi

Description:

Input the dual variable of a solution.

Syntax:
MSKrescodee MSK_putsolutionyi
       (MSKtask_t task,
        MSKidxt i,
        MSKsoltypee whichsol,
        MSKrealt y);
Arguments:
task
An optimization task.
i
Index of the dual variable.
whichsol
The solution index which can take the values listed in Appendix [*].
y
Solution value of the dual variable.
See also:
MSK_makesolutionstatusunknown
Inserts a solution.
MSK_putsolutioni
Sets the primal and dual solution information for a single constraint or variable.


2.173 MSK_putstrparam

Description:

Sets the value of a string parameter.

Syntax:
MSKrescodee MSK_putstrparam
       (MSKtask_t task,
        MSKsparame param,
        MSKCONST MSKstring_t parvalue);
Arguments:
task
An optimization task.
param
Which parameter.
parvalue
Parameter value.


2.174 MSK_puttaskname

Description:

Assigns the name taskname to the task.

Syntax:
MSKrescodee MSK_puttaskname
       (MSKtask_t task,
        MSKCONST MSKstring_t taskname);
Arguments:
task
An optimization task.
taskname
Name assigned to the task.


2.175 MSK_putvartype

Description:

Sets the variable type of one variable.

Syntax:
MSKrescodee MSK_putvartype
       (MSKtask_t task,
        MSKidxt j,
        MSKvariabletypee vartype);
Arguments:
task
An optimization task.
j
Index of the variable.
vartype
The new variable type.


2.176 MSK_putvartypelist

Description:

Sets the variable type for one or more variables. I.e. variable subj[k] is assigned the variable type vartype[k].

Syntax:
MSKrescodee MSK_putvartypelist
       (MSKtask_t task,
        MSKintt num,
        MSKCONST MSKidxt * subj,
        MSKCONST MSKintt * vartype);
Arguments:
task
An optimization task.
num
Number of variables for which the variable type should be set.
subj
A list of variable indexes which should have their variable type changed.
vartype
A list of variable types that should be assigned to the variables specified by subj. See Section [*] for the possible values of vartype.


2.177 MSK_readdata

Description:

Reads problem data associated with the optimization task from a file.

The expected format of the data file is determined based on parameter MSK_IPAR_READ_DATA_FORMAT. If this parameter has the (default) value MSK_DATA_FORMAT_EXTENSION, then the extension of the file name is used to determine the file format. I.e. if file name has the extension .lp.gz then it is assumed to be a compressed LP formatted file is written.

Syntax:
MSKrescodee MSK_readdata
       (MSKtask_t task,
        MSKCONST MSKstring_t filename);
Arguments:
task
An optimization task.
filename
Data is read from the file filename if it is a nonempty string. Otherwise data is read from the file specified by MSK_SPAR_DATA_FILE_NAME.
See also:
MSK_writedata
Write problem data to a file.
MSK_IPAR_READ_DATA_FORMAT


2.178 MSK_readdatafile

Description:

Reads problem data from a file. A call to this procedure destroys whatever problem data is already defined in the task.

Syntax:
MSKrescodee MSK_readdatafile
       (MSKtask_t task,
        MSKfile_t file,
        MSKintt format);
Arguments:
task
An optimization task.
file
Data is read from the file file.
format
Data format of the file to be read.
See also:
MSK_writedatafile
Write problem data to a file.


2.179 MSK_readparamfile

Description:

Reads a parameter file.

Syntax:
MSKrescodee MSK_readparamfile (MSKtask_t task);
Arguments:
task
An optimization task.


2.180 MSK_readsolution

Description:

Reads a solution file and inserts the solution into the solution whichsol.

Syntax:
MSKrescodee MSK_readsolution
       (MSKtask_t task,
        MSKintt whichsol,
        MSKCONST MSKstring_t filename);
Arguments:
task
An optimization task.
whichsol
The solution index which can take the values listed in Appendix [*].
filename
A valid file name.


2.181 MSK_readsummary

Description:

Prints a short summary related to the last MPS file that was read.

Syntax:
MSKrescodee MSK_readsummary
       (MSKtask_t task,
        MSKintt whichstream);
Arguments:
task
An optimization task.
whichstream
Index of the stream.


2.182 MSK_relaxprimal

Description:

This function creates a problem that computes a minimal (weighted) relaxation of the bounds that will make an infeasible problem feasible.

Given an existing task describing the problem

\begin{displaymath}
\begin{array}{lccccl}
\mbox{minimize} & & & c^T x & & \\
...
...eq & u^c, \\
& l^x & \leq & x & \leq & u^x, \\
\end{array} \end{displaymath} (2.5)

then the function forms a new task having the form
\begin{displaymath}
\begin{array}{lccccl}
\mbox{minimize} & & & p & & \\
\mb...
...& 0, \\
& & & v_l^c,v_u^c,v_l^x,v_u^x \geq 0. &
\end{array} \end{displaymath} (2.6)

Hence, the function adds so-called elasticity variables to all the constraints which relaxes the constraints i.e. for instance $(v_l^c)_i$ and $(v_u^c)_i$ relaxes $(l^c)_i$ and $(u^c)_i$ respectively. It should be obvious that ([*]) is feasible. Moreover, the function adds the constraint

\begin{displaymath}
(w_l^c)^T v_l^c + (w_u^c)^T v_u^c
+ (w_l^x)^T v_l^x + (w_u^x)^T v_u^x - p \leq 0
\end{displaymath}

to the problem which makes the variable $p$ bigger than the total weighted sum of the relaxation to the bounds. $w_l^c$, $w_u^c$, $w_l^x$ and $w_u^x$ are user defined weights which normally should be nonnegative. If a weight is negative, then the corresponding elasticity variable is fixed to zero.

Hence, if the problem ([*]) is optimized, then the minimal change to the bounds in a weighted sense is computed that will make the problem feasible.

One can specify that a bound should be strictly enforced by assigning a negative value to the corresponding weight. i.e if $(w_l^c)_i < 0$ then $(v_l^c)_i$ is fixed to zero.

Now let $p^*$ be the optimal objective value to ([*]), then a natural thing to do is to solve the optimization problem

\begin{displaymath}
\begin{array}{lccccl}
\mbox{minimize} & & & c^T x & & \\
...
...p^*, \\
& & & v_l^c,v_u^c,v_l^x,v_u^x \geq 0, &
\end{array} \end{displaymath} (2.7)

where the original objective function is minimized subject to the constraint that the total weighted relaxation is minimal.

The parameter MSK_IPAR_FEASREPAIR_OPTIMIZE controls whether the function returns the problem ([*]) or the problem ([*]).The parameter can take one of the following values.

MSK_FEASREPAIR_OPTIMIZE_NONE.
The returned task contains problem ([*]) and is not optimized.

MSK_FEASREPAIR_OPTIMIZE_PENALTY.
The returned task contains problem ([*]) and is optimized.

MSK_FEASREPAIR_OPTIMIZE_COMBINED.
The returned task contains problem ([*]) and is not optimized.

Note that the $v$ variables are appended to the $x$ variables in the order

\begin{displaymath}
(v_u^c)_1,(v_l^c)_1,(v_u^c)_2,(v_l^c)_2,\ldots,(v_u^c)_m,(v...
...x)_1,(v_l^x)_1,(v_u^x)_2,(v_l^x)_2,\ldots,(v_u^x)_n,(v_l^x)_n
\end{displaymath}

in the returned task.

If NAME_CON (NAME_VAR) is the name of the $i$th constraint (variable) then the new variables are named as follows:

where ``*'' is a user defined separator string given by the parameter MSK_SPAR_FEASREPAIR_NAME_SEPARATOR.

The above discussion shows how the function works for an linear optimization problem. However, the function works in a similar way for quadratic and conic optimization problems but it cannot be used for general nonlinear optimization problems.

Note that if $u^c_i < l^c_i$ or $u^x_i < l^x_i$ then the feasibility repair problem becomes infeasible. Such trivial conflicts must therefor be removed manualy befor using MSK_relaxprimal.

Syntax:
MSKrescodee MSK_relaxprimal
       (MSKtask_t task,
        MSKtask_t * relaxedtask,
        MSKrealt * wlc,
        MSKrealt * wuc,
        MSKrealt * wlx,
        MSKrealt * wux);
Arguments:
task
An optimization task.
relaxedtask~
The returned task.
wlc~~
Weights associated with lower bounds on the activity of constraints. If negative the bound is strictly enforced i.e. if $(w_l^c)_i < 0$, then $(v_l^c)_i$ is fixed to zero. On return wlc[i] contains the relaxed bound.
wuc~~
Weights associated with upper bounds on the activity of constraints. If negative the bound is strictly enforced i.e. if $(w_u^c)_i < 0$, then $(v_u^c)_i$ is fixed to zero. On return wuc[i] contains the relaxed bound.
wlx~~
Weights associated with lower bounds on the activity of variables. If negative the bound is strictly enforced i.e. if $(w_l^x)_j < 0$ then $(v_l^x)_j$ is fixed to zero. On return wlx[i] contains the relaxed bound.
wux~~
Weights associated with lower bounds on the activity of variables. If negative the bound is strictly enforced i.e. if $(w_u^x)_j < 0$ then $(v_u^x)_j$ is fixed to zero. On return wux[i] contains the relaxed bound.
See also:
MSK_DPAR_FEASREPAIR_TOL
MSK_IPAR_FEASREPAIR_OPTIMIZE
MSK_RES_ERR_FEASREPAIR_INCONSISTENT_BOUND
A ranged constraint on a bound or variable has a lower bound that is larger than its upper bound.
MSK_SPAR_FEASREPAIR_NAME_SEPARATOR
MSK_SPAR_FEASREPAIR_NAME_PREFIX
MSK_getinfeasiblesubproblem
Obtains an infeasible sub problem.


2.183 MSK_remove

Description:

The function removes a number of constraints or variables from the optimization task. this implies that the existing constraints and variables are renumbered. For instance if constraint 5 is removed then constraint 6 becomes constraint 5 and so forward.

Syntax:
MSKrescodee MSK_remove
       (MSKtask_t task,
        MSKaccmodee iscon,
        MSKintt num,
        MSKCONST MSKintt * sub);
Arguments:
task
An optimization task.
iscon
Defines whether constraints or variables are removed.
num
Number of constraints or variables which should be removed.
sub
Indexes of constraints or variables which should be removed.
See also:
MSK_append
Appends a number of variables or constraints to the optimization task.


2.184 MSK_removecone

Description:

Remove a conic constraint from the problem. Observe this implies that all the conic constraints appearing after the removed cone is renumbered. I.e. their index is decreased by one.

In general it is much more efficient to remove a cone with a high index than a low index.

Syntax:
MSKrescodee MSK_removecone
       (MSKtask_t task,
        MSKidxt k);
Arguments:
task
An optimization task.
k
Index of the conic constraint that should be removed.


2.185 MSK_replacefileext

Description:

Replaces the file extension in a file name by a new one.

Syntax:
void MSK_replacefileext
       (MSKstring_t filename,
        MSKCONST MSKstring_t newextension);
Arguments:
filename~~
The filename.
newextension
The new extension.


2.186 MSK_resizetask

Description:

Resize the maximum dimension for a MOSEK task. Note the procedure is destructive meaning the data stored in the task is destroyed.

Syntax:
MSKrescodee MSK_resizetask
       (MSKtask_t task,
        MSKintt maxnumcon,
        MSKintt maxnumvar,
        MSKintt maxnumcone,
        MSKlintt maxnumanz,
        MSKlintt maxnumqnz);
Arguments:
task
task that should be resized.
maxnumcon
New maximum number of constraints.
maxnumvar
New maximum number of variables.
maxnumcone
New maximum number of cones.
maxnumanz
New maximum number non-zeros in $A$.
maxnumqnz
New maximum number non-zeros in all $Q$ matrices.


2.187 MSK_sensitivityreport

Description:

Read a sensitivity format file from location given by MSK_SPAR_SENSITIVITY_FILE_NAME and write the result to the stream whichstream. If MSK_SPAR_SENSITIVITY_RES_FILE_NAME is set to a non empty string, then the sensitivity report is also written to a file of this name.

Syntax:
MSKrescodee MSK_sensitivityreport
       (MSKtask_t task,
        MSKstreamtypee whichstream);
Arguments:
task
An optimization task.
whichstream
Index of the stream.
See also:
MSK_dualsensitivity
Perform sensitivity analysis on objective coefficients.
MSK_primalsensitivity
Perform sensitivity analysis on bounds.
MSK_IPAR_LOG_SENSITIVITY
MSK_IPAR_LOG_SENSITIVITY_OPT
MSK_IPAR_SENSITIVITY_TYPE


2.188 MSK_setdefaults

Description:

Resets all the parameters to their default values.

Syntax:
MSKrescodee MSK_setdefaults (MSKtask_t task);
Arguments:
task
An optimization task.


2.189 MSK_sktostr

Description:

Obtains a explanatory string corresponding to a status key.

Syntax:
MSKrescodee MSK_sktostr
       (MSKtask_t task,
        MSKintt sk,
        MSKstring_t str);
Arguments:
task
An optimization task.
sk
A valid status key.
str~
String corresponding to the status key sk.


2.190 MSK_solstatostr

Description:

Obtains a explanatory string corresponding to a solution status.

Syntax:
MSKrescodee MSK_solstatostr
       (MSKtask_t task,
        MSKsolstae solsta,
        MSKstring_t str);
Arguments:
task
An optimization task.
solsta
Solution status.
str~
String corresponding to the solution status solsta.


2.191 MSK_solutiondef

Description:

Checks whether a solution defined.

Syntax:
MSKrescodee MSK_solutiondef
       (MSKtask_t task,
        MSKintt whichsol,
        MSKintt * isdef);
Arguments:
task
An optimization task.
whichsol
The solution index which can take the values listed in Appendix [*].
isdef~
Is nonzero if the requested solution is defined.


2.192 MSK_solutionsummary

Description:

Prints a short summary related to the current solution.

Syntax:
MSKrescodee MSK_solutionsummary
       (MSKtask_t task,
        MSKstreamtypee whichstream);
Arguments:
task
An optimization task.
whichstream
Index of the stream.


2.193 MSK_solvewithbasis

Description:

If a basic solution is available, then exactly $\mathtt{numcon}$ basis variables are defined. Those $\mathtt{numcon}$ basis variables are denoted the basis. Associated with the basis is a basis matrix denoted $B$. This function solves either the linear equation system

\begin{displaymath}
B \bar x = b
\end{displaymath} (2.8)

or the system
\begin{displaymath}
B^T \bar x = b
\end{displaymath} (2.9)

for the unknowns $\bar x$. $b$ is user defined vector.

In order to make sense of the solution $\bar x$ it is important to know the ordering of the variables in the basis because the ordering specifies how $B$ is constructed. When calling MSK_initbasissolve a ordering of the basis variables is obtained. This ordering can be used to deduce how MOSEK has constructed $B$. Indeed if the $k$th basis variable is variable $x_j$ then this implies

\begin{displaymath}
B_{i,k} = A_{i,j}, i= 0,\ldots,\mathtt{numcon}-1.
\end{displaymath}

Otherwise if the $k$th basis variable is variable $x_j^c$ then this implies

\begin{displaymath}
B_{i,k} = \left \{ \begin{array}{ll}
-1, & i = j, \\
0 , & i \not = j. \\
\end{array} \right .
\end{displaymath}

Given the knowledge of how $B$ is constructed it is possible to interprete the solution $\bar x$ correctly.

Observe this function exploits the sparsity in the vector $b$ to speed up the computations.

Syntax:
MSKrescodee MSK_solvewithbasis
       (MSKtask_t task,
        MSKintt transp,
        MSKintt * numnz,
        MSKidxt * sub,
        MSKrealt * val);
Arguments:
task
An optimization task.
transp
If this argument is nonzero, then ([*]) is solved. Otherwise the system ([*]) is solved.
numnz~~
As input it is the number of nonzeros in $b$. As output it is the number of nonzeros in $\bar x$.
sub~~
As input it contains the position of the nonzeros in $b$ i.e.

\begin{displaymath}
b[\mathtt{sub}[k]] \not = 0, k= 0,\ldots,\mathtt{numnz[ 0]}-1.
\end{displaymath}

As output it contains the position of the nonzeros in $\bar x$. It is important sub has room for numcon elements.
val~~
As input it is the vector $b$. Although the positions of the nonzero elements are specified in sub, then it is required that $\mathtt{val}[i] = 0$ if $b[i] = 0$. As output val is the vector $\bar x$.

OBSERVE val is dense vector and NOT a packed sparse vector. This implies val has room for numcon elements.

See also:
MSK_initbasissolve
This function must be called immediately before the first usage of the function MSK_solvewithbasis.


2.194 MSK_startstat

Description:

Starts the statistics file.

Syntax:
MSKrescodee MSK_startstat (MSKtask_t task);
Arguments:
task
An optimization task.


2.195 MSK_stopstat

Description:

Stops the statistics file.

Syntax:
MSKrescodee MSK_stopstat (MSKtask_t task);
Arguments:
task
An optimization task.


2.196 MSK_strdupdbgenv

Description:

Make a copy of a string. The string created by this procedure must be freed by MSK_freeenv.

Syntax:
MSKCONST MSKrescodee MSK_strdupdbgenv
       (MSKenv_t env,
        MSKCONST MSKstring_t str,
        MSKCONST MSKstring_t file,
        unsigned line);
Arguments:
env
The MOSEK environment.
str
String that should be copied.
file
File from which the function is called.
line
Line in the file from which the function is called.


2.197 MSK_strdupdbgtask

Description:

Make a copy of a string. The string created by this procedure must be freed by MSK_freetask.

Syntax:
MSKCONST MSKrescodee MSK_strdupdbgtask
       (MSKtask_t task,
        MSKCONST MSKstring_t str,
        MSKCONST MSKstring_t file,
        unsigned line);
Arguments:
task
An optimization task.
str
String that should be copied.
file
File from which the function is called.
line
Line in the file from which the function is called.


2.198 MSK_strdupenv

Description:

Make a copy of a string. The string created by this procedure must be freed by MSK_freeenv.

Syntax:
MSKCONST MSKrescodee MSK_strdupenv
       (MSKenv_t env,
        MSKCONST MSKstring_t str);
Arguments:
env
The MOSEK environment.
str
String that should be copied.


2.199 MSK_strduptask

Description:

Make a copy of a string. The string created by this procedure must be freed by MSK_freetask.

Syntax:
MSKCONST MSKrescodee MSK_strduptask
       (MSKtask_t task,
        MSKCONST MSKstring_t str);
Arguments:
task
An optimization task.
str
String that should be copied.


2.200 MSK_strtoconetype

Description:

Obtains cone type code corresponding to a cone type string.

Syntax:
MSKrescodee MSK_strtoconetype
       (MSKtask_t task,
        MSKCONST MSKstring_t str,
        MSKintt * conetype);
Arguments:
task
An optimization task.
str
String corresponding to the cone type code codetype.
conetype~
The cone type corresponding to the string str.


2.201 MSK_strtosk

Description:

Obtains the status key corresponding to a explanatory string.

Syntax:
MSKrescodee MSK_strtosk
       (MSKtask_t task,
        MSKCONST MSKstring_t str,
        MSKintt * sk);
Arguments:
task
An optimization task.
str
Status key string.
sk~
Status key corresponding to the string.


2.202 MSK_symnamtovalue

Description:

Obtains the value corresponding to a symbolic name defined by MOSEK.

Syntax:
MSKrescodee MSK_symnamtovalue
       (MSKCONST MSKstring_t name,
        MSKstring_t value);
Arguments:
name
Symbolic name.
value~
The corresponding value.


2.203 MSK_undefsolution

Description:

Undefines a solution.

Syntax:
MSKrescodee MSK_undefsolution
       (MSKtask_t task,
        MSKintt whichsol);
Arguments:
task
An optimization task.
whichsol
The solution index which can take the values listed in Appendix [*].


2.204 MSK_unlinkfuncfromenvstream

Description:

Disconnects a user defined function to a stream.

Syntax:
MSKrescodee MSK_unlinkfuncfromenvstream
       (MSKenv_t env,
        MSKstreamtypee whichstream);
Arguments:
env
The MOSEK environment.
whichstream
Index of the stream.


2.205 MSK_unlinkfuncfromtaskstream

Description:

Disconnects a user defined function to a task stream.

Syntax:
MSKrescodee MSK_unlinkfuncfromtaskstream
       (MSKtask_t task,
        MSKstreamtypee whichstream);
Arguments:
task
An optimization task.
whichstream
Index of the stream.


2.206 MSK_whichparam

Description:

Checks if parname is valid parameter name. If yes then, partype and param denotes the type and the index of parameter respectively.

Syntax:
MSKrescodee MSK_whichparam
       (MSKtask_t task,
        MSKCONST MSKstring_t parname,
        MSKintt * partype,
        MSKparametertypee * param);
Arguments:
task
An optimization task.
parname
Parameter name.
partype~
Parameter type.
param~
Which parameter.


2.207 MSK_writedata

Description:

Write problem data associated with the optimization task to a file in one of three formats i.e. the LP, the MPS, or the MBT format.

The type of the data file written is determined either based on parameter MSK_IPAR_WRITE_DATA_FORMAT. If the parameter MSK_IPAR_WRITE_DATA_FORMAT has the (default) value MSK_DATA_FORMAT_EXTENSION, then the extension of the file name is used to determine the file format. I.e. if file name has the extension .lp.gz then a compressed LP formatted file is written.

Note in the case no names has been inputted into the task an anonymous names are required in the data file, then the option MSK_IPAR_WRITE_GENERIC_NAMES should be turned on.

Syntax:
MSKrescodee MSK_writedata
       (MSKtask_t task,
        MSKCONST MSKstring_t filename);
Arguments:
task
An optimization task.
filename
Data is written to the file filename if it is a nonempty string. Otherwise data is written from the file specified by MSK_SPAR_DATA_FILE_NAME.
See also:
MSK_readdata
Reads problem data from a file.
MSK_IPAR_WRITE_DATA_FORMAT


2.208 MSK_writedatafile

Description:

Write problem data associated with the optimization task to a file in one of three formats i.e. the LP, the MPS, or the MBT format.

Note in the case no names has been inputted into the task an anonymous names are required in the data file, then the option MSK_IPAR_WRITE_GENERIC_NAMES should be turned on.

Syntax:
MSKrescodee MSK_writedatafile
       (MSKtask_t task,
        MSKfile_t file,
        MSKintt format);
Arguments:
task
An optimization task.
file
Data is written to the file file.
format
Data format of the file to be written.
See also:
MSK_IPAR_WRITE_DATA_FORMAT


2.209 MSK_writeparamfile

Description:

Writes all the parameters to a parameter file.

Syntax:
MSKrescodee MSK_writeparamfile
       (MSKtask_t task,
        MSKCONST MSKstring_t filename);
Arguments:
task
An optimization task.
filename
is the name of parameter file.


2.210 MSK_writesolution

Description:

Saves the current basic, interior-point, or integer solution to a file.

Syntax:
MSKrescodee MSK_writesolution
       (MSKtask_t task,
        MSKintt whichsol,
        MSKCONST MSKstring_t filename);
Arguments:
task
An optimization task.
whichsol
The solution index which can take the values listed in Appendix [*].
filename
A valid file name.