merging upstream dev

This commit is contained in:
Michael Tryby
2019-04-03 16:40:58 -04:00
11 changed files with 46 additions and 98 deletions

View File

@@ -23,10 +23,10 @@ BOOST_FIXTURE_TEST_CASE(test_anlys_getoption, FixtureOpenClose)
{
int i;
std::vector<double> test(13);
std::vector<double> test(12);
double *array = test.data();
std::vector<double> ref = {40.0, 0.001, 0.01, 0.5, 1.0, 0.0, 0.0, 1.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};
error = EN_solveH(ph);
BOOST_REQUIRE(error == 0);

View File

@@ -132,8 +132,8 @@ BOOST_FIXTURE_TEST_CASE(test_build_net1, FixtureInitClose)
BOOST_REQUIRE(error == 0);
error = EN_setpattern(ph, 1, P, 12);
BOOST_REQUIRE(error == 0);
error = EN_setoption(ph, EN_DEFDEMANDPAT, 1);
BOOST_REQUIRE(error == 0);
//error = EN_setoption(ph, EN_DEFDEMANDPAT, 1);
//BOOST_REQUIRE(error == 0);
for (i = 0; i < 9; i++)
{
error = EN_addnode(ph, juncs[i], EN_JUNCTION);
@@ -142,6 +142,8 @@ BOOST_FIXTURE_TEST_CASE(test_build_net1, FixtureInitClose)
BOOST_REQUIRE(error == 0);
error = EN_setnodevalue(ph, i + 1, EN_BASEDEMAND, d[i]);
BOOST_REQUIRE(error == 0);
error = EN_setnodevalue(ph, i+1, EN_PATTERN, 1);
BOOST_REQUIRE(error == 0);
error = EN_setcoord(ph, i + 1, X[i], Y[i]);
BOOST_REQUIRE(error == 0);
//error = EN_setdemandpattern(ph, i + 1, 1, 1);

View File

@@ -33,12 +33,9 @@ BOOST_AUTO_TEST_CASE(add_set_pattern)
error = EN_open(ph, path_inp.c_str(), path_rpt.c_str(), "");
BOOST_REQUIRE(error == 0);
// Get the default pattern index
double dblPatIdx;
int defPatIdx;
// Assign the default pattern index
int defPatIdx = 1;
int patIdx;
EN_getoption(ph, EN_DEFDEMANDPAT, &dblPatIdx);
defPatIdx = (int)dblPatIdx;
// Rename the default pattern
EN_setpatternid(ph, defPatIdx, (char *)"Pat1");