From 8a43ff2cf9ee2903c9c3c2d88d37c601b1b88a5d Mon Sep 17 00:00:00 2001 From: Milos <97689304+Milos-RTEi@users.noreply.github.com> Date: Wed, 4 Oct 2023 16:19:58 +0200 Subject: [PATCH] Always check mingen against maxPower, regardless of reservoirManagement (#1656) * checkHourlyMinGeneration - check in all cases * fix comments --- src/solver/hydro/management/management.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/solver/hydro/management/management.cpp b/src/solver/hydro/management/management.cpp index a0869b5055..f0ae5d1711 100644 --- a/src/solver/hydro/management/management.cpp +++ b/src/solver/hydro/management/management.cpp @@ -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; @@ -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;