You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update from_epanet docstring and network.qmd for the new breakpoints
Rewrites the from_epanet docstring's Notes section and the qmd's "EPANET
reach geometry is limited" callout to describe the new behavior: a
reach's single synthetic gridpoint duplicated into two breakpoints (one
at each end), addressable by distance where reach.length is known and
otherwise only via ReachObservation/recall(), plus the resx reach-quantity
merge. Drops the closed#680 reference now that it describes the fix
rather than the gap.
Copy file name to clipboardExpand all lines: docs/user-guide/network.qmd
+4-5Lines changed: 4 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -226,13 +226,12 @@ sorted(
226
226
::: {.callout-warning}
227
227
## EPANET reach geometry is limited
228
228
229
-
EPANET is a link-node model, and mikeio1d reports no length and a single synthetic gridpoint for each reach. So for an EPANET network:
229
+
EPANET is a link-node model, and mikeio1d reports a single synthetic gridpoint for each reach, not tied to either end. That gridpoint is duplicated into two breakpoints, one at each end of the reach, so its own quantities (`Flow`, `Velocity`, ...) reach `find()`/`recall()`/`ReachObservation` the same way a MIKE reach's end data already does. So for an EPANET network:
230
230
231
-
* without `inp=`, every edge of `network.graph` has `length=None`. A length-weighted `networkx` call then fails rather than returning a meaningless number — shortest-path treats the edge as unreachable, and anything that sums the weights raises `TypeError`. The attribute is always present, since `networkx` defaults a missing weight to `1`. With `inp=`, only pumps and valves stay `None`, since `[PIPES]` is the one section carrying lengths
232
-
* reaches have no breakpoints, so a `ReachObservation` cannot be matched — use `NodeObservation` instead
233
-
*`find(reach=..., distance=<number>)` never resolves; only `distance="start"` and `distance="end"` work
231
+
* without `inp=`, a reach's length is unknown, so only its first breakpoint (`distance=0.0`) is real; the second isn't addressable by a number at all — `find(reach=..., distance=<number>)` only resolves it via `distance="start"`/`"end"` (which return the node, not the breakpoint). The corresponding edges of `network.graph` are `length=None` — a length-weighted `networkx` call then fails rather than returning a meaningless number, since shortest-path treats a `None`-weight edge as unreachable and anything that sums the weights raises `TypeError`
232
+
* with `inp=`, a pipe's second breakpoint sits at its full length, and the edge between the two breakpoints carries that real length. Pumps and valves keep an unaddressable second breakpoint even with `inp=`, since `[PIPES]` is the only section carrying lengths
234
233
235
-
For the same reason, `resx=` merges node quantities only. Its reach-level quantities — pump energy, efficiency and costs — have no breakpoint to live on, which is tracked in [#680](https://github.com/DHI/modelskill/issues/680).
234
+
`resx=`'s reach-level quantities — pump energy, efficiency and costs — merge onto the matching reach's breakpoints the same way its node quantities merge onto nodes.
236
235
237
236
Node timeseries, `to_dataframe()`, `to_dataset()`, `find(node=...)` and `recall()` are unaffected.
0 commit comments