D.4 Automated Test Suite

All of the functions and files listed in this section are found in <MATPOWER>/lib/t, unless noted otherwise.

Table D-24:Automated Test Functions from MP-Test

name

description

mptest/lib/

  t_begin

begin running tests

  t_end

finish running tests and print statistics

  t_is

tests if two matrices are identical to with a specified tolerance

  t_ok

tests if a condition is true

  t_run_tests

run a series of tests

  t_skip

skips a number of tests, with explanatory message

  t/

MP-Test tests

    test_mptest

runs full MP-Test test suite

    t_test_fcns

test t_ok and t_is

These functions are part of MP-Test and are found in <MATPOWER>/mptest/lib.

Table D-25:MIPS Tests

name

description

mips/lib/

  t/

MIPS tests

    test_mips

runs full MIPS test suite

    t_mips

runs tests for MIPS NLP solver

    t_mips_pardiso

runs tests for MIPS NLP solver, using PARDISO as linear solver

    t_mplinsolve

tests for mplinsolve

    t_qps_mips

runs tests for qps_mips

These tests are part of MIPS and are found in <MATPOWER>/mips/lib/t.

Table D-26:Test Data

name

description

opf_nle_fcn1.m

user-defined nonlinear equality constraint function for OPF tests

opf_nle_hess1.m

user-defined nonlinear equality constraint Hessian for OPF tests

pretty_print_acopf.txt

pretty-printed output of an example AC OPF run

pretty_print_dcopf.txt

pretty-printed output of an example DC OPF run

soln9_dcopf.mat

solution data, DC OPF of t_case9_opf

soln9_dcpf.mat

solution data, DC power flow of t_case9_pf

soln9_opf_ang.mat

solution data, AC OPF of t_case9_opfv2 w/only branch angle difference limits (gen PQ capability constraints removed)

soln9_opf_extras1.mat

solution data, AC OPF of t_case9_opf w/extra cost/constraints

soln9_opf_Plim.mat

solution data, AC OPF of t_case9_opf w/opf.flow_lim = 'P'

soln9_opf_PQcap.mat

solution data, AC OPF of t_case9_opfv2 w/only gen PQ capability constraints (branch angle diff limits removed)

soln9_opf_vg.mat

solution data, AC OPF of t_case9_opf with option opf.use_vg

soln9_opf.mat

solution data, AC OPF of t_case9_opf

soln9_pf.mat

solution data, AC power flow of t_case9_pf

t_auction_case.m

case data used to test auction code

t_case_ext.m

case data used to test ext2int and int2ext, external indexing

t_case_info_eg.txt

example output from case_info, used by t_islands

t_case_int.m

case data used to test ext2int and int2ext, internal indexing

t_case9_dcline.m

same as t_case9_opfv2 with additional DC line data

t_case9_opf.m

sample case file with OPF data, version 1 format

t_case9_opfv2.m

sample case file with OPF data, version 2 format, includes additional branch angle diff limits & gen PQ capability constraints

t_case9_pf.m

sample case file with only power flow data, version 1 format

t_case9_pfv2.m

sample case file with only power flow data, version 2 format

t_case9_save2psse.m

sample 9-bus case file used by t_psse for testing save2psse

t_case9_save2psse.raw

result of saving t_case9_save2psse.m with save2psse

t_case30_userfcns.m

sample case file with OPF, reserves and interface flow limit data

t_chgtab.m

sample change table data, used by t_apply_changes

t_psse_case.raw

sample PSS/E format RAW file used to test conversion code

t_psse_case2.m

result of converting t_psse_case2.raw to Matpower format

t_psse_case2.raw

sample PSS/E format RAW file used to test conversion code

t_psse_case3.m

result of converting t_psse_case3.raw to Matpower format

t_psse_case3.raw

sample PSS/E format RAW file used to test conversion code

Table D-27:Miscellaneous Matpower Tests
name

description

test_matpower

runs full Matpower test suite

test_most

runs full MOST test suite

t_apply_changes

runs tests for apply_changes

t_auction_minopf

runs tests for auction using MINOPF

t_auction_mips

runs tests for auction using MIPS

t_auction_tspopf_pdipm

