Skip to content

Finetune step_limiter!#1912

Merged
SouthEndMusic merged 12 commits into
mainfrom
limiter3
Oct 25, 2024
Merged

Finetune step_limiter!#1912
SouthEndMusic merged 12 commits into
mainfrom
limiter3

Conversation

@SouthEndMusic

@SouthEndMusic SouthEndMusic commented Oct 21, 2024

Copy link
Copy Markdown
Collaborator

Follow-up of #1911.

Fixes #1897 (?).

Fixes #1838 (how could we test that negative flows where they should not be no longer occur? Maybe add a callback that explicitly checks for non-decreasing states)

I focus in this PR on UserDemand inflow and infiltration because of their importance in coupling.

@SouthEndMusic

Copy link
Copy Markdown
Collaborator Author

@evetion you might appreciate this first commit; it gets rid of many of the magic hardcoded numbers for threshold values.

@SouthEndMusic

SouthEndMusic commented Oct 21, 2024

Copy link
Copy Markdown
Collaborator Author

@rleander this is an interesting one for you, this one together with #1911 should fix the problems you noticed, in particular: infiltration and realized user demand should no longer drift away from their demands as the simulation goes on (when the basin does not run dry).

@SouthEndMusic SouthEndMusic requested a review from evetion October 24, 2024 08:28

@evetion evetion left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some general comments:

For the next time, please refactor in separate PR's, mixing it makes the PR and the git history in the future hard to read. I do like the refactor, tackling the magic numbers and the basin complexity 👍🏻.

Could you provide a comment in the PR description on what you introduce and why? I'll give more detailed comments in the code below.

After reading it completely, my main confusion is that we clamp the minimum flow out of a basin and not the maximum flow? I thought the reduction factors trigger so a (maximum) flow cannot empty a basin.

Comment thread core/src/util.jl
Comment thread core/src/model.jl
Comment thread core/src/parameter.jl
Comment thread core/src/parameter.jl
Comment thread core/src/parameter.jl
Comment thread core/src/solve.jl
Comment thread core/test/utils_test.jl
Comment thread core/src/solve.jl
Comment thread core/src/solve.jl
Comment thread core/src/util.jl Outdated
@SouthEndMusic SouthEndMusic merged commit 201b18f into main Oct 25, 2024
@SouthEndMusic SouthEndMusic deleted the limiter3 branch October 25, 2024 11:59
@visr visr mentioned this pull request Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Taming cumulative flows Document known issue: (small) negative flows from e.g. Terminals

3 participants