Skip to content

Commit

Permalink
Fix hydro level discontinuities (#491)
Browse files Browse the repository at this point in the history
* Fix hydro level discontinuities

Level is between 0 and capacity, not 0 and 1.

* Small fix based on discussions
  • Loading branch information
flomnes committed Jan 5, 2022
1 parent 696d8cc commit df1cdf2
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/solver/simulation/sim_structure_probleme_economique.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,12 +366,6 @@ class computeTimeStepLevel

level = level + inflows[step] - turb[step] + pumpRatio * pump[step];

if (Yuni::Math::Zero(level))
level = 0.;

if (Yuni::Math::Zero(1. - level))
level = capacity;

if (level > capacity)
{
ovf[step] = level - capacity;
Expand Down

0 comments on commit df1cdf2

Please sign in to comment.