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

Allocate to UserDemand from directly connected basin if possible #1581

Merged
merged 13 commits into from
Jul 23, 2024

Conversation

SouthEndMusic
Copy link
Collaborator

@SouthEndMusic SouthEndMusic commented Jun 25, 2024

Fixes #1545

Some notes on this PR:

  • This still only works when the Basin upstream of a UserDemand has a level demand to define the source capacity of the basin
  • It makes sense that this flow from the Basin to the UserDemand also shows up in allocation_flow.arrow, which requires some refactoring. That is fine though, as that refactor is needed anyway for Optimize allocation per source in a fixed order #565, where we probably want to aggregate the allocation flows for output over the optimizations for all sources in stead of saving them per source
  • I'm not sure how to directly test this

@SouthEndMusic SouthEndMusic requested a review from visr June 25, 2024 14:40
core/src/allocation_optim.jl Outdated Show resolved Hide resolved
@visr
Copy link
Member

visr commented Jul 2, 2024

This still only works when the Basin upstream of a UserDemand has a level demand to define the source capacity of the basin

Link to discussion: #1428 (comment)

We should directly test this since it will have a large impact on results. Would a UserDemand - Basin - LevelDemand model suffice, with only initial storage?

This behavior probably also needs to be in the user docs, probably https://deltares.github.io/Ribasim/reference/node/user-demand.html, maybe https://deltares.github.io/Ribasim/concept/allocation.html.

@SouthEndMusic SouthEndMusic requested a review from visr July 17, 2024 10:02
@visr visr merged commit c2824b5 into main Jul 23, 2024
25 checks passed
@visr visr deleted the allocate_from_connected_basin branch July 23, 2024 12:59
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.

For UserDemand, first use the available capacity in the directly connected basin
2 participants