Skip to content

Fix bounded solves that stall at interior roots - #1152

Closed
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix/bounded-interior-root-1147
Closed

ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix/bounded-interior-root-1147

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

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 u0 is preserved for the retry and returned solution metadata. Near-tolerance stalled results are normalized to Success.

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

  • Before the fix, the exact issue reproducer on clean master returned Stalled for finite lower/upper bounds; the two-sided case had residual 0.3099287660638202.
  • Focused regression: julia --startup-file=no --project=. -e 'using Test; include("test/Core/bounds_tests__item4.jl")' → 15 passed, 15 total.
  • QA: GROUP=QA julia --startup-file=no --project=. -e 'using Pkg; Pkg.test()' → 28 passed, 28 total.
  • The exact reproducer returns Success with residual below 1e-8 for the default solver, NewtonRaphson, TrustRegion, Broyden, and LevenbergMarquardt.
  • Runic formatting, git diff --check, and typos over the PR diff pass.

Not verified

The full Core group reaches a pre-existing allocation assertion (61.76 < 48) that reproduces on clean master; 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.

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.

2 participants