Summary
from_res1d can't reach EPANET link quantities, because EPANET-style water distribution links never get a breakpoint to match against.
Root cause
Res1DReach.__init__ (src/modelskill/model/adapters/_res1d.py:77-109) only creates intermediate breakpoints when a reach has more than 2 gridpoints:
intermediate_gridpoints = (
reach.gridpoints[1:-1] if len(reach.gridpoints) > 2 else [] # line 95-97
)
EPANET-style links typically have exactly 2 gridpoints (start and end only, no intermediate H-points), so intermediate_gridpoints is always empty and Res1DReach.breakpoints is always [] for these links. As a result, NetworkModelResult._extract_reach (src/modelskill/model/network.py:212-281) can never find data to match a ReachObservation against such a link, and always falls through to the ValueError at lines 277-281.
Request
Treat a 2-gridpoint reach as having one implicit mid-reach breakpoint. This fits the existing ReachBreakPoint/BasicReach data model without changing it. A proof of concept for this already exists.
Relevant extension points
ReachBreakPoint (src/modelskill/network.py:81-138)
BasicReach (network.py:270-323)
Found by a test user evaluating the network functionality ahead of a 1.4.0 release.
Summary
from_res1dcan't reach EPANET link quantities, because EPANET-style water distribution links never get a breakpoint to match against.Root cause
Res1DReach.__init__(src/modelskill/model/adapters/_res1d.py:77-109) only creates intermediate breakpoints when a reach has more than 2 gridpoints:EPANET-style links typically have exactly 2 gridpoints (start and end only, no intermediate H-points), so
intermediate_gridpointsis always empty andRes1DReach.breakpointsis always[]for these links. As a result,NetworkModelResult._extract_reach(src/modelskill/model/network.py:212-281) can never find data to match aReachObservationagainst such a link, and always falls through to theValueErrorat lines 277-281.Request
Treat a 2-gridpoint reach as having one implicit mid-reach breakpoint. This fits the existing
ReachBreakPoint/BasicReachdata model without changing it. A proof of concept for this already exists.Relevant extension points
ReachBreakPoint(src/modelskill/network.py:81-138)BasicReach(network.py:270-323)Found by a test user evaluating the network functionality ahead of a 1.4.0 release.