Skip to content

Commit 277cf88

Browse files
authored
Update index.jmd
1 parent 2e9cfc4 commit 277cf88

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

tutorials/advanced-jsosolvers/index.jmd

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,15 @@ tags: ["solvers", "krylov", "benchmark", "least squares"]
44
author: "Tangi Migot"
55
---
66

7-
# Comparing subsolvers for nonlinear least squares in JSOSolvers
7+
# Comparing subsolvers for nonlinear least squares JSOSolvers solvers
88

99
This tutorial showcases some advanced features of solvers in JSOSolvers.
1010

11-
**Note**: This tutorial is compatible with JSOSolvers 0.11. The subsolver is selected using the `subsolver_type` parameter with Krylov solver types (e.g., `CglsSolver`, `LsmrSolver`).
12-
1311
```julia
1412
using JSOSolvers
1513
```
1614

17-
We benchmark different subsolvers used in the solver TRUNK for unconstrained nonlinear least squares problems.
15+
We benchmark different subsolvers used in the solvers TRUNK for unconstrained nonlinear least squares problems.
1816
The first step is to select a set of problems that are nonlinear least squares.
1917

2018
```julia
@@ -40,14 +38,13 @@ For this task, several solvers are available.
4038
JSOSolvers.trunkls_allowed_subsolvers
4139
```
4240

43-
This benchmark could also be followed for the solver TRON where the following subsolvers are available.
41+
This benchmark could also be followed for the solver TRON where the following subsolver are available.
4442

4543
```julia
4644
JSOSolvers.tronls_allowed_subsolvers
4745
```
4846

4947
These linear least squares solvers are implemented in the package [Krylov.jl](https://github.com/JuliaSmoothOptimizers/Krylov.jl).
50-
For detailed descriptions of each subsolver's algorithm and when to use it, see the [Krylov.jl documentation](https://jso.dev/Krylov.jl/stable/).
5148

5249
```julia
5350
using Krylov
@@ -56,20 +53,6 @@ using Krylov
5653
We define a dictionary of the different solvers that will be benchmarked.
5754
We consider here four variants of TRUNK using the different subsolvers.
5855

59-
For example, to call TRUNK with an explicit subsolver:
60-
61-
```julia
62-
stats = trunk(nls, subsolver_type = CglsSolver)
63-
```
64-
65-
The same subsolver selection pattern applies to TRON's least-squares specialization:
66-
67-
```julia
68-
stats_tron = tron(nls, subsolver_type = LsmrSolver)
69-
```
70-
71-
Now we define the solver dictionary for benchmarking:
72-
7356
```julia
7457
solvers = Dict(
7558
:trunk_cgls => model -> trunk(model, subsolver_type = CglsSolver),
@@ -108,5 +91,5 @@ profile_solvers(stats, costs, costnames)
10891
```
10992

11093
The CRLS and CGLS variants are the ones solving more problems, and even though the difference is rather small the CGLS variant is consistently faster which seems to indicate that it is the most appropriate subsolver for TRUNK.
111-
The size of the problems was rather small here, so this should be confirmed on larger instances.
94+
The size of the problems were rather small here, so this should be confirmed on larger instance.
11295
Moreover, the results may vary depending on the origin of the test problems.

0 commit comments

Comments
 (0)