Home > matpower6.0 > gurobiver.m

gurobiver

PURPOSE ^

GUROBIVER Prints or returns GUROBI version info.

SYNOPSIS ^

function rv = gurobiver(varargin)

DESCRIPTION ^

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

   See also MPVER.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function rv = gurobiver(varargin)
0002 %GUROBIVER  Prints or returns GUROBI version info.
0003 %   V = GUROBIVER returns the current GUROBI version numbers.
0004 %   V = GUROBIVER('all') returns a struct with the fields Name, Version,
0005 %   Release and Date (all strings). Calling GUROBIVER without assigning the
0006 %   return value prints the version and release date of the current
0007 %   installation of GUROBI.
0008 %
0009 %   See also MPVER.
0010 
0011 %   MATPOWER
0012 %   Copyright (c) 2010-2016, Power Systems Engineering Research Center (PSERC)
0013 %   by Ray Zimmerman, PSERC Cornell
0014 %
0015 %   This file is part of MATPOWER.
0016 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0017 %   See http://www.pserc.cornell.edu/matpower/ for more info.
0018 
0019 g = have_fcn('gurobi', 'all');
0020 if ~g.av
0021     g.vstr = '<unknown>';
0022 end
0023 
0024 v = struct( 'Name',     'Gurobi', ... 
0025             'Version',  g.vstr, ...
0026             'Release',  '', ...
0027             'Date',     g.date );
0028 if nargout > 0
0029     if nargin > 0
0030         rv = v;
0031     else
0032         rv = v.Version;
0033     end
0034 else
0035     if g.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 16-Dec-2016 12:45:37 by m2html © 2005