Add more analysis options to the API (issue #425)

This commit is contained in:
Lew Rossman
2019-04-03 21:17:28 -04:00
parent f63df92e52
commit 3e733f5a2a
5 changed files with 140 additions and 20 deletions

View File

@@ -23,10 +23,11 @@ BOOST_FIXTURE_TEST_CASE(test_anlys_getoption, FixtureOpenClose)
{
int i;
std::vector<double> test(12);
std::vector<double> test(23);
double *array = test.data();
std::vector<double> ref = {40.0, 0.001, 0.01, 0.5, 1.0, 0.0, 0.0, 0.0, 75.0, 0.0, 0.0, 0.0};
std::vector<double> ref = {40.0, 0.001, 0.01, 0.5, 1.0, 0.0, 0.0, 0.0, 75.0, 0.0, 0.0, 0.0,
1.0, 1.0, 10.0, 2.0, 10.0, 0.0, 1.0, 1.0, 1.0, 1.0, 0.0};
error = EN_solveH(ph);
BOOST_REQUIRE(error == 0);
@@ -35,7 +36,7 @@ BOOST_FIXTURE_TEST_CASE(test_anlys_getoption, FixtureOpenClose)
BOOST_REQUIRE(error == 0);
for (i=EN_TRIALS; i<=EN_DEMANDCHARGE; i++) {
for (i=EN_TRIALS; i<=EN_CONCENLIMIT; i++) {
error = EN_getoption(ph, i, array++);
BOOST_REQUIRE(error == 0);
}
@@ -43,7 +44,7 @@ BOOST_FIXTURE_TEST_CASE(test_anlys_getoption, FixtureOpenClose)
BOOST_CHECK_EQUAL_COLLECTIONS(ref.begin(), ref.end(), test.begin(), test.end());
double temp;
error = EN_getoption(ph, 18, &temp);
error = EN_getoption(ph, 25, &temp);
BOOST_CHECK(error == 251);
}