Home > matpower7.0 > 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 %% MATPOWER base test
0033 tests{end+1} = 't_test_fcns';
0034 tests{end+1} = 't_nested_struct_copy';
0035 tests{end+1} = 't_have_fcn';
0036 tests{end+1} = 't_feval_w_path';
0037 tests{end+1} = 't_mpoption';
0038 tests{end+1} = 't_loadcase';
0039 tests{end+1} = 't_ext2int2ext';
0040 tests{end+1} = 't_jacobian';
0041 tests{end+1} = 't_hessian';
0042 tests{end+1} = 't_margcost';
0043 tests{end+1} = 't_totcost';
0044 tests{end+1} = 't_modcost';
0045 tests{end+1} = 't_hasPQcap';
0046 tests{end+1} = 't_mplinsolve';
0047 tests{end+1} = 't_mips';
0048 tests{end+1} = 't_mips_pardiso';
0049 tests{end+1} = 't_qps_matpower';
0050 tests{end+1} = 't_miqps_matpower';
0051 tests{end+1} = 't_pf';
0052 tests{end+1} = 't_pf_radial';
0053 tests{end+1} = 't_cpf';
0054 tests{end+1} = 't_islands';
0055 tests{end+1} = 't_opf_model';
0056 tests{end+1} = 't_opf_model_legacy';
0057 tests{end+1} = 't_opf_default';
0058 if have_fcn('fmincon')
0059     tests{end+1} = 't_opf_fmincon';
0060 end
0061 if have_fcn('minopf')
0062     tests{end+1} = 't_opf_minopf';
0063 end
0064 tests{end+1} = 't_opf_mips';
0065 if have_fcn('pdipmopf')
0066     tests{end+1} = 't_opf_tspopf_pdipm';
0067 end
0068 if have_fcn('scpdipmopf')
0069     tests{end+1} = 't_opf_tspopf_scpdipm';
0070 end
0071 if have_fcn('tralmopf')
0072     tests{end+1} = 't_opf_tspopf_tralm';
0073 end
0074 if have_fcn('ipopt')
0075     tests{end+1} = 't_opf_ipopt';
0076 end
0077 if have_fcn('knitro')
0078     tests{end+1} = 't_opf_knitro';
0079 end
0080 if have_fcn('bpmpd')
0081     tests{end+1} = 't_opf_dc_bpmpd';
0082 end
0083 if have_fcn('clp')
0084     tests{end+1} = 't_opf_dc_clp';
0085 end
0086 if have_fcn('cplex')
0087     tests{end+1} = 't_opf_dc_cplex';
0088 end
0089 if have_fcn('glpk')
0090     tests{end+1} = 't_opf_dc_glpk';
0091 end
0092 if have_fcn('gurobi')
0093     tests{end+1} = 't_opf_dc_gurobi';
0094 end
0095 if have_fcn('ipopt')
0096     tests{end+1} = 't_opf_dc_ipopt';
0097 end
0098 tests{end+1} = 't_opf_dc_mips';
0099 tests{end+1} = 't_opf_dc_mips_sc';
0100 if have_fcn('mosek')
0101     tests{end+1} = 't_opf_dc_mosek';
0102 end
0103 if have_fcn('quadprog')
0104     tests{end+1} = 't_opf_dc_ot';
0105 end
0106 if have_fcn('sdp_pf')
0107     if have_fcn('mosek') || have_fcn('sdpt3') || have_fcn('sedumi')
0108         tests{end+1} = 't_opf_sdpopf';
0109         tests{end+1} = 't_insolvablepf';
0110         tests{end+1} = 't_insolvablepf_limitQ';
0111         tests{end+1} = 't_insolvablepfsos';
0112         tests{end+1} = 't_insolvablepfsos_limitQ';
0113     end
0114     tests{end+1} = 't_testglobalopt';
0115 end
0116 tests{end+1} = 't_opf_userfcns';
0117 tests{end+1} = 't_opf_softlims';
0118 tests{end+1} = 't_runopf_w_res';
0119 tests{end+1} = 't_dcline';
0120 tests{end+1} = 't_get_losses';
0121 tests{end+1} = 't_load2disp';
0122 tests{end+1} = 't_makePTDF';
0123 tests{end+1} = 't_makeLODF';
0124 tests{end+1} = 't_printpf';
0125 tests{end+1} = 't_vdep_load';
0126 tests{end+1} = 't_total_load';
0127 tests{end+1} = 't_scale_load';
0128 tests{end+1} = 't_apply_changes';
0129 tests{end+1} = 't_psse';
0130 
0131 %% smartmarket tests
0132 if have_fcn('smartmarket')
0133     tests{end+1} = 't_off2case';
0134     if have_fcn('minopf')
0135         tests{end+1} = 't_auction_minopf';
0136     end
0137     tests{end+1} = 't_auction_mips';
0138     if have_fcn('pdipmopf')
0139         tests{end+1} = 't_auction_tspopf_pdipm';
0140     end
0141     tests{end+1} = 't_runmarket';
0142 end
0143 
0144 %% run the tests
0145 all_ok = t_run_tests( tests, verbose );
0146 
0147 %% handle success/failure
0148 if exit_on_fail && ~all_ok
0149     exit(1);
0150 end
0151 if nargout
0152     success = all_ok;
0153 end

Generated on Mon 24-Jun-2019 15:58:45 by m2html © 2005