Skip to content

Commit

Permalink
End-to-end BC tests : renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
guilpier-code committed Jul 26, 2023
1 parent c615bde commit 1b94803
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ BOOST_AUTO_TEST_CASE(Hourly_BC_restricts_link_direct_capacity_to_90)
BCrhsConfig bcRHSconfig(BC, numberOfTS);

double rhsValue = 90.;
bcRHSconfig.fillTimeSeriesWith(0, rhsValue);
bcRHSconfig.fillRHStimeSeriesWith(0, rhsValue);

BCgroupScenarioBuilder bcGroupScenarioBuilder(study, nbYears);
bcGroupScenarioBuilder.yearGetsTSnumber(BC->group(), 0, 0);
Expand All @@ -156,7 +156,7 @@ BOOST_AUTO_TEST_CASE(weekly_BC_restricts_link_direct_capacity_to_50)
BCrhsConfig bcRHSconfig(BC, numberOfTS);

double rhsValue = 50.;
bcRHSconfig.fillTimeSeriesWith(0, rhsValue);
bcRHSconfig.fillRHStimeSeriesWith(0, rhsValue);

BCgroupScenarioBuilder bcGroupScenarioBuilder(study, nbYears);
bcGroupScenarioBuilder.yearGetsTSnumber(BC->group(), 0, 0);
Expand Down Expand Up @@ -184,7 +184,7 @@ BOOST_AUTO_TEST_CASE(daily_BC_restricts_link_direct_capacity_to_60)
BCrhsConfig bcRHSconfig(BC, numberOfTS);

double rhsValue = 60.;
bcRHSconfig.fillTimeSeriesWith(0, rhsValue);
bcRHSconfig.fillRHStimeSeriesWith(0, rhsValue);

BCgroupScenarioBuilder bcGroupScenarioBuilder(study, nbYears);
bcGroupScenarioBuilder.yearGetsTSnumber(BC->group(), 0, 0);
Expand All @@ -211,7 +211,7 @@ BOOST_AUTO_TEST_CASE(Hourly_BC_restricts_link_direct_capacity_to_less_than_90)
BCrhsConfig bcRHSconfig(BC, numberOfTS);

double rhsValue = 90.;
bcRHSconfig.fillTimeSeriesWith(0, rhsValue);
bcRHSconfig.fillRHStimeSeriesWith(0, rhsValue);

BCgroupScenarioBuilder bcGroupScenarioBuilder(study, nbYears);
bcGroupScenarioBuilder.yearGetsTSnumber(BC->group(), 0, 0);
Expand All @@ -237,7 +237,7 @@ BOOST_AUTO_TEST_CASE(Daily_BC_restricts_link_direct_capacity_to_greater_than_80)
BCrhsConfig bcRHSconfig(BC, numberOfTS);

double rhsValue = 80.;
bcRHSconfig.fillTimeSeriesWith(0, rhsValue);
bcRHSconfig.fillRHStimeSeriesWith(0, rhsValue);

BCgroupScenarioBuilder bcGroupScenarioBuilder(study, nbYears);
bcGroupScenarioBuilder.yearGetsTSnumber(BC->group(), 0, 0);
Expand Down Expand Up @@ -268,7 +268,7 @@ BOOST_AUTO_TEST_CASE(Hourly_BC_restricts_cluster_generation_to_90)
BCrhsConfig bcRHSconfig(BC, numberOfTS);

double rhsValue = 90.;
bcRHSconfig.fillTimeSeriesWith(0, rhsValue);
bcRHSconfig.fillRHStimeSeriesWith(0, rhsValue);

BCgroupScenarioBuilder bcGroupScenarioBuilder(study, nbYears);
bcGroupScenarioBuilder.yearGetsTSnumber(BC->group(), 0, 0);
Expand Down Expand Up @@ -300,8 +300,8 @@ BOOST_AUTO_TEST_CASE(On_year_2__RHS_TS_number_2_is_taken_into_account)
BCrhsConfig bcRHSconfig(BC, numberOfTS);
double bcGroupRHS1 = 90.;
double bcGroupRHS2 = 70.;
bcRHSconfig.fillTimeSeriesWith(0, bcGroupRHS1);
bcRHSconfig.fillTimeSeriesWith(1, bcGroupRHS2);
bcRHSconfig.fillRHStimeSeriesWith(0, bcGroupRHS1);
bcRHSconfig.fillRHStimeSeriesWith(1, bcGroupRHS2);

BCgroupScenarioBuilder bcGroupScenarioBuilder(study, nbYears);
bcGroupScenarioBuilder.yearGetsTSnumber(BC->group(), 0, 0);
Expand All @@ -327,13 +327,13 @@ BOOST_AUTO_TEST_CASE(On_year_9__RHS_TS_number_4_is_taken_into_account)

unsigned int numberOfTS = 7;
BCrhsConfig bcRHSconfig(BC, numberOfTS);
bcRHSconfig.fillTimeSeriesWith(0, 10.);
bcRHSconfig.fillTimeSeriesWith(1, 20.);
bcRHSconfig.fillTimeSeriesWith(2, 30.);
bcRHSconfig.fillTimeSeriesWith(3, 40.);
bcRHSconfig.fillTimeSeriesWith(4, 50.);
bcRHSconfig.fillTimeSeriesWith(5, 60.);
bcRHSconfig.fillTimeSeriesWith(6, 70.);
bcRHSconfig.fillRHStimeSeriesWith(0, 10.);
bcRHSconfig.fillRHStimeSeriesWith(1, 20.);
bcRHSconfig.fillRHStimeSeriesWith(2, 30.);
bcRHSconfig.fillRHStimeSeriesWith(3, 40.);
bcRHSconfig.fillRHStimeSeriesWith(4, 50.);
bcRHSconfig.fillRHStimeSeriesWith(5, 60.);
bcRHSconfig.fillRHStimeSeriesWith(6, 70.);

BCgroupScenarioBuilder bcGroupScenarioBuilder(study, nbYears);
bcGroupScenarioBuilder.yearGetsTSnumber(BC->group(), 0, 0);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/end-to-end/utils/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ BCrhsConfig::BCrhsConfig(std::shared_ptr<BindingConstraint> BC, unsigned int nbO
BC_->RHSTimeSeries().resize(nbOfTimeSeries_, 8760);
}

void BCrhsConfig::fillTimeSeriesWith(unsigned int TSnumber, double rhsValue)
void BCrhsConfig::fillRHStimeSeriesWith(unsigned int TSnumber, double rhsValue)
{
if (TSnumber >= nbOfTimeSeries_)
{
Expand Down
2 changes: 1 addition & 1 deletion src/tests/end-to-end/utils/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class BCrhsConfig
public:
BCrhsConfig() = delete;
BCrhsConfig(std::shared_ptr<BindingConstraint> BC, unsigned int nbTimeSeries);
void fillTimeSeriesWith(unsigned int TSnumber, double rhsValue);
void fillRHStimeSeriesWith(unsigned int TSnumber, double rhsValue);

private:
std::shared_ptr<BindingConstraint> BC_;
Expand Down

0 comments on commit 1b94803

Please sign in to comment.