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

have_feature_quadprog

PURPOSE ^

HAVE_FEATURE_QUADPROG Detect availability/version info for QUADPROG

SYNOPSIS ^

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

DESCRIPTION ^

HAVE_FEATURE_QUADPROG  Detect availability/version info for QUADPROG

   Feature detection function implementing 'quadprog' tag for HAVE_FEATURE
   to detect availability/version of QUADPROG, QP solver from the MATLAB
   Optimization Toolbox.

   See also HAVE_FEATURE, HAVE_FEATURE_QUADPROG_LS, QPS_MASTER, QUADPROG.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [TorF, vstr, rdate] = have_feature_quadprog()
0002 %HAVE_FEATURE_QUADPROG  Detect availability/version info for QUADPROG
0003 %
0004 %   Feature detection function implementing 'quadprog' tag for HAVE_FEATURE
0005 %   to detect availability/version of QUADPROG, QP solver from the MATLAB
0006 %   Optimization Toolbox.
0007 %
0008 %   See also HAVE_FEATURE, HAVE_FEATURE_QUADPROG_LS, QPS_MASTER, QUADPROG.
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 = 0;
0019 vstr = '';
0020 rdate = '';
0021 v = have_feature('optim', 'all');
0022 if v.av
0023     TorF = exist('quadprog', 'file') == 2;
0024     %% Octave optim 1.5.0 and earlier, had problems with
0025     %% incorrect lambdas, including opposite sign
0026     %% convention for equality multipliers
0027     if have_feature('octave') && v.vnum <= 1.005
0028         TorF = 0;
0029     end
0030     if TorF
0031         vstr = v.vstr;
0032         rdate = v.date;
0033     end
0034 end

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