Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hydro Reservoir Levels Check #2513

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libs/antares/study/parts/hydro/container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@flomnes Also, variables colMin[day], colMax[day], colAvg[day] contains values between 0-1, so comparing values with 100 is a bug, we need to compare it with 1.
Would you be able to confirm that?

{
logs.error() << areaName << ": invalid reservoir level value";
errorLevels = true;
Expand Down
Loading