Home > matpower7.0 > extras > sdp_pf > mpoption_info_yalmip.m

mpoption_info_yalmip

PURPOSE ^

MPOPTION_INFO_YALMIP Returns MATPOWER option info for YALMIP.

SYNOPSIS ^

function opt = mpoption_info_yalmip(selector)

DESCRIPTION ^

MPOPTION_INFO_YALMIP  Returns MATPOWER option info for YALMIP.

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

   Returns a structure for YALMIP 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_yalmip(selector)
0002 %MPOPTION_INFO_YALMIP  Returns MATPOWER option info for YALMIP.
0003 %
0004 %   DEFAULT_OPTS = MPOPTION_INFO_YALMIP('D')
0005 %   VALID_OPTS   = MPOPTION_INFO_YALMIP('V')
0006 %   EXCEPTIONS   = MPOPTION_INFO_YALMIP('E')
0007 %
0008 %   Returns a structure for YALMIP 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-2019, Power Systems Engineering Research Center (PSERC)
0022 %   by Ray Zimmerman, PSERC Cornell
0023 %
0024 %   This file is part of MATPOWER/mx-sdp_pf.
0025 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0026 %   See https://github.com/MATPOWER/mx-sdp_pf/ for more info.
0027 
0028 if nargin < 1
0029     selector = 'D';
0030 end
0031 if have_fcn('yalmip')
0032     switch upper(selector)
0033         case {'D', 'V'}     %% default and valid options
0034             opt = struct(...
0035                 'yalmip',           struct(...
0036                     'opts',            [], ...
0037                     'opt_fname',       '' ...
0038                 ) ...
0039             );
0040         case 'E'            %% exceptions used by nested_struct_copy() for applying
0041             opt = struct(...
0042                 'name',         { 'yalmip.opts' }, ...
0043                 'check',        0 ...
0044                 );
0045 %                 'copy_mode',    { @yalmip_options } ...
0046         otherwise
0047             error('mpoption_info_yalmip: ''%s'' is not a valid input argument', selector);
0048     end
0049 else
0050     opt = struct([]);       %% YALMIP is not available
0051 end

Generated on Mon 24-Jun-2019 15:58:45 by m2html © 2005