Support transient user demand return factor#1727
Merged
Conversation
Collaborator
SouthEndMusic
left a comment
There was a problem hiding this comment.
Looking good! You should test it by having a simple model without allocation with a transient return factor
core/test/run_models_test.jl
Outdated
| @test only(model.integrator.sol(150day)) ≈ 900 atol = 5 | ||
| # dynamic UserDemand withdraws to 0.5m/509m3 | ||
| @test only(model.integrator.sol(180day)) ≈ 509 atol = 1 | ||
| # dynamic UserDemand withdraws to 0.5m/503m3 |
Collaborator
There was a problem hiding this comment.
This is still too coarse a test. You should have a look at DataFrame(Ribasim.flow_table(model)), and check whether the outflow to inflow proportion matches your transient return factor
Contributor
Author
There was a problem hiding this comment.
Timepoint at 179day show a return ratio of 0.197ish and return factor is 0.2
Collaborator
|
I made some modifications to the test model so that:
|
SouthEndMusic
approved these changes
Aug 19, 2024
Collaborator
SouthEndMusic
left a comment
There was a problem hiding this comment.
I had one last remark, other than that this is good to if you agree with my changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1230