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

osqpver

PURPOSE ^

OSQPVER Prints or returns OSQP version info.

SYNOPSIS ^

function rv = osqpver(varargin)

DESCRIPTION ^

OSQPVER  Prints or returns OSQP version info.
   V = OSQPVER returns the current OSQP version numbers.
   V = OSQPVER('all') returns a struct with the fields Name, Version,
   Release and Date (all strings). Calling OSQPVER without assigning the
   return value prints the version and release date of the current
   installation of OSQP.

   See also MPVER, OSQP.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function rv = osqpver(varargin)
0002 %OSQPVER  Prints or returns OSQP version info.
0003 %   V = OSQPVER returns the current OSQP version numbers.
0004 %   V = OSQPVER('all') returns a struct with the fields Name, Version,
0005 %   Release and Date (all strings). Calling OSQPVER without assigning the
0006 %   return value prints the version and release date of the current
0007 %   installation of OSQP.
0008 %
0009 %   See also MPVER, OSQP.
0010 
0011 %   MP-Opt-Model
0012 %   Copyright (c) 2010-2020, Power Systems Engineering Research Center (PSERC)
0013 %   by Ray Zimmerman, PSERC Cornell
0014 %
0015 %   This file is part of MP-Opt-Model.
0016 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0017 %   See https://github.com/MATPOWER/mp-opt-model for more info.
0018 
0019 o = have_feature('osqp', 'all');
0020 if ~o.av
0021     o.vstr = '<unknown>';
0022 end
0023 
0024 v = struct( 'Name',     'OSQP', ... 
0025             'Version',  o.vstr, ...
0026             'Release',  '', ...
0027             'Date',     o.date );
0028 if nargout > 0
0029     if nargin > 0
0030         rv = v;
0031     else
0032         rv = v.Version;
0033     end
0034 else
0035     if o.av
0036         fprintf('%-22s Version %-10s %-11s\n', v.Name, v.Version, v.Date);
0037     else
0038         fprintf('%-22s -- not installed --\n', v.Name);
0039     end
0040 end

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