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-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).

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

s ≽ 0,   z ≽ 0,       ∥Gx-+-s--h∥2 ≤ ε  ,    -∥Ax---b∥2- ≤ ε  ,    ∥GT-z +-ATy-+-c∥2≤ ε  ,
                      max {1,∥h∥2}    feas     max {1,∥b∥2}   feas       max {1,∥c∥2}      feas

and

                  (                                                      )
sTz ≤ ε     or     min {cTx,hTz + bT y} < 0 and  ---------sT-z-------- ≤ ε   .
      abs                                       - min{cTx,hT z + bTy}  rel

It returns with status ’primal infeasible’ if

              ∥GTz-+-ATy∥2-           T    T
z ≽ 0,        max {1,∥c∥2}  ≤ εfeas,    h z + b y = - 1.

It returns with status ’dual infeasible’ if

s ≽ 0,       -∥Gx-+-s∥2--≤ εfeas,    ---∥Ax∥2--- ≤ εfeas,    cTx = - 1.
             max {1,∥h∥2}           max {1,∥b∥2}

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

The function coneqp() terminates with status ’optimal’ if

                                                                          T     T
s ≽ 0,   z ≽ 0,       ∥Gx-+-s--h∥2 ≤ εfeas,    -∥Ax---b∥2- ≤ εfeas,    ∥Px-+-G-z-+-A-y-+-q∥2≤ εfeas,
                      max {1,∥h∥2}           max {1,∥b∥2}                max{1,∥q∥2}

and

                  (                               T             )           (                     T         )
sTz ≤ εabs  or      1xTP x+ qTx < 0,  and   ------s-z--------≤ εrel     or     L(x,y,z) > 0 and  --s--z--≤ εrel
                    2                      - (1∕2)xTPx - qTx                                   L(x,y,z)

where

L(x,y,z) = 1xTP x+ qTx + zT(Gx - h)+ yT(Ax - b).
          2

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 solvers  
>>> solvers.options[’LPX_K_MSGLEV’] = 0

turns off the screen output subsequent calls lp() with the ’glpk’ option.

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 solvers  
>>> import pymosek  
>>> solvers.options[’MOSEK’] = {pymosek.iparam.log: 0}

turn off the screen output during calls of lp() or socp() with the ’mosek’ option.

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).