Repository navigation
Fix bounded solves that stall at interior roots - #1152
Closed
ChrisRackauckas-Claude wants to merge 1 commit into
Closed
ChrisRackauckas-Claude wants to merge 1 commit into
ChrisRackauckas-Claude wants to merge 1 commit into
Conversation
Co-Authored-By: Chris Rackauckas <[email protected]>
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.
What changed
Bounded nonlinear solves that stall in the finite-bound logit transform now retry from a strict interior point derived from the original initial state. The original bounded
u0is preserved for the retry and returned solution metadata. Near-tolerance stalled results are normalized toSuccess.This addresses SciML/NonlinearSolve.jl#1147, where the provided problem has an interior root but bounded solves stalled with residuals around
0.31.Root cause
The finite-bound coordinate transformation can place the solver in a stalled basin even when a root exists strictly inside the box. The retry gives the solver an interior starting point while retaining the original bounded problem semantics.
Verification
masterreturnedStalledfor finite lower/upper bounds; the two-sided case had residual0.3099287660638202.julia --startup-file=no --project=. -e 'using Test; include("test/Core/bounds_tests__item4.jl")'→15passed,15total.GROUP=QA julia --startup-file=no --project=. -e 'using Pkg; Pkg.test()'→28passed,28total.Successwith residual below1e-8for the default solver,NewtonRaphson,TrustRegion,Broyden, andLevenbergMarquardt.git diff --check, andtyposover the PR diff pass.Not verified
The full
Coregroup reaches a pre-existing allocation assertion (61.76 < 48) that reproduces on cleanmaster; no unrelated change was made for it. The repository-wide spelling scan also reports an existing typo outside this PR. No docs build was run because this change adds no public API or documentation.Please ignore this PR until reviewed by @ChrisRackauckas.