Skip to content

Allow max 1 outflow neighbour for FlowBoundary#2192

Merged
visr merged 5 commits intomainfrom
flow-to-one
Mar 31, 2025
Merged

Allow max 1 outflow neighbour for FlowBoundary#2192
visr merged 5 commits intomainfrom
flow-to-one

Conversation

@visr
Copy link
Member

@visr visr commented Mar 31, 2025

Fixes #2072. It was possible to let one FlowBoundary flow into multiple Basins. This is no longer allowed, so this is a breaking change. As far as I know it wasn't used though. It is quite confusing to have multiple outflow neighbours, because a Q at the FlowBoundary that goes to n Basins then becomes a nQ total inflow. And usually a FlowBoundary represents a single physical inflow point, that should always go to one point only.

The LevelBoundary can still be connected via resistance nodes to multiple Basins, but this makes sense when representing e.g. the sea.

visr added 3 commits March 31, 2025 14:08
Fixes #2072. It was possible to let one FlowBoundary flow into multiple Basins. This is no longer allowed, so this is a breaking change. As far as I know it wasn't used though. It is quite confusing to have multiple outflow neighbours, because a Q at the FlowBoundary that goes to n Basins then becomes a nQ total inflow. And usually a FlowBoundary represents a single physical inflow point, that should always go to one point only.

The LevelBoundary can still be connected via resistance nodes to multiple Basins, but this makes sense when representing e.g. the sea.
model.basin[1],
name="duplicate",
name="multiple-outflows",
)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to come up with a link.add that triggers the unique edges validation first, but I don't think we can trigger it anymore because we'd need a from_node that supports multiple outputs and to_node that supports multiple inputs, that are allowed to be connected. I don't think that exists anymore.

@SouthEndMusic SouthEndMusic added the breaking A change that breaks existing models label Mar 31, 2025
@visr visr merged commit b7b4ce5 into main Mar 31, 2025
17 of 18 checks passed
@visr visr deleted the flow-to-one branch March 31, 2025 14:28
@visr visr mentioned this pull request Apr 14, 2025
visr added a commit that referenced this pull request Apr 15, 2025
## [v2025.3.0] - 2025-04-14

The only breaking change in this release is to disallow connecting a
single FlowBoundary to multiple Basins.
There are large improvements in the ability to visualize results on the
map in QGIS.
We also welcome the Junction node to the family, which will help laying
out networks in a recognizable manner.

### Added
- Add spatio-temporal results layers to QGIS.
[#2208](#2208)
- Add topological (straight line) link view toggle to QGIS.
[#2208](#2208)
- Added [Junction](https://ribasim.org/reference/node/junction.html)
node type. [#2175](#2175)
- Write results and log bottlenecks also on an interrupt or crash.
[#2191](#2191)
[#2200](#2200)
- Log computation time and save it to `solver_stats.arrow`.
[#2209](https://github.com/Deltares/Ribasim/pull/)
- Experimental support for writing the model network and results into
files used by Delft-FEWS,
[`model.to_fews`](`https://ribasim.org/reference/python/Model.html#ribasim.Model.to_fews`).
[#2161](#2161)
- Document
[`results/concentration.arrow`](https://ribasim.org/reference/usage.html#concentration---concentration.arrow).
[#2165](#2165)

### Changed
- Allow max 1 outflow neighbour for FlowBoundary.
[#2192](#2192)
- Automatic differentiation is enabled by default again, `autodiff =
true`, leading to better performance.
[#2137](#2137)
[#2183](#2183)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking A change that breaks existing models

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Only allow having exactly one outflow link per FlowBoundary node

2 participants