Home > matpower7.0 > extras > smartmarket > test_smartmarket.m

test_smartmarket

PURPOSE ^

TEST_SMARTMARKET Run all MATPOWER smartmarket tests.

SYNOPSIS ^

function success = test_smartmarket(verbose, exit_on_fail)

DESCRIPTION ^

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

   Runs all MATPOWER smartmarket 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_smartmarket(verbose, exit_on_fail)
0002 %TEST_SMARTMARKET  Run all MATPOWER smartmarket tests.
0003 %   TEST_SMARTMARKET
0004 %   TEST_SMARTMARKET(VERBOSE)
0005 %   TEST_SMARTMARKET(VERBOSE, EXIT_ON_FAIL)
0006 %   SUCCESS = TEST_SMARTMARKET(...)
0007 %
0008 %   Runs all MATPOWER smartmarket 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-2019, Power Systems Engineering Research Center (PSERC)
0017 %   by Ray Zimmerman, PSERC Cornell
0018 %
0019 %   This file is part of MATPOWER Extras.
0020 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0021 %   See https://github.com/MATPOWER/matpower-extras 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 %% smartmarket tests
0033 tests{end+1} = 't_off2case';
0034 if have_fcn('minopf')
0035     tests{end+1} = 't_auction_minopf';
0036 end
0037 tests{end+1} = 't_auction_mips';
0038 if have_fcn('pdipmopf')
0039     tests{end+1} = 't_auction_tspopf_pdipm';
0040 end
0041 tests{end+1} = 't_runmarket';
0042 
0043 %% run the tests
0044 all_ok = t_run_tests( tests, verbose );
0045 
0046 %% handle success/failure
0047 if exit_on_fail && ~all_ok
0048     exit(1);
0049 end
0050 if nargout
0051     success = all_ok;
0052 end

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