8.9 Algorithm Parameters
One can change the parameters in the default solvers by adding entries with the following key values.
- 'show_progress'
- True or False; turns the output to the screen on or off (default: True).
- 'maxiters'
- maximum number of iterations (default: 100).
- 'abstol'
- absolute accuracy (default: 1e-7).
- 'reltol'
- relative accuracy (default: 1e-6).
- 'feastol'
- tolerance for feasibility conditions (default: 1e-7).
- 'refinement'
- number of iterative refinement steps when solving KKT equations (default: 0 if the problem has no second-order cone or matrix inequality constraints; 1 otherwise).
>>> from cvxopt import solversturns off the screen output during calls to the solvers.
>>> solvers.options['show_progress'] = False
The tolerances abstol, reltol and feastol have the
following meaning. conelp() terminates with
status 'optimal' if
and
It returns with status 'primal infeasible' if
It returns with status 'dual infeasible' if
The functions lp(), socp() and sdp() call conelp() and hence use the same stopping criteria.
The function coneqp() terminates with
status 'optimal' if
and
where
The function qp() calls coneqp() and hence uses the same stopping criteria.
The control parameters listed in the GLPK documentation are set to their default values and can be customized by making an entry in solvers.options. The keys in the dictionary are strings with the name of the GLPK parameter. For example, the command
>>> from cvxopt import solversturns off the screen output subsequent calls lp() with the 'glpk' option.
>>> solvers.options['LPX_K_MSGLEV'] = 0
The MOSEK interior-point algorithm parameters are set to their default values. They can be modified by adding an entry solvers.options['MOSEK']. This entry is a dictionary with MOSEK parameter/value pairs, with the parameter names imported from pymosek. For details see Section 14.1.3 of the MOSEK Python API Manual.
For example the commands
>>> from cvxopt import solversturn off the screen output during calls of lp() or socp() with the 'mosek' option.
>>> import pymosek
>>> solvers.options['MOSEK'] = {pymosek.iparam.log: 0}
The following control parameters in solvers.options affect the execution of the DSDP algorithm:
- 'DSDP_Monitor'
- the interval (in number of iterations) at which output is printed to the screen (default: 0).
- 'DSDP_MaxIts'
- maximum number of iterations.
- 'DSDP_GapTolerance'
- relative accuracy (default: 1e-5).