Skip to content

Improved jacobian computation - #3265

Draft
SouthEndMusic wants to merge 27 commits into
mainfrom
improved_jacobian_computation
Draft

SouthEndMusic wants to merge 27 commits into
mainfrom
improved_jacobian_computation

Conversation

@SouthEndMusic

Copy link
Copy Markdown
Collaborator

Fixes #3233

SouthEndMusic and others added 24 commits August 31, 2026 16:28
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.
@SouthEndMusic
SouthEndMusic marked this pull request as draft September 15, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split improved Jacobian computation from #3191

2 participants