ipopt_options
- ipopt_options(overrides, mpopt)
ipopt_options()
- Sets options for IPOPT.OPT = IPOPT_OPTIONS OPT = IPOPT_OPTIONS(OVERRIDES) OPT = IPOPT_OPTIONS(OVERRIDES, FNAME) OPT = IPOPT_OPTIONS(OVERRIDES, MPOPT) Sets the values for the options.ipopt struct normally passed to IPOPT. Please note that if there is a file named 'ipopt.opt' in your current working directory, it will override any options passed to the IPOPT MEX file, including any options returned by this function. Inputs are all optional, second argument must be either a string (FNAME) or a struct (MPOPT): OVERRIDES - struct 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); MPOPT - MATPOWER options struct, uses the following fields: opf.violation - used to set opt.constr_viol_tol verbose - used to opt.print_level ipopt.opts - struct containing values to use as OVERRIDES ipopt.opt_fname - name of user-supplied function used as FNAME, except with calling syntax: MODIFIED_OPT = FNAME(DEFAULT_OPT, MPOPT); ipopt.opt - numbered user option function, if and only if ipopt.opt_fname is empty and ipopt.opt is non-zero, the value of ipopt.opt_fname is generated by appending ipopt.opt to 'ipopt_user_options_' (for backward compatibility with old MATPOWER option IPOPT_OPT). Output is an options.ipopt struct to pass to IPOPT. There are multiple ways of providing values to override the default options. Their precedence and order of application are as follows: With inputs OVERRIDES and FNAME 1. FNAME is called 2. OVERRIDES are applied With inputs OVERRIDES and MPOPT 1. FNAME (from ipopt.opt_fname or ipopt.opt) is called 2. ipopt.opts (if not empty) are applied 3. OVERRIDES are applied Example: If 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, mpopt); The contents of ipopt_user_options_3.m, could be something like: function opt = ipopt_user_options_3(opt, mpopt) opt.nlp_scaling_method = 'none'; opt.max_iter = 500; opt.derivative_test = 'first-order'; See the options reference section in the IPOPT documentation for details on the available options. http://www.coin-or.org/Ipopt/documentation/
See also
ipopt
,mpoption()
.