0001 function test_matpower(verbose)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038 if nargin < 1
0039 verbose = 0;
0040 end
0041
0042 tests = {};
0043
0044
0045 tests{end+1} = 't_loadcase';
0046 tests{end+1} = 't_ext2int2ext';
0047 tests{end+1} = 't_jacobian';
0048 tests{end+1} = 't_hessian';
0049 tests{end+1} = 't_totcost';
0050 tests{end+1} = 't_modcost';
0051 tests{end+1} = 't_hasPQcap';
0052 if have_fcn('anon_fcns')
0053 tests{end+1} = 't_mips';
0054 else
0055 tests{end+1} = 't_mips6';
0056 end
0057 tests{end+1} = 't_qps_matpower';
0058 tests{end+1} = 't_pf';
0059 if have_fcn('fmincon')
0060 tests{end+1} = 't_opf_fmincon';
0061 end
0062 if have_fcn('minopf')
0063 tests{end+1} = 't_opf_minopf';
0064 end
0065 tests{end+1} = 't_opf_mips';
0066 tests{end+1} = 't_opf_mips_sc';
0067 if have_fcn('pdipmopf')
0068 tests{end+1} = 't_opf_tspopf_pdipm';
0069 end
0070 if have_fcn('scpdipmopf')
0071 tests{end+1} = 't_opf_tspopf_scpdipm';
0072 end
0073 if have_fcn('tralmopf')
0074 tests{end+1} = 't_opf_tspopf_tralm';
0075 end
0076 if have_fcn('ipopt')
0077 tests{end+1} = 't_opf_ipopt';
0078 end
0079 if have_fcn('knitro')
0080 tests{end+1} = 't_opf_knitro';
0081 end
0082 if have_fcn('constr')
0083 tests{end+1} = 't_opf_constr';
0084 end
0085 if have_fcn('bpmpd')
0086 tests{end+1} = 't_opf_lp_den';
0087 tests{end+1} = 't_opf_lp_spr';
0088 tests{end+1} = 't_opf_lp_spf';
0089 tests{end+1} = 't_opf_dc_bpmpd';
0090 end
0091 if have_fcn('cplex')
0092 tests{end+1} = 't_opf_dc_cplex';
0093 end
0094 if have_fcn('gurobi')
0095 tests{end+1} = 't_opf_dc_gurobi';
0096 end
0097 if have_fcn('ipopt')
0098 tests{end+1} = 't_opf_dc_ipopt';
0099 end
0100 tests{end+1} = 't_opf_dc_mips';
0101 tests{end+1} = 't_opf_dc_mips_sc';
0102 if have_fcn('mosek')
0103 tests{end+1} = 't_opf_dc_mosek';
0104 end
0105 if have_fcn('quadprog')
0106 tests{end+1} = 't_opf_dc_ot';
0107 end
0108 tests{end+1} = 't_opf_userfcns';
0109 tests{end+1} = 't_runopf_w_res';
0110 tests{end+1} = 't_dcline';
0111 tests{end+1} = 't_makePTDF';
0112 tests{end+1} = 't_makeLODF';
0113 tests{end+1} = 't_total_load';
0114 tests{end+1} = 't_scale_load';
0115
0116
0117 if exist('runmarket', 'file') == 2
0118 tests{end+1} = 't_off2case';
0119 if have_fcn('minopf')
0120 tests{end+1} = 't_auction_minopf';
0121 end
0122 tests{end+1} = 't_auction_mips';
0123 if have_fcn('pdipmopf')
0124 tests{end+1} = 't_auction_tspopf_pdipm';
0125 end
0126 tests{end+1} = 't_runmarket';
0127 end
0128
0129
0130 if exist('apply_contingency', 'file') == 2
0131 tests{end+1} = 't_apply_contingency';
0132 tests{end+1} = 't_c3sopf_sopf2';
0133 end
0134
0135 t_run_tests( tests, verbose );