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_nested_struct_copy';
0046 tests{end+1} = 't_mpoption';
0047 tests{end+1} = 't_loadcase';
0048 tests{end+1} = 't_ext2int2ext';
0049 tests{end+1} = 't_jacobian';
0050 tests{end+1} = 't_hessian';
0051 tests{end+1} = 't_margcost';
0052 tests{end+1} = 't_totcost';
0053 tests{end+1} = 't_modcost';
0054 tests{end+1} = 't_hasPQcap';
0055 tests{end+1} = 't_mips';
0056 tests{end+1} = 't_qps_matpower';
0057 tests{end+1} = 't_pf';
0058 tests{end+1} = 't_cpf';
0059 tests{end+1} = 't_islands';
0060 tests{end+1} = 't_opf_model';
0061 if have_fcn('fmincon')
0062 tests{end+1} = 't_opf_fmincon';
0063 end
0064 if have_fcn('minopf')
0065 tests{end+1} = 't_opf_minopf';
0066 end
0067 tests{end+1} = 't_opf_mips';
0068 tests{end+1} = 't_opf_mips_sc';
0069 if have_fcn('pdipmopf')
0070 tests{end+1} = 't_opf_tspopf_pdipm';
0071 end
0072 if have_fcn('scpdipmopf')
0073 tests{end+1} = 't_opf_tspopf_scpdipm';
0074 end
0075 if have_fcn('tralmopf')
0076 tests{end+1} = 't_opf_tspopf_tralm';
0077 end
0078 if have_fcn('ipopt')
0079 tests{end+1} = 't_opf_ipopt';
0080 end
0081 if have_fcn('knitro')
0082 tests{end+1} = 't_opf_knitro';
0083 end
0084 if have_fcn('bpmpd')
0085 tests{end+1} = 't_opf_dc_bpmpd';
0086 end
0087 if have_fcn('cplex')
0088 tests{end+1} = 't_opf_dc_cplex';
0089 end
0090 if have_fcn('gurobi')
0091 tests{end+1} = 't_opf_dc_gurobi';
0092 end
0093 if have_fcn('ipopt')
0094 tests{end+1} = 't_opf_dc_ipopt';
0095 end
0096 tests{end+1} = 't_opf_dc_mips';
0097 tests{end+1} = 't_opf_dc_mips_sc';
0098 if have_fcn('mosek')
0099 tests{end+1} = 't_opf_dc_mosek';
0100 end
0101 if have_fcn('quadprog')
0102 tests{end+1} = 't_opf_dc_ot';
0103 end
0104 if have_fcn('glpk')
0105 tests{end+1} = 't_opf_dc_glpk';
0106 end
0107 if have_fcn('sdp_pf')
0108 tests{end+1} = 't_opf_sdpopf';
0109 tests{end+1} = 't_testglobalopt';
0110 tests{end+1} = 't_insolvablepf';
0111 tests{end+1} = 't_insolvablepf_limitQ';
0112 tests{end+1} = 't_insolvablepfsos';
0113 tests{end+1} = 't_insolvablepfsos_limitQ';
0114 end
0115 tests{end+1} = 't_opf_userfcns';
0116 tests{end+1} = 't_opf_softlims';
0117 tests{end+1} = 't_runopf_w_res';
0118 tests{end+1} = 't_dcline';
0119 tests{end+1} = 't_get_losses';
0120 tests{end+1} = 't_makePTDF';
0121 tests{end+1} = 't_makeLODF';
0122 tests{end+1} = 't_printpf';
0123 tests{end+1} = 't_total_load';
0124 tests{end+1} = 't_scale_load';
0125 tests{end+1} = 't_psse';
0126
0127
0128 if have_fcn('smartmarket')
0129 tests{end+1} = 't_off2case';
0130 if have_fcn('minopf')
0131 tests{end+1} = 't_auction_minopf';
0132 end
0133 tests{end+1} = 't_auction_mips';
0134 if have_fcn('pdipmopf')
0135 tests{end+1} = 't_auction_tspopf_pdipm';
0136 end
0137 tests{end+1} = 't_runmarket';
0138 end
0139
0140
0141 if exist('apply_contingency', 'file') == 2
0142 tests{end+1} = 't_apply_contingency';
0143 tests{end+1} = 't_c3sopf_sopf2';
0144 end
0145
0146 t_run_tests( tests, verbose );