Skip to content

Commit

Permalink
[DEV] code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
payetvin committed Oct 19, 2023
1 parent 2b3a3e9 commit f18ca5e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class TimeSeries
using TSNumbers = Matrix<uint32_t>;
using TS = Matrix<double>;

TimeSeries(TSNumbers& tsNumbers);
explicit TimeSeries(TSNumbers& tsNumbers);
/*!
** \brief Load series from a file
**
Expand Down
4 changes: 2 additions & 2 deletions src/solver/hydro/management/management.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ bool HydroManagement::checkYearlyMinGeneration(uint numSpace, uint year, const D
return true;
}

bool HydroManagement::checkWeeklyMinGeneration(uint year, Data::Area& area) const
bool HydroManagement::checkWeeklyMinGeneration(uint year, const Data::Area& area) const
{
auto const& srcinflows = area.hydro.series->storage.getColumn(year);
auto const& srcmingen = area.hydro.series->mingen.getColumn(year);
Expand Down Expand Up @@ -295,7 +295,7 @@ bool HydroManagement::checkWeeklyMinGeneration(uint year, Data::Area& area) cons
return true;
}

bool HydroManagement::checkHourlyMinGeneration(uint year, Data::Area& area) const
bool HydroManagement::checkHourlyMinGeneration(uint year, const Data::Area& area) const
{
// Hourly minimum generation <= hourly inflows for each hour
auto const& srcmingen = area.hydro.series->mingen.getColumn(year);
Expand Down
4 changes: 2 additions & 2 deletions src/solver/hydro/management/management.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ class HydroManagement final
//! check Yearly minimum generation is lower than available inflows
bool checkYearlyMinGeneration(uint numSpace, uint tsIndex, const Data::Area& area) const;
//! check Weekly minimum generation is lower than available inflows
bool checkWeeklyMinGeneration(uint tsIndex, Data::Area& area) const;
bool checkWeeklyMinGeneration(uint tsIndex, const Data::Area& area) const;
//! check Hourly minimum generation is lower than available inflows
bool checkHourlyMinGeneration(uint tsIndex, Data::Area& area) const;
bool checkHourlyMinGeneration(uint tsIndex, const Data::Area& area) const;
//! check minimum generation is lower than available inflows
bool checkMinGeneration(uint numSpace, uint year) const;
//! Prepare the net demand for each area
Expand Down

0 comments on commit f18ca5e

Please sign in to comment.