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")
The optimization problem.
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
Like a Linear Program it has a linear objective with one coefficient in
c for each variable, some optional constant
c0, and the improving
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 list-typed matrix
cones (add constraints copyx=x if some variable x appears in multiple
cones). All variables have lower and upper bounds as columns in
and will be integer if they appear in the
As an advanced feature, non-linear unary operators involving exponential or
logarithmic functions can be added with
scopt. Parameters can also be
specified for the MOSEK call.
iparam is integer-typed parameters,
dparam ia double-typed parameters and
sparam is string-typed
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
The optimization process can be terminated at any moment using CTRL + C.
|.$sense||Objective sense, e.g. "max" or "min"|
|.$bc||Lower and upper constraint bounds|
|.$bx||Lower and upper variable bounds|
|.$qobj||Quadratic objective terms|
|.$intsub||Integer variable indexes|
|.$scopt||Separable convex optimization|
|..$<MSK_PARAM>||Value of any <MSK_PARAM>|
|.$sol||Initial solution list|
|..$itr/$bas/$int||Initial solution description|
|.$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|
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
itr, the basic (corner point) solution
bas, and the integer solution
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
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
soldetail larger than 1 extracts
pobjbound. Larger than 2 extracts
|.$response||Response from the MOSEK Optimization Library|
|..$code||ID-code of response|
|.$sol||All solutions identified|
|...$skc||Linear constraint status keys|
|...$skx||Variable bound status keys|
|...$skn||Conic constraint status keys|
|...$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|
|.$iinfo/$dinfo||MOSEK information list|
|..$<MSK_INFO>||Value of any <MSK_INFO>|
1 2 3 4 5 6 7 8 9 10 11