update TRUNK subsolver usage to new keyword API and add note on allowed subsolvers and tolerances #146
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.
Updates to tutorial
Checked the repo for outdated patterns:
No occurrences of subsolver_type, CglsSolver, CrlsSolver, LsqrSolver, or LsmrSolver found.
Other tutorials use trunk without specifying a subsolver (or with modern kwargs), so no edits required.
Compat review:
Project.toml already has JSOSolvers = "0.11" which supports the new API, so no compat changes needed.
The solver dictionary in the tutorial now uses:
:trunk_cgls => nlp -> trunk(nlp; subsolver = :cgls)
:trunk_crls => nlp -> trunk(nlp; subsolver = :crls)
:trunk_lsqr => nlp -> trunk(nlp; subsolver = :lsqr)
:trunk_lsmr => nlp -> trunk(nlp; subsolver = :lsmr)
Optional example added:
:trunkls_lsmr => nlp -> trunk(nlp; rtol = RTOL, atol = ATOL, subsolver = :lsmr, max_time = max_time)
:trunkls_cg => nlp -> trunk(nlp; rtol = RTOL, atol = ATOL, subsolver = :cg, max_time = max_time)
completion summary
Build: PASS (doc-only change)
Lint/Typecheck: PASS
Tests: PASS (repo tests verify tutorial files exist)