HAVE_FCN Test for optional functionality / version info. ----- DEPRECATED - Please use HAVE_FEATURE instead ----- % TORF = HAVE_FCN(TAG) TORF = HAVE_FCN(TAG, TOGGLE) VER_STR = HAVE_FCN(TAG, 'vstr') VER_NUM = HAVE_FCN(TAG, 'vnum') DATE = HAVE_FCN(TAG, 'date') INFO = HAVE_FCN(TAG, 'all') HAVE_FCN(TAG, 'clear_cache') HAVE_FCN('all', 'clear_cache') Returns availability, version and release information for optional functionality. All information is cached, and the cached values returned on subsequent calls. If the functionality exists, an attempt is made to determine the release date and version number. The second argument defines which value is returned, as follows: <none> 1 = optional functionality is available, 0 = not available 'vstr' version number as a string (e.g. '3.11.4') 'vnum' version number as numeric value (e.g. 3.011004) 'date' release date as a string (e.g. '20-Jan-2015') 'all' struct with fields named 'av' (for 'availability'), 'vstr', 'vnum' and 'date', and values corresponding to the above, respectively. For functionality that is not available, all calls with a string-valued second argument will return an empty value. Alternatively, the optional functionality specified by TAG can be toggled OFF or ON by calling HAVE_FCN with a numeric second argument TOGGLE with one of the following values: 0 - turn OFF the optional functionality 1 - turn ON the optional functionality (if available) -1 - toggle the ON/OFF state of the optional functionality Finally, passing 'clear_cache' as the second argument will cause the cached information to be cleared for the specified TAG or, if the first argument is 'all', for all optional functionality. When calling with 'clear_cache' no return value is defined. Possible values for input TAG and their meanings: bpmpd - BP, BPMPD interior point LP/QP solver clp - CLP, LP/QP solver(https://github.com/coin-or/Clp) opti_clp - version of CLP distributed with OPTI Toolbox (https://www.inverseproblem.co.nz/OPTI/) cplex - CPLEX, IBM ILOG CPLEX Optimizer fmincon - FMINCON, solver from Optimization Toolbox fmincon_ipm - FMINCON with Interior Point solver, from Opt Tbx 4.x+ fsolve - FSOLVE, nonlinear equation solver from Opt Toolbox glpk - GLPK, GNU Linear Programming Kit gurobi - GUROBI, Gurobi solver (https://www.gurobi.com/) intlinprog - INTLINPROG, MILP solver from Optimization Toolbox 7.0 (R2014a)+ ipopt - IPOPT, NLP solver (https://github.com/coin-or/Ipopt) knitro - Artelys Knitro, NLP solver (https://www.artelys.com/solvers/knitro/) knitromatlab - Artelys Knitro, version 9.0.0+ ktrlink - KNITRO, version < 9.0.0 (requires Opt Tbx) linprog - LINPROG, LP solver from Optimization Toolbox linprog_ds - LINPROG with dual-simplex solver from Optimization Toolbox 7.1 (R2014b) + matlab - code is running under MATLAB, as opposed to Octave mosek - MOSEK, LP/QP solver (https://www.mosek.com/) octave - code is running under GNU Octave, as opposed to MATLAB optim - Optimization Toolbox optimoptions - OPTIMOPTIONS, option setting funciton for Optim Tbx 6.3+ osqp - OSQP (Operator Splitting QP) solver (https://osqp.org) pardiso - PARDISO, Parallel Sparse Direct & Iterative Linear Solver (https://pardiso-project.org) quadprog - QUADPROG, QP solver from Optimization Toolbox 2.x + quadprog_ls - QUADPROG with large-scale interior point convex solver from Optimization Toolbox 6.x + sdpt3 - SDPT3 SDP solver (https://github.com/sqlp/sdpt3) sedumi - SeDuMi SDP solver (http://sedumi.ie.lehigh.edu) yalmip - YALMIP SDP modeling platform (https://yalmip.github.io) Functionality related to MATPOWER e4st - E4ST (https://e4st.com/) minopf - MINOPF, MINOPF, MINOS-based OPF solver most - MOST, MATPOWER Optimal Scheduling Tool pdipmopf - PDIPMOPF, primal-dual interior point method OPF solver scpdipmopf - SCPDIPMOPF, step-controlled PDIPM OPF solver sdp_pf - SDP_PF applications of semi-definite programming relaxation of power flow equations smartmarket - RUNMARKET and friends, for running an energy auction syngrid - SynGrid, Synthetic Grid Creation for MATPOWER tralmopf - TRALMOPF, trust region based augmented Langrangian OPF solver Examples: if have_fcn('minopf') results = runopf(mpc, mpoption('opf.ac.solver', 'MINOPF')); end
0001 function varargout = have_fcn(varargin) 0002 %HAVE_FCN Test for optional functionality / version info. 0003 % 0004 % ----- DEPRECATED - Please use HAVE_FEATURE instead ----- 0005 %% 0006 % TORF = HAVE_FCN(TAG) 0007 % TORF = HAVE_FCN(TAG, TOGGLE) 0008 % VER_STR = HAVE_FCN(TAG, 'vstr') 0009 % VER_NUM = HAVE_FCN(TAG, 'vnum') 0010 % DATE = HAVE_FCN(TAG, 'date') 0011 % INFO = HAVE_FCN(TAG, 'all') 0012 % HAVE_FCN(TAG, 'clear_cache') 0013 % HAVE_FCN('all', 'clear_cache') 0014 % 0015 % Returns availability, version and release information for optional 0016 % functionality. All information is cached, and the cached values 0017 % returned on subsequent calls. If the functionality exists, an attempt is 0018 % made to determine the release date and version number. The second 0019 % argument defines which value is returned, as follows: 0020 % <none> 1 = optional functionality is available, 0 = not available 0021 % 'vstr' version number as a string (e.g. '3.11.4') 0022 % 'vnum' version number as numeric value (e.g. 3.011004) 0023 % 'date' release date as a string (e.g. '20-Jan-2015') 0024 % 'all' struct with fields named 'av' (for 'availability'), 'vstr', 0025 % 'vnum' and 'date', and values corresponding to the above, 0026 % respectively. 0027 % 0028 % For functionality that is not available, all calls with a string-valued 0029 % second argument will return an empty value. 0030 % 0031 % Alternatively, the optional functionality specified by TAG can be toggled 0032 % OFF or ON by calling HAVE_FCN with a numeric second argument TOGGLE with 0033 % one of the following values: 0034 % 0 - turn OFF the optional functionality 0035 % 1 - turn ON the optional functionality (if available) 0036 % -1 - toggle the ON/OFF state of the optional functionality 0037 % 0038 % Finally, passing 'clear_cache' as the second argument will cause the 0039 % cached information to be cleared for the specified TAG or, if the first 0040 % argument is 'all', for all optional functionality. When calling with 0041 % 'clear_cache' no return value is defined. 0042 % 0043 % Possible values for input TAG and their meanings: 0044 % bpmpd - BP, BPMPD interior point LP/QP solver 0045 % clp - CLP, LP/QP solver(https://github.com/coin-or/Clp) 0046 % opti_clp - version of CLP distributed with OPTI Toolbox 0047 % (https://www.inverseproblem.co.nz/OPTI/) 0048 % cplex - CPLEX, IBM ILOG CPLEX Optimizer 0049 % fmincon - FMINCON, solver from Optimization Toolbox 0050 % fmincon_ipm - FMINCON with Interior Point solver, from Opt Tbx 4.x+ 0051 % fsolve - FSOLVE, nonlinear equation solver from Opt Toolbox 0052 % glpk - GLPK, GNU Linear Programming Kit 0053 % gurobi - GUROBI, Gurobi solver (https://www.gurobi.com/) 0054 % intlinprog - INTLINPROG, MILP solver from Optimization 0055 % Toolbox 7.0 (R2014a)+ 0056 % ipopt - IPOPT, NLP solver 0057 % (https://github.com/coin-or/Ipopt) 0058 % knitro - Artelys Knitro, NLP solver 0059 % (https://www.artelys.com/solvers/knitro/) 0060 % knitromatlab - Artelys Knitro, version 9.0.0+ 0061 % ktrlink - KNITRO, version < 9.0.0 (requires Opt Tbx) 0062 % linprog - LINPROG, LP solver from Optimization Toolbox 0063 % linprog_ds - LINPROG with dual-simplex solver 0064 % from Optimization Toolbox 7.1 (R2014b) + 0065 % matlab - code is running under MATLAB, as opposed to Octave 0066 % mosek - MOSEK, LP/QP solver (https://www.mosek.com/) 0067 % octave - code is running under GNU Octave, as opposed to MATLAB 0068 % optim - Optimization Toolbox 0069 % optimoptions - OPTIMOPTIONS, option setting funciton for Optim Tbx 6.3+ 0070 % osqp - OSQP (Operator Splitting QP) solver (https://osqp.org) 0071 % pardiso - PARDISO, Parallel Sparse Direct & Iterative Linear Solver 0072 % (https://pardiso-project.org) 0073 % quadprog - QUADPROG, QP solver from Optimization Toolbox 2.x + 0074 % quadprog_ls - QUADPROG with large-scale interior point convex solver 0075 % from Optimization Toolbox 6.x + 0076 % sdpt3 - SDPT3 SDP solver (https://github.com/sqlp/sdpt3) 0077 % sedumi - SeDuMi SDP solver (http://sedumi.ie.lehigh.edu) 0078 % yalmip - YALMIP SDP modeling platform (https://yalmip.github.io) 0079 % 0080 % Functionality related to MATPOWER 0081 % e4st - E4ST (https://e4st.com/) 0082 % minopf - MINOPF, MINOPF, MINOS-based OPF solver 0083 % most - MOST, MATPOWER Optimal Scheduling Tool 0084 % pdipmopf - PDIPMOPF, primal-dual interior point method OPF solver 0085 % scpdipmopf - SCPDIPMOPF, step-controlled PDIPM OPF solver 0086 % sdp_pf - SDP_PF applications of semi-definite programming 0087 % relaxation of power flow equations 0088 % smartmarket - RUNMARKET and friends, for running an energy auction 0089 % syngrid - SynGrid, Synthetic Grid Creation for MATPOWER 0090 % tralmopf - TRALMOPF, trust region based augmented Langrangian 0091 % OPF solver 0092 % 0093 % Examples: 0094 % if have_fcn('minopf') 0095 % results = runopf(mpc, mpoption('opf.ac.solver', 'MINOPF')); 0096 % end 0097 0098 % Private tags for internal use only: 0099 % catchme - support for 'catch me' syntax in try/catch constructs 0100 % evalc - support for evalc() function 0101 % ipopt_auxdata - support for ipopt_auxdata(), required by 3.11 and later 0102 % lu_vec - support for lu(..., 'vector') syntax 0103 % pardiso_legacy - PARDISO v5, individual MEX files for factor, solve, etc 0104 % pardiso_object - PARDISO v6 and later, object interface 0105 % regexp_split - support for 'split' argument to regexp() 0106 % rithmaticker - used for testing HAVE_FCN 0107 % 0108 % The following calling syntaxes are also implemented to set and get the 0109 % entire cache struct and are used during testing only. 0110 % CACHE = HAVE_FCN('all', 'get_cache') 0111 % HAVE_FCN(CACHE, 'set_cache') 0112 0113 % MP-Opt-Model 0114 % Copyright (c) 2004-2020, Power Systems Engineering Research Center (PSERC) 0115 % by Ray Zimmerman, PSERC Cornell 0116 % 0117 % This file is part of MP-Opt-Model. 0118 % Covered by the 3-clause BSD License (see LICENSE file for details). 0119 % See https://github.com/MATPOWER/mp-opt-model for more info. 0120 0121 [varargout{1:nargout}] = have_feature(varargin{:});