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

Module cplex_options

source code

Sets options for CPLEX.

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

cplex_options(overrides=None, ppopt=None)

source code 

Sets options for CPLEX.

Sets the values for the options dict normally passed to cplexoptimset.

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

Output is an options dict to pass to cplexoptimset.

Example:

If ppopt['CPLEX_OPT'] = 3, then after setting the default CPLEX options, CPLEX_OPTIONS will execute the following user-defined function to allow option overrides:

   opt = cplex_user_options_3(opt, ppopt)

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

   def cplex_user_options_3(opt, ppopt):
       opt = {}
       opt['threads']          = 2
       opt['simplex']['refactor'] = 1
       opt['timelimit']        = 10000
       return opt

For details on the available options, see the "Parameters Reference Manual" section of the CPLEX documentation at: http://publib.boulder.ibm.com/infocenter/cosinfoc/v12r2/

Parameters:
  • 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.simplex.tolerances.feasibility
    • VERBOSE - used to set opt.barrier.display, opt.conflict.display, opt.mip.display, opt.sifting.display, opt.simplex.display, opt.tune.display
    • CPLEX_LPMETHOD - used to set opt.lpmethod
    • CPLEX_QPMETHOD - used to set opt.qpmethod
    • CPLEX_OPT - user option file, if ppopt['CPLEX_OPT'] is non-zero non-zero it is appended to 'cplex_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)
      

See Also: cplexlp, cplexqp, ppoption.

Authors:
Ray Zimmerman (PSERC Cornell), Richard Lincoln