Explicitly set demant patterns for junctions
This is since there is currently no way to set the default demand pattern. Should be fixed in #280 and then the test can be changed.
This commit is contained in:
@@ -90,6 +90,10 @@ BOOST_AUTO_TEST_CASE(test_net_builder)
|
||||
|
||||
error = EN_createproject(&ph);
|
||||
error = EN_init(ph, "net.rpt", "net.out", EN_GPM, EN_HW);
|
||||
error = EN_addpattern(ph, "1");
|
||||
BOOST_REQUIRE(error == 0);
|
||||
error = EN_setpattern(ph, 1, P, 12);
|
||||
BOOST_REQUIRE(error == 0);
|
||||
for (i = 0; i < 9; i++)
|
||||
{
|
||||
error = EN_addnode(ph, juncs[i], EN_JUNCTION);
|
||||
@@ -100,6 +104,8 @@ BOOST_AUTO_TEST_CASE(test_net_builder)
|
||||
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);
|
||||
BOOST_REQUIRE(error == 0);
|
||||
}
|
||||
error = EN_addnode(ph, "9", EN_RESERVOIR);
|
||||
BOOST_REQUIRE(error == 0);
|
||||
@@ -168,10 +174,6 @@ BOOST_AUTO_TEST_CASE(test_net_builder)
|
||||
error = EN_setheadcurveindex(ph, ind, 1);
|
||||
BOOST_REQUIRE(error == 0);
|
||||
|
||||
error = EN_addpattern(ph, "1");
|
||||
BOOST_REQUIRE(error == 0);
|
||||
error = EN_setpattern(ph, 1, P, 12);
|
||||
BOOST_REQUIRE(error == 0);
|
||||
error = EN_settimeparam(ph, EN_DURATION, 24*3600);
|
||||
BOOST_REQUIRE(error == 0);
|
||||
error = EN_settimeparam(ph, EN_PATTERNSTEP, 2*3600);
|
||||
|
||||
Reference in New Issue
Block a user