Home > matpower7.1 > lib > t > test_matpower.m

test_matpower

PURPOSE ^

TEST_MATPOWER Run all MATPOWER tests.

SYNOPSIS ^

function success = test_matpower(verbose, exit_on_fail)

DESCRIPTION ^

TEST_MATPOWER  Run all MATPOWER tests.
   TEST_MATPOWER
   TEST_MATPOWER(VERBOSE)
   TEST_MATPOWER(VERBOSE, EXIT_ON_FAIL)
   SUCCESS = TEST_MATPOWER(...)

   Runs all of the MATPOWER tests. If VERBOSE is true (false by default),
   it prints the details of the individual tests. If EXIT_ON_FAIL is true
   (false by default), it will exit MATLAB or Octave with a status of 1
   unless T_RUN_TESTS returns ALL_OK.

   See also T_RUN_TESTS.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function success = test_matpower(verbose, exit_on_fail)
0002 %TEST_MATPOWER  Run all MATPOWER tests.
0003 %   TEST_MATPOWER
0004 %   TEST_MATPOWER(VERBOSE)
0005 %   TEST_MATPOWER(VERBOSE, EXIT_ON_FAIL)
0006 %   SUCCESS = TEST_MATPOWER(...)
0007 %
0008 %   Runs all of the MATPOWER tests. If VERBOSE is true (false by default),
0009 %   it prints the details of the individual tests. If EXIT_ON_FAIL is true
0010 %   (false by default), it will exit MATLAB or Octave with a status of 1
0011 %   unless T_RUN_TESTS returns ALL_OK.
0012 %
0013 %   See also T_RUN_TESTS.
0014 
0015 %   MATPOWER
0016 %   Copyright (c) 2004-2016, Power Systems Engineering Research Center (PSERC)
0017 %   by Ray Zimmerman, PSERC Cornell
0018 %
0019 %   This file is part of MATPOWER.
0020 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0021 %   See https://matpower.org for more info.
0022 
0023 if nargin < 2
0024     exit_on_fail = 0;
0025     if nargin < 1
0026         verbose = 0;
0027     end
0028 end
0029 
0030 tests = {};
0031 
0032 %% MP-Test
0033 tests{end+1} = 't_test_fcns';
0034 tests{end+1} = 't_have_feature';
0035 
0036 %% MIPS
0037 tests{end+1} = 't_mplinsolve';
0038 tests{end+1} = 't_mips';
0039 tests{end+1} = 't_mips_pardiso';
0040 tests{end+1} = 't_qps_mips';
0041 
0042 %% MP-Opt-Model
0043 tests{end+1} = 't_have_fcn';
0044 tests{end+1} = 't_nested_struct_copy';
0045 tests{end+1} = 't_nleqs_master';
0046 tests{end+1} = 't_qps_master';
0047 tests{end+1} = 't_miqps_master';
0048 tests{end+1} = 't_nlps_master';
0049 tests{end+1} = 't_opt_model';
0050 tests{end+1} = 't_om_solve_leqs';
0051 tests{end+1} = 't_om_solve_nleqs';
0052 tests{end+1} = 't_om_solve_qps';
0053 tests{end+1} = 't_om_solve_miqps';
0054 tests{end+1} = 't_om_solve_nlps';
0055 
0056 %% deprecated wrappers
0057 tests{end+1} = 't_qps_matpower';
0058 tests{end+1} = 't_miqps_matpower';
0059 
0060 %% MATPOWER
0061 tests{end+1} = 't_feval_w_path';
0062 tests{end+1} = 't_mpoption';
0063 tests{end+1} = 't_loadcase';
0064 tests{end+1} = 't_ext2int2ext';
0065 tests{end+1} = 't_jacobian';
0066 tests{end+1} = 't_hessian';
0067 tests{end+1} = 't_margcost';
0068 tests{end+1} = 't_totcost';
0069 tests{end+1} = 't_modcost';
0070 tests{end+1} = 't_hasPQcap';
0071 
0072 tests{end+1} = 't_pf_ac';
0073 tests{end+1} = 't_pf_dc';
0074 tests{end+1} = 't_pf_radial';
0075 tests{end+1} = 't_cpf';
0076 tests{end+1} = 't_islands';
0077 tests{end+1} = 't_opf_model';
0078 tests{end+1} = 't_opf_model_legacy';
0079 tests{end+1} = 't_opf_default';
0080 if have_feature('fmincon')
0081     tests{end+1} = 't_opf_fmincon';
0082 end
0083 if have_feature('minopf')
0084     tests{end+1} = 't_opf_minopf';
0085 end
0086 tests{end+1} = 't_opf_mips';
0087 if have_feature('pdipmopf')
0088     tests{end+1} = 't_opf_tspopf_pdipm';
0089 end
0090 if have_feature('scpdipmopf')
0091     tests{end+1} = 't_opf_tspopf_scpdipm';
0092 end
0093 if have_feature('tralmopf')
0094     tests{end+1} = 't_opf_tspopf_tralm';
0095 end
0096 if have_feature('ipopt')
0097     tests{end+1} = 't_opf_ipopt';
0098 end
0099 if have_feature('knitro')
0100     tests{end+1} = 't_opf_knitro';
0101 end
0102 tests{end+1} = 't_opf_dc_default';
0103 if have_feature('bpmpd')
0104     tests{end+1} = 't_opf_dc_bpmpd';
0105 end
0106 if have_feature('clp')
0107     tests{end+1} = 't_opf_dc_clp';
0108 end
0109 if have_feature('cplex')
0110     tests{end+1} = 't_opf_dc_cplex';
0111 end
0112 if have_feature('glpk')
0113     tests{end+1} = 't_opf_dc_glpk';
0114 end
0115 if have_feature('gurobi')
0116     tests{end+1} = 't_opf_dc_gurobi';
0117 end
0118 if have_feature('ipopt')
0119     tests{end+1} = 't_opf_dc_ipopt';
0120 end
0121 tests{end+1} = 't_opf_dc_mips';
0122 tests{end+1} = 't_opf_dc_mips_sc';
0123 if have_feature('mosek')
0124     tests{end+1} = 't_opf_dc_mosek';
0125 end
0126 if have_feature('osqp')
0127     tests{end+1} = 't_opf_dc_osqp';
0128 end
0129 if have_feature('quadprog')
0130     tests{end+1} = 't_opf_dc_ot';
0131 end
0132 
0133 %% SDP_PF
0134 if have_feature('sdp_pf')
0135     if have_feature('mosek') || have_feature('sdpt3') || have_feature('sedumi')
0136         tests{end+1} = 't_opf_sdpopf';
0137         tests{end+1} = 't_insolvablepf';
0138         tests{end+1} = 't_insolvablepf_limitQ';
0139         tests{end+1} = 't_insolvablepfsos';
0140         tests{end+1} = 't_insolvablepfsos_limitQ';
0141     end
0142     tests{end+1} = 't_testglobalopt';
0143 end
0144 tests{end+1} = 't_opf_userfcns';
0145 tests{end+1} = 't_opf_softlims';
0146 tests{end+1} = 't_runopf_w_res';
0147 tests{end+1} = 't_dcline';
0148 tests{end+1} = 't_get_losses';
0149 tests{end+1} = 't_load2disp';
0150 tests{end+1} = 't_makePTDF';
0151 tests{end+1} = 't_makeLODF';
0152 tests{end+1} = 't_printpf';
0153 tests{end+1} = 't_vdep_load';
0154 tests{end+1} = 't_total_load';
0155 tests{end+1} = 't_scale_load';
0156 tests{end+1} = 't_apply_changes';
0157 tests{end+1} = 't_psse';
0158 
0159 %% smartmarket tests
0160 if have_feature('smartmarket')
0161     tests{end+1} = 't_off2case';
0162     if have_feature('minopf')
0163         tests{end+1} = 't_auction_minopf';
0164     end
0165     tests{end+1} = 't_auction_mips';
0166     if have_feature('pdipmopf')
0167         tests{end+1} = 't_auction_tspopf_pdipm';
0168     end
0169     tests{end+1} = 't_runmarket';
0170 end
0171 
0172 %% run the tests
0173 all_ok = t_run_tests( tests, verbose );
0174 
0175 %% handle success/failure
0176 if exit_on_fail && ~all_ok
0177     exit(1);
0178 end
0179 if nargout
0180     success = all_ok;
0181 end

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