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

add realized user demand and expose via BMI #1190

Merged
merged 10 commits into from
Feb 29, 2024
Merged

add realized user demand and expose via BMI #1190

merged 10 commits into from
Feb 29, 2024

Conversation

SouthEndMusic
Copy link
Collaborator

@SouthEndMusic SouthEndMusic commented Feb 28, 2024

Fixes #1098.

@visr @HendrikKok would it be OK if realized is not an average but a cumulative volume and resetting it to 0.0 is the responsibility of the coupler? Otherwise we need a discussion about where in the Ribasim code these things must happen in such a way that dividing by the time interval happens before realized is accessed and resetting afterwards.

Also good to know that demand is per user per priority, but realized is only per user.

For BMI variable name upgrade instructions see:

https://github.com/Deltares/Ribasim/pull/1190/files#diff-88d699c34d26c16edb268bdacbda2afb8dad704b8db2931a83e04b9ca52dc31a.

@visr
Copy link
Member

visr commented Feb 28, 2024

would it be OK if realized is not an average but a cumulative volume and resetting it to 0.0 is the responsibility of the coupler?

I think that would be ok. But realized should (in a separate PR) also be added to the results. That can only work if we save two copies of the vector in memories, one for BMI and one for results, to prevent setting it to zero every saveat. That is why we have #1189. With that one vector is enough, and we can directly serve averages over BMI.

core/src/callback.jl Outdated Show resolved Hide resolved
core/src/callback.jl Outdated Show resolved Hide resolved
This was linked to issues Feb 29, 2024
@visr visr mentioned this pull request Feb 29, 2024
@visr visr merged commit 93366cb into main Feb 29, 2024
21 checks passed
@visr visr deleted the expose_user_realized branch February 29, 2024 18:30
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.

Namespace BMI variable string Lock BMI to saveat period Add user.realized and expose via BMI
2 participants