Improved jacobian computation - #3265
Draft
SouthEndMusic wants to merge 27 commits into
Draft
SouthEndMusic wants to merge 27 commits into
SouthEndMusic wants to merge 27 commits into
Conversation
Cause: the assertion `upper_bound_hit == flow_rate .>= 9.0` is a knife-edge float comparison. `get_bounds_hit` in `allocation_util.jl:562` compares the *scaled* optimization variable to its bound exactly, while the written `flow_rate` is `value * scaling.flow`. At one timestep (2020-06-05) the solver value was a few ulps below the bound, but the scaled product rounded to exactly 9.0 — so 1 of 1096 rows disagreed. Test now checks the flag is only set at the max flow rate, and tolerates a couple of ulp-level misses at the bound. It passes.
…ltares/Ribasim into improved_jacobian_computation
SouthEndMusic
marked this pull request as draft
September 15, 2026 08:40
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.
Fixes #3233