8.9 Algorithm Parameters

In this section we list some algorithm control parameters that can be modified without editing the source code. These control parameters are accessible via the dictionary solvers.options. By default the dictionary is empty and the default values of the parameters are used.

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-7).
'feastol'
tolerance for feasibility conditions (default: 1e-7).
'refinement'
True or False. If True, one step of iterative refinement is applied after solving KKT equations in conelp(), lp(), and sdp() (default: True).
For example the command
>>> from cvxopt import solvers
>>> solvers.options['show_progress'] = False
turns off the screen output during calls to the solvers. The tolerances abstol, reltol and feastol have the following meaning. conelp() terminates with status 'optimal', if

\begin{displaymath}
s_\mathrm{l} \succeq 0, \qquad S_\mathrm{s} \succeq 0,
\qqu...
...t _2}{\max\{1,\Vert b\Vert _2\}} \leq \epsilon_\mathrm{feas},
\end{displaymath}


\begin{displaymath}
z_\mathrm{l} \succeq 0, \qquad Z_\mathrm{s} \succeq 0, \qqua...
... _2}{\max\{1,\Vert c\Vert _2\}}
\leq \epsilon_\mathrm{feas},
\end{displaymath}

and

\begin{displaymath}
s_\mathrm{l}^T z_\mathrm{l} + \mathop{\bf tr}(S_\mathrm{s}Z...
...} Z_\mathrm{s}) + b^T y\}} \leq \epsilon_\mathrm{rel}
\right).
\end{displaymath}

It returns with status 'primal infeasible' if

\begin{displaymath}
z_\mathrm{l} \succeq 0, \qquad
Z_\mathrm{s} \succeq 0, \qqua...
...{l} + \mathop{\bf tr}(H_\mathrm{s} Z_\mathrm{s})
+b^Ty = -1.
\end{displaymath}

It returns with status 'dual infeasible' if

\begin{displaymath}
s_\mathrm{l} \succeq 0, \qquad
S_\mathrm{s} \succeq 0, \qqua...
...Vert Ax\Vert _2 \leq \epsilon_\mathrm{feas}, \qquad
c^Tx = -1.
\end{displaymath}

The functions lp() and sdp() call conelp() and hence use the same stopping criteria.

nlcp() returns with status 'optimal' if

\begin{displaymath}
\frac{\Vert \nabla f_0(x) + D\tilde f(x)^Tz_\mathrm{nl} +
...
...+ {\bf 1}-h, Ax_0-b) \Vert _2 \}} \leq \epsilon_\mathrm{feas}
\end{displaymath}

where x0 is the point returned by F(), and

\begin{displaymath}
\mathrm{gap} \leq \epsilon_\mathrm{abs}
\qquad \mbox{or} \qq...
...ac{\mathrm{gap}}
{L(x,y,z)} \leq \epsilon_\mathrm{rel} \right)
\end{displaymath}

where

\begin{displaymath}
\mathrm{gap} =
\left[\begin{array}{c} s_\mathrm{nl} \\ s_\...
...athrm{nl}^T \tilde f(x) +
z_\mathrm{l}^T (Gx-h) + y^T(Ax-b).
\end{displaymath}

The functions qp(), gp() and cp() call nlcp() and hence use the same stopping criteria (with x0=0 for qp() and gp()).

The control parameters listed in the GLPK documentation are set to their default values and can also be customized by making an entry in solvers.options. The keys in the dictionary are strings with the name of the GLPK parameter. The command

>>> from cvxopt import solvers 
>>> solvers.options['LPX_K_MSGLEV'] = 0
turns off the screen output subsequent calls lp() with the 'glpk' option.

The MOSEK control parameters are set to their default values. The corresponding keys in solvers.options are strings with the name of the MOSEK parameter. For example the command

>>> from cvxopt import solvers 
>>> solvers.options['MSK_IPAR_LOG'] = 0
turns off the screen output during calls of lp() and qp() with the 'mosek' option.

The following control parameters affect 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).