From dd72f6f4974d17677d671140390cf76afb6e7b6b Mon Sep 17 00:00:00 2001 From: nikolaredstork Date: Thu, 28 Nov 2024 17:39:17 +0100 Subject: [PATCH] Refactor hydro reservoir levels check --- src/libs/antares/study/parts/hydro/container.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/antares/study/parts/hydro/container.cpp b/src/libs/antares/study/parts/hydro/container.cpp index 6ee131b4f3..d4c33b8954 100644 --- a/src/libs/antares/study/parts/hydro/container.cpp +++ b/src/libs/antares/study/parts/hydro/container.cpp @@ -355,8 +355,8 @@ bool PartHydro::checkReservoirLevels(const Study& study) for (unsigned int day = 0; day < DAYS_PER_YEAR; day++) { if (!errorLevels - && (colMin[day] < 0 || colAvg[day] < 0 || colMin[day] > colMax[day] - || colAvg[day] > 100 || colMax[day] > 100)) + && (0 > colMin[day] || colMin[day] > colAvg[day] || colAvg[day] > colMax[day] + || colMax[day] > 100)) { logs.error() << areaName << ": invalid reservoir level value"; errorLevels = true;