Home > matpower5.1 > mpoption_info_cplex.m

mpoption_info_cplex

PURPOSE ^

MPOPTION_INFO_CPLEX Returns MATPOWER option info for CPLEX.

SYNOPSIS ^

function opt = mpoption_info_cplex(selector)

DESCRIPTION ^

MPOPTION_INFO_CPLEX  Returns MATPOWER option info for CPLEX.

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

   Returns a structure for CPLEX 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_cplex(selector)
0002 %MPOPTION_INFO_CPLEX  Returns MATPOWER option info for CPLEX.
0003 %
0004 %   DEFAULT_OPTS = MPOPTION_INFO_CPLEX('D')
0005 %   VALID_OPTS   = MPOPTION_INFO_CPLEX('V')
0006 %   EXCEPTIONS   = MPOPTION_INFO_CPLEX('E')
0007 %
0008 %   Returns a structure for CPLEX 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-2015 by Power System Engineering Research Center (PSERC)
0022 %   by Ray Zimmerman, PSERC Cornell
0023 %
0024 %   $Id: mpoption_info_cplex.m 2644 2015-03-11 19:34:22Z ray $
0025 %
0026 %   This file is part of MATPOWER.
0027 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0028 %   See http://www.pserc.cornell.edu/matpower/ for more info.
0029 
0030 if nargin < 1
0031     selector = 'D';
0032 end
0033 if have_fcn('cplex')
0034     switch upper(selector)
0035         case {'D', 'V'}     %% default and valid options
0036             opt = struct(...
0037                 'cplex',        struct(...
0038                     'lpmethod',     0, ...
0039                     'qpmethod',     0, ...
0040                     'opts',         [], ...
0041                     'opt_fname',    '', ...
0042                     'opt',          0 ...
0043                 ) ...
0044             );
0045         case 'E'            %% exceptions used by nested_struct_copy() for applying
0046             opt = struct(...
0047                 'name',         { 'cplex.opts' }, ...
0048                 'check',        0 ...
0049                 );
0050 %                 'copy_mode',    { @cplex_options } ...
0051         otherwise
0052             error('mpoption_info_cplex: ''%s'' is not a valid input argument', selector);
0053     end
0054 else
0055     opt = struct([]);       %% CPLEX is not available
0056 end

Generated on Fri 20-Mar-2015 18:23:34 by m2html © 2005