Description Usage Arguments Details Value See Also Examples
Solve an optimization problem using the MOSEK Optimization Library.
Please see the 'userguide.pdf' for a detailed introduction to this package.
This file is located in the "doc" directory at the root of this package:
system.file("doc", "userguide.pdf", package="Rmosek")
1 
problem 
The optimization problem.
 
opts 
The interface options.

The optimization problem should be described in a named list of definitions.
The number of variables in the problem is determined from the number of
columns in the constraint matrix A
.
Like a Linear Program it has a linear objective with one coefficient in
c
for each variable, some optional constant c0
, and the improving
direction sense
. Quadratic terms can be added to the objective with
qobj
. The constraints can either be linear, specified as rows in
A
with lower and upper bounds as columns in bc
(you can use
Inf
if needed), or conic as specified in the listtyped matrix
cones
(add constraints copyx=x if some variable x appears in multiple
cones). All variables have lower and upper bounds as columns in bx
,
and will be integer if they appear in the intsub
list.
As an advanced feature, nonlinear unary operators involving exponential or
logarithmic functions can be added with scopt
. Parameters can also be
specified for the MOSEK call. iparam
is integertyped parameters,
dparam
ia doubletyped parameters and sparam
is stringtyped
parameters. These parameters can be ignored by setting the option
useparam
to FALSE (the default is TRUE).
Initial solutions are specified in sol
and should have the same format
as the solution returned by the function call. This solution can be ignored by
setting the option usesol
to FALSE (the default is TRUE).
The amount of information printed by the interface can be limited by
verbose
(default=10). The generated model can be exported to any
standard modeling fileformat (e.g. lp, opf, lp or mbt), with (resp. without)
the identified solution using writeafter
(resp. writebefore
).
The optimization process can be terminated at any moment using CTRL + C.
problem  Problem description 
.$sense  Objective sense, e.g. "max" or "min" 
.$c  Objective coefficients 
.$c0  Objective constant 
.$A  Constraint matrix 
.$bc  Lower and upper constraint bounds 
.$bx  Lower and upper variable bounds 
.$qobj  Quadratic objective terms 
.$cones  Conic constraints 
.$intsub  Integer variable indexes 
.$scopt  Separable convex optimization 
.$iparam/$dparam/$sparam  Parameter list 
..$<MSK_PARAM>  Value of any <MSK_PARAM> 
.$sol  Initial solution list 
..$itr/$bas/$int  Initial solution description 
opts  Options 
.$verbose  Output logging verbosity 
.$usesol  Whether to use the initial solution 
.$useparam  Whether to use the specified parameter settings 
.$soldetail  Level of detail used to describe solutions. 
.$getinfo  Whether to extract MOSEK information items 
.$writebefore  Filepath used to export model 
.$writeafter  Filepath used to export model and solution 
r 
The returned results.

The result is a named list containing the response of the MOSEK optimization library. A response code of zero is the signal of success.
Depending on the specified solver, one or more solutions may be returned. The
interiorpoint solution itr
, the basic (corner point) solution
bas
, and the integer solution int
.
The problem status prosta
in all solutions shows the feasibility of your
problem description. All solutions are described by a solution status
solsta
(e.g. optimal) along with the variable and constraint activities.
All activities will further have a bound key that specify their value in
relation to the declared bounds.
Dual variables are returned for all defined bounds wherever possible. Integer
solutions int
does not have any dual variables as such definitions
would not make sense. Basic (corner point) solutions bas
would never be
returned if the problem had conic constraints, and does not define snx
.
Setting option soldetail
larger than 1 extracts pobjval
,
pobjval
and pobjbound
. Larger than 2 extracts maxinfeas
.
Setting option getinfo
to TRUE
extracts iinfo
and
dinfo
.
r  Result 
.$response  Response from the MOSEK Optimization Library 
..$code  IDcode of response 
..$msg  Humanreadable message 
.$sol  All solutions identified 
..$itr/$bas/$int  Solution description 
...$solsta  Solution status 
...$prosta  Problem status 
...$skc  Linear constraint status keys 
...$skx  Variable bound status keys 
...$skn  Conic constraint status keys 
...$xc  Constraint activities 
...$xx  Variable activities 
...$slc  Dual variable for constraint lower bounds 
...$suc  Dual variable for constraint upper bounds 
...$slx  Dual variable for variable lower bounds 
...$sux  Dual variable for variable lower bounds 
...$snx  Dual variable of conic constraints 
...$pobjval  Primal objective value 
...$dobjval  Dual objective value 
...$pobjbound  Best primal objective bound from relaxations 
...$maxinfeas  Maximal solution infeasibilities 
....$pbound  Primal inequality constraints 
....$peq  Primal equality constraints 
....$pcone  Primal cone constraints 
....$dbound  Dual inequality constraints 
....$deq  Dual equality constraints 
....$dcone  Dual cone constraints 
....$int  Integer variables 
.$iinfo/$dinfo  MOSEK information list 
..$<MSK_INFO>  Value of any <MSK_INFO> 
1 2 3 4 5 6 7 8 9 10 11 
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs in the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.