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

have_feature_mosek

PURPOSE ^

HAVE_FEATURE_MOSEK Detect availability/version info for MOSEK

SYNOPSIS ^

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

DESCRIPTION ^

HAVE_FEATURE_MOSEK  Detect availability/version info for MOSEK

   Feature detection function implementing 'mosek' tag for HAVE_FEATURE
   to detect availability/version of MOSEK, LP/QP/MILP/MIQP solver
   (https://www.mosek.com/).

   See also HAVE_FEATURE, QPS_MASTER, MIQPS_MASTER, MOSEKOPT.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [TorF, vstr, rdate] = have_feature_mosek()
0002 %HAVE_FEATURE_MOSEK  Detect availability/version info for MOSEK
0003 %
0004 %   Feature detection function implementing 'mosek' tag for HAVE_FEATURE
0005 %   to detect availability/version of MOSEK, LP/QP/MILP/MIQP solver
0006 %   (https://www.mosek.com/).
0007 %
0008 %   See also HAVE_FEATURE, QPS_MASTER, MIQPS_MASTER, MOSEKOPT.
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('mosekopt', 'file') == 3;
0019 vstr = '';
0020 rdate = '';
0021 if TorF
0022     % MOSEK Version 6.0.0.93 (Build date: 2010-10-26 13:03:27)
0023     % MOSEK Version 6.0.0.106 (Build date: 2011-3-17 10:46:54)
0024     % MOSEK Version 7.0.0.134 (Build date: 2014-10-2 11:10:02)
0025     pat = 'Version (\.*\d)+.*Build date: (\d+-\d+-\d+)';
0026     [s,e,tE,m,t] = regexp(evalc('mosekopt'), pat);
0027     if isempty(t)
0028         [r, res] = mosekopt('version');
0029         v = res.version;
0030         vstr = sprintf('%d.%d.%d.%d', ...
0031             v.major, v.minor, v.build, v.revision);
0032     else
0033         vstr = t{1}{1};
0034         rdate = datestr(t{1}{2}, 'dd-mmm-yyyy');
0035     end
0036 end

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