You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ad_problems = (eval(Meta.parse(problem))(use_nls = true) for problem ∈ problem_names)
25
25
```
26
26
27
27
These problems are [`ADNLSModel`](https://github.com/JuliaSmoothOptimizers/ADNLPModels.jl) so derivatives are generated using automatic differentiation.
@@ -38,27 +38,38 @@ For this task, several solvers are available.
38
38
JSOSolvers.trunkls_allowed_subsolvers
39
39
```
40
40
41
-
This benchmark could also be followed for the solver TRON where the following subsolver are available.
41
+
This benchmark could also be followed for the solver TRON where the following subsolvers are available.
42
42
43
43
```julia
44
44
JSOSolvers.tronls_allowed_subsolvers
45
45
```
46
46
47
47
These linear least squares solvers are implemented in the package [Krylov.jl](https://github.com/JuliaSmoothOptimizers/Krylov.jl).
48
+
For detailed descriptions of each subsolver's algorithm and when to use it, see the [Krylov.jl documentation](https://jso.dev/Krylov.jl/stable/).
49
+
50
+
We define a dictionary of the different solvers that will be benchmarked.
51
+
We consider here four variants of TRUNK using the different subsolvers.
52
+
53
+
For example, to call TRUNK with an explicit subsolver:
48
54
49
55
```julia
50
-
using Krylov
56
+
stats = trunk(nls, subsolver = :cgls)
51
57
```
52
58
53
-
We define a dictionary of the different solvers that will be benchmarked.
54
-
We consider here four variants of TRUNK using the different subsolvers.
59
+
The same subsolver selection pattern applies to TRON's least-squares specialization:
60
+
61
+
```julia
62
+
stats_tron = tron(nls, subsolver = :lsmr)
63
+
```
64
+
65
+
Now we define the solver dictionary for benchmarking:
55
66
56
67
```julia
57
68
solvers = Dict(
58
-
:trunk_cgls => model -> trunk(model, subsolver_type = CglsSolver),
59
-
:trunk_crls => model -> trunk(model, subsolver_type = CrlsSolver),
60
-
:trunk_lsqr => model -> trunk(model, subsolver_type = LsqrSolver),
61
-
:trunk_lsmr => model -> trunk(model, subsolver_type = LsmrSolver)
69
+
:trunk_cgls => model -> trunk(model, subsolver = :cgls),
70
+
:trunk_crls => model -> trunk(model, subsolver = :crls),
71
+
:trunk_lsqr => model -> trunk(model, subsolver = :lsqr),
72
+
:trunk_lsmr => model -> trunk(model, subsolver = :lsmr)
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.
94
-
The size of the problems were rather small here, so this should be confirmed on larger instance.
105
+
The size of the problems was rather small here, so this should be confirmed on larger instances.
95
106
Moreover, the results may vary depending on the origin of the test problems.
0 commit comments