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

Module ipopt_options

source code

Sets options for IPOPT.

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

ipopt_options(overrides=None, ppopt=None)

source code 

Sets options for IPOPT.

Sets the values for the options.ipopt dict normally passed to IPOPT.

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['constr_viol_tol']
    • VERBOSE used to opt['print_level']
    • IPOPT_OPT user option file, if ppopt['IPOPT_OPT'] is non-zero it is appended to 'ipopt_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 an options.ipopt dict to pass to IPOPT.

Example: If ppopt['IPOPT_OPT'] = 3, then after setting the default IPOPT options, ipopt_options will execute the following user-defined function to allow option overrides:

   opt = ipopt_user_options_3(opt, ppopt);

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

   def ipopt_user_options_3(opt, ppopt):
       opt = {}
       opt['nlp_scaling_method'] = 'none'
       opt['max_iter']           = 500
       opt['derivative_test']    = 'first-order'
       return opt

See the options reference section in the IPOPT documentation for details on the available options.

http://www.coin-or.org/Ipopt/documentation/

See Also: pyipopt, ppoption

Authors:
Ray Zimmerman (PSERC Cornell), Richard Lincoln