Home > matpower5.0 > 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 %   $Id: mpoption_info_fmincon.m 2276 2014-01-17 18:41:58Z ray $
0022 %   by Ray Zimmerman, PSERC Cornell
0023 %   Copyright (c) 2014 by Power System Engineering Research Center (PSERC)
0024 %
0025 %   This file is part of MATPOWER.
0026 %   See http://www.pserc.cornell.edu/matpower/ for more info.
0027 %
0028 %   MATPOWER is free software: you can redistribute it and/or modify
0029 %   it under the terms of the GNU General Public License as published
0030 %   by the Free Software Foundation, either version 3 of the License,
0031 %   or (at your option) any later version.
0032 %
0033 %   MATPOWER is distributed in the hope that it will be useful,
0034 %   but WITHOUT ANY WARRANTY; without even the implied warranty of
0035 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0036 %   GNU General Public License for more details.
0037 %
0038 %   You should have received a copy of the GNU General Public License
0039 %   along with MATPOWER. If not, see <http://www.gnu.org/licenses/>.
0040 %
0041 %   Additional permission under GNU GPL version 3 section 7
0042 %
0043 %   If you modify MATPOWER, or any covered work, to interface with
0044 %   other modules (such as MATLAB code and MEX-files) available in a
0045 %   MATLAB(R) or comparable environment containing parts covered
0046 %   under other licensing terms, the licensors of MATPOWER grant
0047 %   you additional permission to convey the resulting work.
0048 
0049 if nargin < 1
0050     selector = 'D';
0051 end
0052 if have_fcn('fmincon')
0053     switch upper(selector)
0054         case {'D', 'V'}     %% default and valid options
0055             opt = struct(...
0056                 'fmincon',  struct(...
0057                     'alg',      4, ...
0058                     'tol_x',    1e-4, ...
0059                     'tol_f',    1e-4, ...
0060                     'max_it',   0 ...
0061                 ) ...  %         'opt_fname', '', 'opts', []
0062             );
0063         case 'E'            %% exceptions used by nested_struct_copy() for applying
0064             opt = struct([]);   %% no exceptions
0065 %             opt = struct(...
0066 %                 'name',         { 'fmincon.opts' }, ...
0067 %                 'check',        0, ...
0068 %                 'copy_mode',    { '' } ...
0069 %                 );
0070         otherwise
0071             error('mpoption_info_fmincon: ''%s'' is not a valid input argument', selector);
0072     end
0073 else
0074     opt = struct([]);       %% FMINCON is not available
0075 end

Generated on Mon 26-Jan-2015 15:21:31 by m2html © 2005