Home > matpower7.1 > lib > mpoption_info_fmincon.m

mpoption_info_fmincon

PURPOSE ^

MPOPTION_INFO_FMINCON Returns MATPOWER option info for FMINCON.

SYNOPSIS ^

function opt = mpoption_info_fmincon(selector)

DESCRIPTION ^

MPOPTION_INFO_FMINCON  Returns MATPOWER option info for FMINCON.

   DEFAULT_OPTS = MPOPTION_INFO_FMINCON('D')
   VALID_OPTS   = MPOPTION_INFO_FMINCON('V')
   EXCEPTIONS   = MPOPTION_INFO_FMINCON('E')

   Returns a structure for FMINCON options for MATPOWER containing ...
   (1) default options,
   (2) valid options, or
   (3) NESTED_STRUCT_COPY exceptions for setting options
   ... depending on the value of the input argument.

   This function is used by MPOPTION to set default options, check validity
   of option names or modify option setting/copying behavior for this
   subset of optional MATPOWER options.

   See also MPOPTION.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function opt = mpoption_info_fmincon(selector)
0002 %MPOPTION_INFO_FMINCON  Returns MATPOWER option info for FMINCON.
0003 %
0004 %   DEFAULT_OPTS = MPOPTION_INFO_FMINCON('D')
0005 %   VALID_OPTS   = MPOPTION_INFO_FMINCON('V')
0006 %   EXCEPTIONS   = MPOPTION_INFO_FMINCON('E')
0007 %
0008 %   Returns a structure for FMINCON options for MATPOWER containing ...
0009 %   (1) default options,
0010 %   (2) valid options, or
0011 %   (3) NESTED_STRUCT_COPY exceptions for setting options
0012 %   ... depending on the value of the input argument.
0013 %
0014 %   This function is used by MPOPTION to set default options, check validity
0015 %   of option names or modify option setting/copying behavior for this
0016 %   subset of optional MATPOWER options.
0017 %
0018 %   See also MPOPTION.
0019 
0020 %   MATPOWER
0021 %   Copyright (c) 2014-2016, Power Systems Engineering Research Center (PSERC)
0022 %   by Ray Zimmerman, PSERC Cornell
0023 %
0024 %   This file is part of MATPOWER.
0025 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0026 %   See https://matpower.org for more info.
0027 
0028 if nargin < 1
0029     selector = 'D';
0030 end
0031 if have_feature('fmincon')
0032     switch upper(selector)
0033         case {'D', 'V'}     %% default and valid options
0034             opt = struct(...
0035                 'fmincon',  struct(...
0036                     'alg',      4, ...
0037                     'tol_x',    1e-4, ...
0038                     'tol_f',    1e-4, ...
0039                     'max_it',   0 ...
0040                 ) ...  %         'opt_fname', '', 'opts', []
0041             );
0042         case 'E'            %% exceptions used by nested_struct_copy() for applying
0043             opt = struct([]);   %% no exceptions
0044 %             opt = struct(...
0045 %                 'name',         { 'fmincon.opts' }, ...
0046 %                 'check',        0, ...
0047 %                 'copy_mode',    { '' } ...
0048 %                 );
0049         otherwise
0050             error('mpoption_info_fmincon: ''%s'' is not a valid input argument', selector);
0051     end
0052 else
0053     opt = struct([]);       %% FMINCON is not available
0054 end

Generated on Fri 09-Oct-2020 11:21:31 by m2html © 2005