Pre-calculate flow neighbor IDs for Pump, Outlet, UserDemand, FractionalFlow, TabulatedRatingCurve#1448
Merged
SouthEndMusic merged 8 commits intomainfrom May 7, 2024
Merged
Pre-calculate flow neighbor IDs for Pump, Outlet, UserDemand, FractionalFlow, TabulatedRatingCurve#1448SouthEndMusic merged 8 commits intomainfrom
SouthEndMusic merged 8 commits intomainfrom
Conversation
Because after Parameter construction is too late now, since we cannot put wrong neighbors in the structs anymore. So instead do the validation on the graph.
Member
Author
|
This was a bit more involved. With the new additions to the structs we can no longer create Parameters with the wrong number of nodes, breaking the validation tests for this. So I had to move the neighbor validation earlier, directly after graph construction. |
visr
commented
May 3, 2024
Member
Author
There was a problem hiding this comment.
Removed this since we already have a nodetypes::Vector{Symbol} for similar purposes. For that I also added a test.
Member
Author
There was a problem hiding this comment.
This model is not used to test neighbor counts, so I had to add a missing outflow edge to allow the construction of Parameters.
| if nodetype != :Terminal | ||
| # It has a struct which is added to Parameters | ||
| T = getproperty(Ribasim, nodetype) | ||
| @test T <: AbstractParameterNode |
Collaborator
There was a problem hiding this comment.
Nice, lack of this gave some problems before
SouthEndMusic
approved these changes
May 7, 2024
3 tasks
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.
Takes another chunk out of #889
Also does some refactoring to make the solve methods more uniform.