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

Validate uniqueness of Node table in core #1256

Closed
Tracked by #1318
visr opened this issue Mar 13, 2024 · 2 comments · Fixed by #1513
Closed
Tracked by #1318

Validate uniqueness of Node table in core #1256

visr opened this issue Mar 13, 2024 · 2 comments · Fixed by #1513
Labels
validation Related to model validation

Comments

@visr
Copy link
Member

visr commented Mar 13, 2024

Having a duplicate edge (#1255), results in a late error while writing results. We should add validation code to check for duplicates in the Node and Edge tables.

For Node this means the combination of node_type and node_id must be unique.
For Edge this means the combination of from_node_type, from_node_id, to_node_type and to_node_id must be unique.

@visr visr added the validation Related to model validation label Mar 13, 2024
@SouthEndMusic
Copy link
Collaborator

I noticed that this gave problems in the core, so I added this in my flow_demand branch for duplicate edges:

https://github.com/Deltares/Ribasim/blob/d6ff7af2ee6e46e6ae96d709a5411e608d9548f7/core/src/graph.jl#L81C1-L84C12

@visr visr changed the title Validate uniqueness for Node and Edge tables in core Validate uniqueness of Node table in core Mar 14, 2024
@visr
Copy link
Member Author

visr commented Mar 14, 2024

Great, I updated the issue to just cover the Node case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validation Related to model validation
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants