Home > matpower7.1 > mp-opt-model > lib > have_feature_sedumi.m

have_feature_sedumi

PURPOSE ^

HAVE_FEATURE_SEDUMI Detect availability/version info for SeDuMi

SYNOPSIS ^

function [TorF, vstr, rdate] = have_feature_sedumi()

DESCRIPTION ^

HAVE_FEATURE_SEDUMI  Detect availability/version info for SeDuMi

   Feature detection function implementing 'sedumi' tag for HAVE_FEATURE
   to detect availability/version of SeDuMi SDP solver
   (http://sedumi.ie.lehigh.edu).

   See also HAVE_FEATURE, SEDUMI.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [TorF, vstr, rdate] = have_feature_sedumi()
0002 %HAVE_FEATURE_SEDUMI  Detect availability/version info for SeDuMi
0003 %
0004 %   Feature detection function implementing 'sedumi' tag for HAVE_FEATURE
0005 %   to detect availability/version of SeDuMi SDP solver
0006 %   (http://sedumi.ie.lehigh.edu).
0007 %
0008 %   See also HAVE_FEATURE, SEDUMI.
0009 
0010 %   MP-Opt-Model
0011 %   Copyright (c) 2004-2020, Power Systems Engineering Research Center (PSERC)
0012 %   by Ray Zimmerman, PSERC Cornell
0013 %
0014 %   This file is part of MP-Opt-Model.
0015 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0016 %   See https://github.com/MATPOWER/mp-opt-model for more info.
0017 
0018 TorF = exist('sedumi','file') == 2;
0019 vstr = '';
0020 rdate = '';
0021 if TorF && have_feature('evalc')
0022     warn_state = warning;  %% sedumi turns (and leaves!) off all warnings
0023     str = evalc('x = sedumi([1 1], 1, [1;2])');
0024     warning(warn_state);
0025     pat = 'SeDuMi\s+([^\s]+)';
0026     [s,e,tE,m,t] = regexp(str, pat);
0027     if ~isempty(t)
0028         vstr = t{1}{1};
0029     end
0030 end

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