Repository navigation
Conversation
The steady state of KPS3 and KPS4 is solved with the trust region solver of NonlinearSolve. Like the autoscaling of NLsolve, the unknowns are scaled by the column norms of the Jacobian; the scaling is updated when the solver is restarted from its last iterate. NLsolve and NLSolversBase are no longer dependencies. Closes #267 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The default manifests still contained NLsolve and its dependencies Distances, LineSearches and NLSolversBase; pruning them during Pkg.resolve() failed on CI. The manifests are resolved again, which only removes these four packages. nl_solve is added to the manual, so that makedocs does not fail with missing docs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Member
Author
|
Reported the slowdown upstream: SciML/NonlinearSolve.jl#1370 (related: SciML/NonlinearSolve.jl#425, autoscaling for TrustRegion). |
ufechner7
marked this pull request as draft
October 12, 2026 21:01
3 tasks done
This branch has not been deployed
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.
Closes #267. Supersedes #261, which is out of date with
mainand failed the KPS4 steady-state tests.Summary
find_steady_state!(KPS3 and KPS4) now solves with theTrustRegionsolver of NonlinearSolve (radius update schemeNLsolve), through a small wrappernl_solveinsrc/utils.jl. It returns the fields of the NLsolve result thatfind_steady_state!uses, so the retry and continuation logic is unchanged.autoscale(Moré column-norm scaling) is what makes it robust here. Without it,TrustRegion, Levenberg–Marquardt and Newton with backtracking each solve some cases and fail others.nl_solvescales the unknowns by the column norms of the Jacobian. NLsolve updates that scaling every iteration; here it is updated when the solver is restarted from its last iterate, up to 3 times.NLsolveandNLSolversBaseare removed fromProject.toml,test/Project.tomlandtest/create_sys_image.jl.Benchmark
system.yaml, KPS4 and KPS3, with and without trim,v_wind6/10/15/25 m/s, elevation 40/50/60/70/85°,l_tether50/150/392/1000 m: 320 cases per solver, Julia 1.13.1.main)main, unchanged by this PR: KPS3 withtrim=trueat 6 m/s, 40° and 1000 m returns a trimmed state at −78° elevation with both solvers.The slowdown is to be investigated before merging.
Benchmark script
Usage:
res = bench(); summary(res)Test plan
test-steady-state-robustness.jl: 54/54test-steady-state-kps4.jl: 15/15test-kps3.jl: 154/154test-kps4.jl: 223/223test-aqua.jl: 9/9🤖 Generated with Claude Code