Package pypower :: Module mosek_options
[hide private]
[frames] | no frames]

Module mosek_options

source code

Sets options for MOSEK.

Functions [hide private]
 
mosek_options(overrides=None, ppopt=None)
Sets options for MOSEK.
source code
Variables [hide private]
  __package__ = 'pypower'
Function Details [hide private]

mosek_options(overrides=None, ppopt=None)

source code 

Sets options for MOSEK.

Inputs are all optional, second argument must be either a string (fname) or a dict (ppopt):

  • overrides
    • dict containing values to override the defaults
    • fname name of user-supplied function called after default options are set to modify them. Calling syntax is:
         modified_opt = fname(default_opt)
      
  • ppopt PYPOWER options vector, uses the following entries:
    • OPF_VIOLATION used to set opt.MSK_DPAR_INTPNT_TOL_PFEAS
    • VERBOSE not currently used here
    • MOSEK_MAX_IT used to set opt.MSK_IPAR_INTPNT_MAX_ITERATIONS
    • MOSEK_GAP_TOL used to set opt.MSK_DPAR_INTPNT_TOL_REL_GAP
    • MOSEK_MAX_TIME used to set opt.MSK_DPAR_OPTIMIZER_MAX_TIME
    • MOSEK_NUM_THREADS used to set opt.MSK_IPAR_INTPNT_NUM_THREADS
    • MOSEK_OPT user option file, if ppopt['MOSEK_OPT'] is non-zero non-zero it is apped to 'mosek_user_options_' to form the name of a user-supplied function used as fname described above, except with calling syntax:
         modified_opt = fname(default_opt, ppopt)
      

Output is a param dict to pass to MOSEKOPT.

Example:

If PPOPT['MOSEK_OPT'] = 3, then after setting the default MOSEK options, mosek_options will execute the following user-defined function to allow option overrides:

   opt = mosek_user_options_3(opt, ppopt)

The contents of mosek_user_options_3.py, could be something like:

   def mosek_user_options_3(opt, ppopt):
       opt = {}
       opt.MSK_DPAR_INTPNT_TOL_DFEAS   = 1e-9
       opt.MSK_IPAR_SIM_MAX_ITERATIONS = 5000000
       return opt

See the Parameters reference in Appix E of "The MOSEK optimization toolbox for MATLAB manaul" for details on the available options.

http://www.mosek.com/documentation/

See Also: mosekopt, ppoption.

Authors:
Ray Zimmerman (PSERC Cornell), Richard Lincoln