Skip to content

Commit

Permalink
Always check mingen against maxPower, regardless of reservoirManageme…
Browse files Browse the repository at this point in the history
…nt (#1656)

* checkHourlyMinGeneration - check in all cases

* fix comments
  • Loading branch information
Milos-RTEi authored Oct 4, 2023
1 parent 0d3b342 commit 8a43ff2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/solver/hydro/management/management.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ bool HydroManagement::checkWeeklyMinGeneration(uint tsIndex, Data::Area& area) c

bool HydroManagement::checkHourlyMinGeneration(uint tsIndex, Data::Area& area) const
{
// Hourly minimum generation <= hourly inflows for each hour
// Hourly minimum generation <= hourly max generation for each hour
auto& mingenmatrix = area.hydro.series->mingen;
auto const& srcmingen = mingenmatrix[tsIndex < mingenmatrix.width ? tsIndex : 0];
auto const& maxPower = area.hydro.maxPower;
Expand Down Expand Up @@ -350,8 +350,7 @@ bool HydroManagement::checkMinGeneration(uint numSpace, uint year) const
bool followLoadModulations = area.hydro.followLoadModulations;
bool reservoirManagement = area.hydro.reservoirManagement;

if (!reservoirManagement)
ret = checkHourlyMinGeneration(tsIndex, area) && ret;
ret = checkHourlyMinGeneration(tsIndex, area) && ret;

if (!useHeuristicTarget)
return;
Expand Down

0 comments on commit 8a43ff2

Please sign in to comment.