runs tests for auction using PDIPM

t_ext2int2ext

runs tests for ext2int and int2ext

t_feval_w_path

runs tests for feval_w_path

t_get_losses

runs tests for get_losses

t_hasPQcap

runs tests for hasPQcap

t_have_fcn

runs tests for have_fcn

t_hessian

runs tests for 2nd derivative code

t_islands

runs test for find_islands and extract_islands

t_jacobian

runs test for partial derivative code

t_load2disp

runs tests for load2disp

t_loadcase

runs tests for loadcase

t_makeLODF

runs tests for makeLODF

t_makePTDF

runs tests for makePTDF

t_margcost

runs tests for margcost

t_miqps_matpower

runs tests for miqps_matpower

t_modcost

runs tests for modcost

t_mpoption

runs tests for mpoption

t_nested_struct_copy

runs tests for nested_struct_copy

t_off2case

runs tests for off2case

t_opf_model

runs tests for opf_model and opt_model objects

t_opf_model_legacy

runs tests for opf_model and opt_model objects using legacy (deprecated) add_constraints method

t_printpf

runs tests for printpf

t_psse

runs tests for psse2mpc and related functions

t_qps_matpower

runs tests for qps_matpower

t_runmarket

runs tests for runmarket

t_scale_load

runs tests for scale_load

t_total_load

runs tests for total_load

t_totcost

runs tests for totcost

Requires the installation of an optional package. See Appendix G for details on the corresponding package. While test_most is listed here with other tests, it is actually located in <MATPOWER>/most/lib/t, not <MATPOWER>/lib/t. MOST and its supporting files and functions in the most/ sub-directory are documented in the MOST User’s Manual and listed in its Appendix ??.

Table D-28:Matpower Power Flow, CPF and OPF Tests
name

description

t_pf

runs tests for AC and DC power flow

t_pf_radial

runs tests for AC power flow for radial distribution systems

t_cpf

runs tests for AC continuation power flow

t_cpf_cb1

example CPF callback function for t_cpf

t_cpf_cb2

example CPF callback function with cb_args for t_cpf

t_opf_dc_bpmpd

runs tests for DC OPF solver using BPMPD_MEX

t_opf_dc_clp

runs tests for DC OPF solver using CLP

t_opf_dc_cplex

runs tests for DC OPF solver using CPLEX

t_opf_dc_glpk

runs tests for DC OPF solver using GLPK

t_opf_dc_gurobi

runs tests for DC OPF solver using Gurobi

t_opf_dc_ipopt

runs tests for DC OPF solver using Ipopt

t_opf_dc_mosek

runs tests for DC OPF solver using MOSEK

t_opf_dc_ot

runs tests for DC OPF solver using Matlab Opt Toolbox

t_opf_dc_mips

runs tests for DC OPF solver using MIPS

t_opf_dc_mips_sc

runs tests for DC OPF solver using MIPS-sc

t_opf_default

runs tests for AC OPF solver using default solver

t_opf_fmincon

runs tests for AC OPF solver using fmincon

t_opf_ipopt

runs tests for AC OPF solver using Ipopt

t_opf_knitro

runs tests for AC OPF solver using Artelys Knitro

t_opf_minopf

runs tests for AC OPF solver using MINOPF

t_opf_mips

runs tests for AC OPF solver using MIPS

t_opf_mips_sc

runs tests for AC OPF solver using MIPS-sc

t_opf_softlims

runs tests for DC OPF with user callback functions for branch flow soft limits

t_opf_tspopf_pdipm

runs tests for AC OPF solver using PDIPM

t_opf_tspopf_scpdipm

runs tests for AC OPF solver using SC-PDIPM

t_opf_tspopf_tralm

runs tests for AC OPF solver using TRALM

t_opf_userfcns

runs tests for AC OPF with user callback functions for reserves and interface flow limits

t_runopf_w_res

runs tests for AC OPF with fixed reserve requirements

t_dcline

runs tests for DC line implementation in toggle_dcline

t_vdep_load

runs PF, CPF and OPF tests for voltage dependent (ZIP) loads

Requires the installation of an optional package. See Appendix G for details on the corresponding package.