Home > matpower5.1 > mpver.m

mpver

PURPOSE ^

MPVER Prints or returns MATPOWER version info for current installation.

SYNOPSIS ^

function rv = mpver(varargin)

DESCRIPTION ^

MPVER  Prints or returns MATPOWER version info for current installation.
   V = MPVER returns the current MATPOWER version number.
   V = MPVER('all') returns a struct with the fields Name, Version,
   Release and Date (all strings). Calling MPVER without assigning the
   return value prints the version and release date of the current
   installation of MATPOWER, MATLAB (or Octave), the Optimization Toolbox,
   MIPS and any optional MATPOWER packages.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function rv = mpver(varargin)
0002 %MPVER  Prints or returns MATPOWER version info for current installation.
0003 %   V = MPVER returns the current MATPOWER version number.
0004 %   V = MPVER('all') returns a struct with the fields Name, Version,
0005 %   Release and Date (all strings). Calling MPVER without assigning the
0006 %   return value prints the version and release date of the current
0007 %   installation of MATPOWER, MATLAB (or Octave), the Optimization Toolbox,
0008 %   MIPS and any optional MATPOWER packages.
0009 
0010 %   MATPOWER
0011 %   Copyright (c) 2005-2015 by Power System Engineering Research Center (PSERC)
0012 %   by Ray Zimmerman, PSERC Cornell
0013 %
0014 %   $Id: mpver.m 2664 2015-03-20 21:31:02Z ray $
0015 %
0016 %   This file is part of MATPOWER.
0017 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0018 %   See http://www.pserc.cornell.edu/matpower/ for more info.
0019 
0020 %% the following only works if MATPOWER is explicitly in the path,
0021 %% but not if it is only in the current working directory
0022 % fs = filesep;
0023 % p = fileparts(which('runpf'));
0024 % if ~strcmp(p(1),fs)
0025 %   [t, p] = strtok(p, filesep);
0026 % end
0027 % p = p(2:end);
0028 % v{1} = ver(p);
0029 
0030 v{1} = struct(  'Name',     'MATPOWER', ... 
0031                 'Version',  '5.1', ...
0032                 'Release',  '', ...
0033                 'Date',     '20-Mar-2015' );
0034 if nargout > 0
0035     if nargin > 0
0036         rv = v{1};
0037     else
0038         rv = v{1}.Version;
0039     end
0040 else
0041     if have_fcn('octave')
0042         v{2} = ver('octave');
0043     else
0044         v{2} = ver('matlab');
0045     end
0046     v{3} = ver('optim');
0047     for n = 1:3
0048         if n == 3 && isempty(v{3})
0049             fprintf('\n%-22s -- not installed --', 'Optimization Toolbox');
0050             continue;
0051         elseif n == 3 && ~license('test', 'optimization_toolbox')
0052             fprintf('\n%-22s -- no license --', 'Optimization Toolbox');
0053             continue;
0054         end
0055         fprintf('\n%-22s Version %-9s', v{n}.Name, v{n}.Version);
0056         if ~isempty(v{n}.Date)
0057             fprintf('  %11s', v{n}.Date);
0058             if ~isempty(v{n}.Release)
0059                 fprintf('   Release: %-10s', v{n}.Release);
0060             end
0061         end
0062     end
0063     fprintf('\n');
0064     mipsver;
0065     if have_fcn('sdp_pf')
0066         sdp_pf_ver;
0067     else
0068         fprintf('%-22s -- not installed --\n', 'SDP_PF');
0069     end
0070     if have_fcn('yalmip')
0071         s = have_fcn('yalmip', 'all');
0072         fprintf('%-22s Version %-10s %-11s\n', 'YALMIP', s.vstr, s.date);
0073     else
0074         fprintf('%-22s -- not installed --\n', 'YALMIP');
0075     end
0076     if have_fcn('bpmpd')
0077         if exist('bpver', 'file') == 2
0078             bpver;
0079         else
0080             fprintf('%-22s Version 2.21 or earlier\n', 'BPMPD_MEX');
0081         end
0082     else
0083         fprintf('%-22s -- not installed --\n', 'BPMPD_MEX');
0084     end
0085     if have_fcn('clp')
0086         s = have_fcn('clp', 'all');
0087         if isempty(s.vstr)
0088             vn = '<unknown>';
0089         else
0090             vn = s.vstr;
0091         end
0092         fprintf('%-22s Version %-10s %-11s\n', 'CLP', vn, s.date);
0093     else
0094         fprintf('%-22s -- not installed --\n', 'CLP');
0095     end
0096     if have_fcn('cplex')
0097         s = have_fcn('cplex', 'all');
0098         fprintf('%-22s Version %-10s %-11s\n', 'CPLEX', s.vstr, s.date);
0099     else
0100         fprintf('%-22s -- not installed --\n', 'CPLEX');
0101     end
0102     if have_fcn('glpk')
0103         s = have_fcn('glpk', 'all');
0104         if isempty(s.vstr)
0105             vn = '<unknown>';
0106         else
0107             vn = s.vstr;
0108         end
0109         fprintf('%-22s Version %-10s %-11s\n', 'GLPK', vn, s.date);
0110     else
0111         fprintf('%-22s -- not installed --\n', 'GLPK');
0112     end
0113     if have_fcn('gurobi')
0114         gurobiver;
0115     else
0116         fprintf('%-22s -- not installed --\n', 'Gurobi');
0117     end
0118     if have_fcn('ipopt')
0119         s = have_fcn('ipopt', 'all');
0120         if isempty(s.vstr)
0121             vn = '<unknown>';
0122         else
0123             vn = s.vstr;
0124         end
0125         fprintf('%-22s Version %-10s %-11s\n', 'IPOPT', vn, s.date);
0126     else
0127         fprintf('%-22s -- not installed --\n', 'IPOPT');
0128     end
0129     if have_fcn('knitro')
0130         s = have_fcn('knitro', 'all');
0131         if isempty(s.vstr)
0132             vn = '<unknown>';
0133         else
0134             vn = s.vstr;
0135         end
0136         fprintf('%-22s Version %-10s %-11s\n', 'KNITRO', vn, s.date);
0137     else
0138         fprintf('%-22s -- not installed --\n', 'KNITRO');
0139     end
0140     if have_fcn('minopf')
0141         if exist('minopfver', 'file') == 2
0142             minopfver;
0143         else
0144             fprintf('%-22s Version 3.0b2 or earlier\n', 'MINOPF');
0145         end
0146     else
0147         fprintf('%-22s -- not installed --\n', 'MINOPF');
0148     end
0149     if have_fcn('mosek')
0150         s = have_fcn('mosek', 'all');
0151         if isempty(s.vstr)
0152             vn = '<unknown>';
0153         else
0154             vn = s.vstr;
0155         end
0156         fprintf('%-22s Version %-10s %-11s\n', 'MOSEK', vn, s.date);
0157     else
0158         fprintf('%-22s -- not installed --\n', 'MOSEK');
0159     end
0160     if have_fcn('pardiso')
0161         s = have_fcn('pardiso', 'all');
0162         if isempty(s.vstr)
0163             vn = '<unknown>';
0164         else
0165             vn = s.vstr;
0166         end
0167         fprintf('%-22s Version %-10s %-11s\n', 'PARDISO', vn, s.date);
0168     else
0169         fprintf('%-22s -- not installed --\n', 'PARDISO');
0170     end
0171     if have_fcn('pdipmopf')
0172         pdipmopfver;
0173     else
0174         fprintf('%-22s -- not installed --\n', 'PDIPMOPF');
0175     end
0176     if have_fcn('scpdipmopf')
0177         scpdipmopfver;
0178     else
0179         fprintf('%-22s -- not installed --\n', 'SCPDIPMOPF');
0180     end
0181     if have_fcn('sdpt3')
0182         s = have_fcn('sdpt3', 'all');
0183         if isempty(s.vstr)
0184             vn = '<unknown>';
0185         else
0186             vn = s.vstr;
0187         end
0188         fprintf('%-22s Version %-10s %-11s\n', 'SDPT3', vn, s.date);
0189     else
0190         fprintf('%-22s -- not installed --\n', 'SDPT3');
0191     end
0192     if have_fcn('sedumi')
0193         s = have_fcn('sedumi', 'all');
0194         if isempty(s.vstr)
0195             vn = '<unknown>';
0196         else
0197             vn = s.vstr;
0198         end
0199         fprintf('%-22s Version %-10s %-11s\n', 'SeDuMi', vn, s.date);
0200     else
0201         fprintf('%-22s -- not installed --\n', 'SeDuMi');
0202     end
0203     if have_fcn('tralmopf')
0204         tralmopfver;
0205     else
0206         fprintf('%-22s -- not installed --\n', 'TRALMOPF');
0207     end
0208 
0209     fprintf('%-22s %s\n\n', 'Architecture:', computer);
0210     
0211     fprintf('  MATPOWER %s is distributed under the 3-clause BSD License.\n', v{1}.Version);
0212     fprintf('  Please see the LICENSE file for details.\n\n');
0213 end

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