Skip to content

Conversation

@MaxenceGollier
Copy link
Collaborator

@dpo @MohamedLaghdafHABIBOULLAH

We should merge after #199 and #200.

@codecov
Copy link

codecov bot commented Aug 8, 2025

Codecov Report

❌ Patch coverage is 91.51515% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.56%. Comparing base (e0f214d) to head (31569ea).
⚠️ Report is 184 commits behind head on master.

Files with missing lines Patch % Lines
src/LMTR_alg.jl 91.51% 14 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #201       +/-   ##
===========================================
+ Coverage   61.53%   85.56%   +24.02%     
===========================================
  Files          11       13        +2     
  Lines        1292     1579      +287     
===========================================
+ Hits          795     1351      +556     
+ Misses        497      228      -269     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dpo
Copy link
Member

dpo commented Sep 21, 2025

Did you compare with the master branch here?

@MaxenceGollier
Copy link
Collaborator Author

@dpo i can not compare with the old version because LMTR uses $$\sqrt{\xi}$$ as an optimality measure instead of $$\sqrt{\xi/\nu}$$...
All tests pass at least..

@MaxenceGollier MaxenceGollier requested a review from dpo September 23, 2025 18:28
@dpo
Copy link
Member

dpo commented Sep 23, 2025

@dpo i can not compare with the old version because LMTR uses ξ as an optimality measure instead of ξ / ν ... All tests pass at least..

In that case, please open a separate PR that introduces the correct stopping test in LMTR. Then we'll be able to compare.

@MaxenceGollier
Copy link
Collaborator Author

LMTR Tests

Without bounds

Subsolver : R2

On this branch,

using LinearAlgebra, NLPModels, NLPModelsModifiers, RegularizedProblems, ProximalOperators, Random, ShiftedProximalOperators
Random.seed!(0)
bpdn = bpdn_model(1)[2]
λ = norm(grad(bpdn, zeros(bpdn.meta.nvar)), Inf) / 10
h = NormL0(λ)
x0 = randn(bpdn.meta.nvar)

import Pkg; Pkg.add(url = "https://github.com/MaxenceGollier/RegularizedOptimization.jl.git", rev = "LMTR-JSO")
using RegularizedOptimization
options = ROSolverOptions(β = 1.0, α = 1.0, ϵa = 1e-3, ϵr = 1e-3, verbose = 1)

LMTR(bpdn, h, NormLinf(1.0), options, x0 = x0)
[ Info:  outer  inner     f(x)     h(x)  √(ξ1/ν)        ρ        Δ      ‖x‖      ‖s‖        ν LMTR 
[ Info:      0    238  9.6e+01  2.3e+01  1.4e+01  1.0e+00  5.7e-01  4.0e+00  5.7e-01  3.3e-01 ↗
[ Info:      1     21  1.2e+01  1.8e+01  5.3e+00  1.0e+00  4.3e-01  3.4e+00  4.3e-01  4.6e-01 ↗
[ Info:      2      6  5.3e-01  1.3e+01  1.7e+00  1.0e+00  2.1e-01  3.0e+00  2.1e-01  4.6e-01 ↗
[ Info:      3     17  9.5e-02  1.2e+01  7.3e-01  1.0e+00  2.1e-01  2.9e+00  2.1e-01  4.6e-01 ↗
[ Info:      4      6  9.2e-03  1.2e+01  9.0e-01  1.0e+00  2.1e-01  2.9e+00  2.1e-01  4.6e-01 ↗
[ Info:      5      1  8.2e-03  1.1e+01  3.1e-02  1.0e+00  2.5e-03  2.9e+00  2.5e-03  4.6e-01 ↗
[ Info:      6      1  7.4e-03  1.1e+01  2.9e-02  1.0e+00  2.6e-03  2.9e+00  2.6e-03  4.6e-01 ↗
[ Info:      7      1  6.8e-03  1.1e+01  2.7e-02  1.0e+00  2.6e-03  2.9e+00  2.6e-03  4.6e-01 ↗
[ Info:      8      1  6.2e-03  1.1e+01  2.5e-02  1.0e+00  2.5e-03  2.9e+00  2.5e-03  4.6e-01 ↗
[ Info:      9      1  5.7e-03  1.1e+01  2.4e-02  1.0e+00  2.4e-03  2.9e+00  2.4e-03  4.6e-01 ↗
[ Info:     10      1  5.3e-03  1.1e+01  2.2e-02  1.0e+00  2.2e-03  2.9e+00  2.2e-03  4.6e-01 ↗
[ Info:     11      1  4.9e-03  1.1e+01  2.1e-02  1.0e+00  2.1e-03  2.9e+00  2.1e-03  4.6e-01 ↗
[ Info:     12      1  4.6e-03  1.1e+01  2.0e-02  1.0e+00  2.0e-03  2.9e+00  2.0e-03  4.6e-01 ↗
[ Info:     13      1  4.3e-03  1.1e+01  1.9e-02  1.0e+00  1.9e-03  2.9e+00  1.9e-03  4.6e-01 ↗
[ Info:     14      0  4.0e-03  1.1e+01  1.8e-02  1.0e+00  1.8e-03  2.9e+00  1.8e-03  4.6e-01 ↗
[ Info:     15      0  3.8e-03  1.1e+01  1.8e-02  1.0e+00  1.6e-03  2.9e+00  1.6e-03  4.6e-01 ↗
[ Info:     16      0  3.7e-03  1.1e+01  1.7e-02  1.0e+00  1.4e-03  2.9e+00  1.4e-03  4.6e-01 ↗
[ Info:     17      0  3.6e-03  1.1e+01  1.7e-02  1.0e+00  1.3e-03  2.9e+00  1.3e-03  4.6e-01 ↗
[ Info:     18      0  3.4e-03  1.1e+01  1.6e-02  1.0e+00  1.2e-03  2.9e+00  1.2e-03  4.6e-01 ↗
[ Info:     19      0  3.3e-03  1.1e+01  1.6e-02  1.0e+00  1.2e-03  2.9e+00  1.2e-03  4.6e-01 ↗
[ Info:     20      0  3.2e-03  1.1e+01  1.5e-02  1.0e+00  1.1e-03  2.9e+00  1.1e-03  4.6e-01 ↗
[ Info:     21      0  3.1e-03  1.1e+01  1.5e-02  1.0e+00  1.7e+00  2.9e+00  1.1e-03  4.6e-01
[ Info: LMTR: terminating with √(ξ1/ν) = 0.015115537832344829
"Execution stats: first-order stationary"

On the branch with fixed optimality measure,

using LinearAlgebra, NLPModels, NLPModelsModifiers, RegularizedProblems, ProximalOperators, Random, ShiftedProximalOperators
Random.seed!(0)
bpdn = bpdn_model(1)[2]
λ = norm(grad(bpdn, zeros(bpdn.meta.nvar)), Inf) / 10
h = NormL0(λ)
x0 = randn(bpdn.meta.nvar)

import Pkg; Pkg.add(url = "https://github.com/MaxenceGollier/RegularizedOptimization.jl.git", rev = "LMTR_OptMeasure")
using RegularizedOptimization
options = ROSolverOptions(β = 1.0, α = 1.0, ϵa = 1e-3, ϵr = 1e-3, verbose = 10)

LMTR(bpdn, h, NormLinf(1.0), options, x0 = x0)
[ Info:  outer    inner     f(x)     h(x)     √ξ1      √ξ        ρ       Δ     ‖x‖     ‖s‖       ν TR
[ Info:      1      238  9.6e+01  2.3e+01 8.2e+00 9.5e+00  1.0e+00 5.7e-01 4.0e+00 5.7e-01 3.3e-01 ↗
[ Info:      2       21  1.2e+01  1.8e+01 3.6e+00 4.0e+00  1.0e+00 4.3e-01 3.4e+00 4.3e-01 4.6e-01 ↗
[ Info:      3        6  5.3e-01  1.3e+01 1.2e+00 1.3e+00  1.0e+00 2.1e-01 3.0e+00 2.1e-01 4.6e-01 ↗
[ Info:      4       17  9.5e-02  1.2e+01 4.9e-01 5.6e-01  1.0e+00 2.1e-01 2.9e+00 2.1e-01 4.6e-01 ↗
[ Info:      5        6  9.2e-03  1.2e+01 6.1e-01 6.1e-01  1.0e+00 2.1e-01 2.9e+00 2.1e-01 4.6e-01 ↗
[ Info:      6        1  8.2e-03  1.1e+01 2.1e-02 2.7e-02  1.0e+00 2.5e-03 2.9e+00 2.5e-03 4.6e-01 ↗
[ Info:      2       21  1.2e+01  1.8e+01 3.6e+00 4.0e+00  1.0e+00 4.3e-01 3.4e+00 4.3e-01 4.6e-01 ↗
[ Info:      3        6  5.3e-01  1.3e+01 1.2e+00 1.3e+00  1.0e+00 2.1e-01 3.0e+00 2.1e-01 4.6e-01 ↗
[ Info:      4       17  9.5e-02  1.2e+01 4.9e-01 5.6e-01  1.0e+00 2.1e-01 2.9e+00 2.1e-01 4.6e-01 ↗
[ Info:      5        6  9.2e-03  1.2e+01 6.1e-01 6.1e-01  1.0e+00 2.1e-01 2.9e+00 2.1e-01 4.6e-01 ↗
[ Info:      6        1  8.2e-03  1.1e+01 2.1e-02 2.7e-02  1.0e+00 2.5e-03 2.9e+00 2.5e-03 4.6e-01 ↗
[ Info:      6        1  8.2e-03  1.1e+01 2.1e-02 2.7e-02  1.0e+00 2.5e-03 2.9e+00 2.5e-03 4.6e-01 ↗
[ Info:      7        1  7.4e-03  1.1e+01 2.0e-02 2.5e-02  1.0e+00 2.6e-03 2.9e+00 2.6e-03 4.6e-01 ↗
[ Info:      8        1  6.8e-03  1.1e+01 1.8e-02 2.4e-02  1.0e+00 2.6e-03 2.9e+00 2.6e-03 4.6e-01 ↗
[ Info:      9        1  6.2e-03  1.1e+01 1.7e-02 2.2e-02  1.0e+00 2.5e-03 2.9e+00 2.5e-03 4.6e-01 ↗
[ Info:     10        1  5.7e-03  1.1e+01 1.6e-02 2.1e-02  1.0e+00 2.4e-03 2.9e+00 2.4e-03 4.6e-01 ↗
[ Info:     11        1  5.3e-03  1.1e+01 1.5e-02 2.0e-02  1.0e+00 2.2e-03 2.9e+00 2.2e-03 4.6e-01 ↗
[ Info:     12        1  4.9e-03  1.1e+01 1.4e-02 1.9e-02  1.0e+00 2.1e-03 2.9e+00 2.1e-03 4.6e-01 ↗
[ Info:     13        1  4.6e-03  1.1e+01 1.4e-02 1.8e-02  1.0e+00 2.0e-03 2.9e+00 2.0e-03 4.6e-01 ↗
[ Info:     14        1  4.3e-03  1.1e+01 1.3e-02 1.7e-02  1.0e+00 1.9e-03 2.9e+00 1.9e-03 4.6e-01 ↗
[ Info:     15        0  4.0e-03  1.1e+01 1.2e-02 1.2e-02  1.0e+00 1.8e-03 2.9e+00 1.8e-03 4.6e-01 ↗
[ Info:     16        0  3.8e-03  1.1e+01 1.2e-02 1.2e-02  1.0e+00 1.6e-03 2.9e+00 1.6e-03 4.6e-01 ↗
[ Info:     17        0  3.7e-03  1.1e+01 1.2e-02 1.1e-02  1.0e+00 1.4e-03 2.9e+00 1.4e-03 4.6e-01 ↗
[ Info:     18        0  3.6e-03  1.1e+01 1.1e-02 1.1e-02  1.0e+00 1.3e-03 2.9e+00 1.3e-03 4.6e-01 ↗
[ Info:     19        0  3.4e-03  1.1e+01 1.1e-02 1.1e-02  1.0e+00 1.2e-03 2.9e+00 1.2e-03 4.6e-01 ↗
[ Info:     20        0  3.3e-03  1.1e+01 1.1e-02 1.1e-02  1.0e+00 1.2e-03 2.9e+00 1.2e-03 4.6e-01 ↗
[ Info:     21        0  3.2e-03  1.1e+01 1.0e-02 1.0e-02  1.0e+00 1.1e-03 2.9e+00 1.1e-03 4.6e-01 ↗
[ Info:     22        1  3.1e-03  1.1e+01 1.0e-02 1.0e-02          1.7e+00 2.9e+00 1.1e-03 4.6e-01
[ Info: LMTR: terminating with √(ξ1/ν) = 0.01511553783234532
"Execution stats: first-order stationary"

Subsolver : TRDH

On this branch,

using LinearAlgebra, NLPModels, NLPModelsModifiers, RegularizedProblems, ProximalOperators, Random, ShiftedProximalOperators
Random.seed!(0)
bpdn = bpdn_model(1)[2]
λ = norm(grad(bpdn, zeros(bpdn.meta.nvar)), Inf) / 10
h = NormL0(λ)
x0 = randn(bpdn.meta.nvar)

import Pkg; Pkg.add(url = "https://github.com/MaxenceGollier/RegularizedOptimization.jl.git", rev = "LMTR-JSO")
using RegularizedOptimization
options = ROSolverOptions(β = 1.0, α = 1.0, ϵa = 1e-3, ϵr = 1e-3, verbose = 1)

LMTR(bpdn, h, NormLinf(1.0), options, x0 = x0, subsolver = TRDHSolver)
[ Info:  outer  inner     f(x)     h(x)  √(ξ1/ν)        ρ        Δ      ‖x‖      ‖s‖        ν LMTR 
[ Info:      0      0  9.6e+01  2.3e+01  1.4e+01  1.0e+00  5.7e-01  4.0e+00  5.7e-01  3.3e-01 ↗
[ Info:      1      0  4.2e+01  2.0e+01  9.3e+00  1.0e+00  5.9e-01  3.5e+00  5.9e-01  4.6e-01 ↗
[ Info:      2      0  1.3e+01  1.9e+01  5.2e+00  1.0e+00  4.3e-01  3.0e+00  4.3e-01  4.7e-01 ↗
[ Info:      3      0  4.3e+00  1.8e+01  2.8e+00  1.0e+00  2.9e-01  2.8e+00  2.9e-01  4.7e-01 ↗
[ Info:      4      0  1.8e+00  1.7e+01  2.1e+00  1.0e+00  2.7e-01  2.6e+00  2.7e-01  4.7e-01 ↗
[ Info:      5      0  9.1e-01  1.6e+01  1.1e+00  1.0e+00  2.1e-01  2.5e+00  2.1e-01  4.7e-01 ↗
[ Info:      6      0  5.6e-01  1.6e+01  9.4e-01  1.0e+00  2.2e-01  2.5e+00  2.2e-01  4.7e-01 ↗
[ Info:      7      0  3.9e-01  1.6e+01  5.2e-01  1.0e+00  4.3e-02  2.5e+00  4.3e-02  4.7e-01 ↗
[ Info:      8      0  2.8e-01  1.6e+01  7.7e-01  1.0e+00  2.2e-01  2.5e+00  2.2e-01  4.7e-01 ↗
[ Info:      9      0  2.3e-01  1.6e+01  6.8e-01  1.0e+00  2.3e-01  2.5e+00  2.3e-01  4.7e-01 ↗
[ Info:     10      0  1.9e-01  1.6e+01  5.7e-01  1.0e+00  2.1e-01  2.5e+00  2.1e-01  4.7e-01 ↗
[ Info:     11      0  1.5e-01  1.6e+01  5.5e-01  1.0e+00  2.1e-01  2.5e+00  2.1e-01  4.7e-01 ↗
[ Info:     12      0  1.2e-01  1.6e+01  2.6e-01  1.0e+00  2.1e-02  2.5e+00  2.1e-02  4.7e-01 ↗
[ Info:     13      0  9.0e-02  1.6e+01  5.0e-01  1.0e+00  2.1e-01  2.5e+00  2.1e-01  4.7e-01 ↗
[ Info:     14      0  8.5e-02  1.5e+01  3.9e-01  1.0e+00  2.2e-01  2.5e+00  2.2e-01  4.7e-01 ↗
[ Info:     15      0  7.0e-02  1.5e+01  1.9e-01  1.0e+00  1.3e-02  2.5e+00  1.3e-02  4.7e-01 ↗
[ Info:     16      0  5.4e-02  1.5e+01  5.8e-01  1.0e+00  2.1e-01  2.5e+00  2.1e-01  4.7e-01 ↗
[ Info:     17      0  5.9e-02  1.5e+01  2.0e-01  1.0e+00  1.5e-02  2.5e+00  1.5e-02  4.7e-01 ↗
[ Info:     18      0  4.3e-02  1.5e+01  1.6e-01  1.0e+00  1.2e-02  2.5e+00  1.2e-02  4.7e-01 ↗
[ Info:     19      0  3.2e-02  1.5e+01  1.3e-01  1.0e+00  9.6e-03  2.5e+00  9.6e-03  4.7e-01 ↗
[ Info:     20      0  2.5e-02  1.5e+01  3.4e-01  1.0e+00  2.1e-01  2.5e+00  2.1e-01  4.7e-01 ↗
[ Info:     21      0  2.7e-02  1.5e+01  1.2e-01  1.0e+00  1.1e-02  2.5e+00  1.1e-02  4.7e-01 ↗
[ Info:     22      0  2.1e-02  1.5e+01  3.3e-01  1.0e+00  2.1e-01  2.5e+00  2.1e-01  4.7e-01 ↗
[ Info:     23      0  2.5e-02  1.5e+01  1.2e-01  1.0e+00  1.0e-02  2.5e+00  1.0e-02  4.7e-01 ↗
[ Info:     24      0  1.8e-02  1.5e+01  3.3e-01  1.0e+00  2.1e-01  2.5e+00  2.1e-01  4.7e-01 ↗
[ Info:     25      0  2.1e-02  1.5e+01  1.2e-01  1.0e+00  8.3e-03  2.5e+00  8.3e-03  4.7e-01 ↗
[ Info:     26      0  1.5e-02  1.5e+01  9.2e-02  1.0e+00  6.6e-03  2.5e+00  6.6e-03  4.7e-01 ↗
[ Info:     27      0  1.2e-02  1.5e+01  7.6e-02  1.0e+00  5.4e-03  2.5e+00  5.4e-03  4.7e-01 ↗
[ Info:     28      0  9.2e-03  1.5e+01  6.5e-02  1.0e+00  4.6e-03  2.5e+00  4.6e-03  4.7e-01 ↗
[ Info:     29      0  7.4e-03  1.5e+01  4.5e-01  1.0e+00  2.1e-01  2.5e+00  2.1e-01  4.7e-01 ↗
[ Info:     30      0  2.0e-02  1.5e+01  1.3e-01  1.0e+00  1.0e-02  2.5e+00  1.0e-02  4.7e-01 ↗
[ Info:     31      0  1.3e-02  1.5e+01  3.3e-01  1.0e+00  2.1e-01  2.5e+00  2.1e-01  4.7e-01 ↗
[ Info:     32      0  1.6e-02  1.5e+01  1.1e-01  1.0e+00  8.0e-03  2.5e+00  8.0e-03  4.7e-01 ↗
[ Info:     33      0  1.1e-02  1.5e+01  8.6e-02  1.0e+00  6.1e-03  2.5e+00  6.1e-03  4.7e-01 ↗
[ Info:     34      0  7.9e-03  1.5e+01  6.8e-02  1.0e+00  5.0e-03  2.5e+00  5.0e-03  4.7e-01 ↗
[ Info:     35      0  6.0e-03  1.5e+01  5.6e-02  1.0e+00  4.2e-03  2.5e+00  4.2e-03  4.7e-01 ↗
[ Info:     36      0  4.6e-03  1.5e+01  4.6e-02  1.0e+00  3.6e-03  2.5e+00  3.6e-03  4.7e-01 ↗
[ Info:     37      0  3.7e-03  1.5e+01  4.0e-02  1.0e+00  3.0e-03  2.5e+00  3.0e-03  4.7e-01 ↗
[ Info:     38      0  3.0e-03  1.5e+01  3.4e-02  1.0e+00  2.6e-03  2.5e+00  2.6e-03  4.7e-01 ↗
[ Info:     39      0  2.5e-03  1.5e+01  3.0e-02  1.0e+00  2.3e-03  2.4e+00  2.3e-03  4.7e-01 ↗
[ Info:     40      0  2.1e-03  1.5e+01  2.7e-02  1.0e+00  2.0e-03  2.4e+00  2.0e-03  4.7e-01 ↗
[ Info:     41      0  1.8e-03  1.5e+01  2.4e-02  1.0e+00  1.7e-03  2.4e+00  1.7e-03  4.7e-01 ↗
[ Info:     42      0  1.5e-03  1.5e+01  2.2e-02  1.0e+00  1.5e-03  2.4e+00  1.5e-03  4.7e-01 ↗
[ Info:     43      0  1.3e-03  1.5e+01  2.0e-02  1.0e+00  1.4e-03  2.4e+00  1.4e-03  4.7e-01 ↗
[ Info:     44      0  1.1e-03  1.5e+01  1.8e-02  1.0e+00  1.2e-03  2.4e+00  1.2e-03  4.7e-01 ↗
[ Info:     45      0  9.7e-04  1.5e+01  1.6e-02  1.0e+00  1.1e-03  2.4e+00  1.1e-03  4.7e-01 ↗
[ Info:     46      0  8.5e-04  1.5e+01  1.5e-02  1.0e+00  1.8e+00  2.4e+00  1.0e-03  4.7e-01
[ Info: LMTR: terminating with √(ξ1/ν) = 0.015080393658632408

On the branch with fixed optimality measure,

using LinearAlgebra, NLPModels, NLPModelsModifiers, RegularizedProblems, ProximalOperators, Random, ShiftedProximalOperators
Random.seed!(0)
bpdn = bpdn_model(1)[2]
λ = norm(grad(bpdn, zeros(bpdn.meta.nvar)), Inf) / 10
h = NormL0(λ)
x0 = randn(bpdn.meta.nvar)

import Pkg; Pkg.add(url = "https://github.com/MaxenceGollier/RegularizedOptimization.jl.git", rev = "LMTR_OptMeasure")
using RegularizedOptimization
options = ROSolverOptions(β = 1.0, α = 1.0, ϵa = 1e-3, ϵr = 1e-3, verbose = 10)

LMTR(bpdn, h, NormLinf(1.0), options, x0 = x0, subsolver = TRDH)
[ Info:  outer    inner     f(x)     h(x)     √ξ1      √ξ        ρ       Δ     ‖x‖     ‖s‖       ν TR
[ Info:      1        0  9.6e+01  2.3e+01 8.2e+00 7.5e+00  1.0e+00 5.7e-01 4.0e+00 5.7e-01 3.3e-01 ↗
[ Info:      2        0  4.2e+01  2.0e+01 6.3e+00 5.5e+00  1.0e+00 5.9e-01 3.5e+00 5.9e-01 4.6e-01 ↗
[ Info:      3        0  1.3e+01  1.9e+01 3.6e+00 3.1e+00  1.0e+00 4.3e-01 3.0e+00 4.3e-01 4.7e-01 ↗
[ Info:      4        0  4.3e+00  1.8e+01 1.9e+00 1.7e+00  1.0e+00 2.9e-01 2.8e+00 2.9e-01 4.7e-01 ↗
[ Info:      5        0  1.8e+00  1.7e+01 1.4e+00 1.3e+00  1.0e+00 2.7e-01 2.6e+00 2.7e-01 4.7e-01 ↗
[ Info:      6        0  9.1e-01  1.6e+01 7.2e-01 6.6e-01  1.0e+00 2.1e-01 2.5e+00 2.1e-01 4.7e-01 ↗
[ Info:      7        0  5.6e-01  1.6e+01 6.5e-01 5.9e-01  1.0e+00 2.2e-01 2.5e+00 2.2e-01 4.7e-01 ↗
[ Info:      8        0  3.9e-01  1.6e+01 3.5e-01 3.3e-01  1.0e+00 4.3e-02 2.5e+00 4.3e-02 4.7e-01 ↗
[ Info:      9        0  2.8e-01  1.6e+01 5.3e-01 4.8e-01  1.0e+00 2.2e-01 2.5e+00 2.2e-01 4.7e-01 ↗
[ Info:     10        0  2.3e-01  1.6e+01 4.6e-01 4.3e-01  1.0e+00 2.3e-01 2.5e+00 2.3e-01 4.7e-01 ↗
[ Info:     11        0  1.9e-01  1.6e+01 3.9e-01 3.6e-01  1.0e+00 2.1e-01 2.5e+00 2.1e-01 4.7e-01 ↗
[ Info:     12        0  1.5e-01  1.6e+01 3.7e-01 3.5e-01  1.0e+00 2.1e-01 2.5e+00 2.1e-01 4.7e-01 ↗
[ Info:     13        0  1.2e-01  1.6e+01 1.8e-01 1.7e-01  1.0e+00 2.1e-02 2.5e+00 2.1e-02 4.7e-01 ↗
[ Info:     14        0  9.0e-02  1.6e+01 3.4e-01 3.1e-01  1.0e+00 2.1e-01 2.5e+00 2.1e-01 4.7e-01 ↗
[ Info:     15        0  8.5e-02  1.5e+01 2.7e-01 2.5e-01  1.0e+00 2.2e-01 2.5e+00 2.2e-01 4.7e-01 ↗
[ Info:     16        0  7.0e-02  1.5e+01 1.3e-01 1.3e-01  1.0e+00 1.3e-02 2.5e+00 1.3e-02 4.7e-01 ↗
[ Info:     17        0  5.4e-02  1.5e+01 4.0e-01 3.6e-01  1.0e+00 2.1e-01 2.5e+00 2.1e-01 4.7e-01 ↗
[ Info:     18        0  5.9e-02  1.5e+01 1.4e-01 1.3e-01  1.0e+00 1.5e-02 2.5e+00 1.5e-02 4.7e-01 ↗
[ Info:     19        0  4.3e-02  1.5e+01 1.1e-01 1.0e-01  1.0e+00 1.2e-02 2.5e+00 1.2e-02 4.7e-01 ↗
[ Info:     20        0  3.2e-02  1.5e+01 8.8e-02 8.4e-02  1.0e+00 9.6e-03 2.5e+00 9.6e-03 4.7e-01 ↗
[ Info:     21        0  2.5e-02  1.5e+01 2.3e-01 2.1e-01  1.0e+00 2.1e-01 2.5e+00 2.1e-01 4.7e-01 ↗
[ Info:     22        0  2.7e-02  1.5e+01 8.4e-02 8.0e-02  1.0e+00 1.1e-02 2.5e+00 1.1e-02 4.7e-01 ↗
[ Info:     23        0  2.1e-02  1.5e+01 2.3e-01 2.0e-01  1.0e+00 2.1e-01 2.5e+00 2.1e-01 4.7e-01 ↗
[ Info:     24        0  2.5e-02  1.5e+01 8.3e-02 7.9e-02  1.0e+00 1.0e-02 2.5e+00 1.0e-02 4.7e-01 ↗
[ Info:     25        0  1.8e-02  1.5e+01 2.3e-01 2.1e-01  1.0e+00 2.1e-01 2.5e+00 2.1e-01 4.7e-01 ↗
[ Info:     26        0  2.1e-02  1.5e+01 7.9e-02 7.5e-02  1.0e+00 8.3e-03 2.5e+00 8.3e-03 4.7e-01 ↗
[ Info:     27        0  1.5e-02  1.5e+01 6.3e-02 6.0e-02  1.0e+00 6.6e-03 2.5e+00 6.6e-03 4.7e-01 ↗
[ Info:     28        0  1.2e-02  1.5e+01 5.2e-02 5.0e-02  1.0e+00 5.4e-03 2.5e+00 5.4e-03 4.7e-01 ↗
[ Info:     29        0  9.2e-03  1.5e+01 4.4e-02 4.3e-02  1.0e+00 4.6e-03 2.5e+00 4.6e-03 4.7e-01 ↗
[ Info:     30        0  7.4e-03  1.5e+01 3.1e-01 2.8e-01  1.0e+00 2.1e-01 2.5e+00 2.1e-01 4.7e-01 ↗
[ Info:     31        0  2.0e-02  1.5e+01 8.6e-02 8.0e-02  1.0e+00 1.0e-02 2.5e+00 1.0e-02 4.7e-01 ↗
[ Info:     32        0  1.3e-02  1.5e+01 2.3e-01 2.1e-01  1.0e+00 2.1e-01 2.5e+00 2.1e-01 4.7e-01 ↗
[ Info:     33        0  1.6e-02  1.5e+01 7.7e-02 7.2e-02  1.0e+00 8.0e-03 2.5e+00 8.0e-03 4.7e-01 ↗
[ Info:     34        0  1.1e-02  1.5e+01 5.9e-02 5.5e-02  1.0e+00 6.1e-03 2.5e+00 6.1e-03 4.7e-01 ↗
[ Info:     35        0  7.9e-03  1.5e+01 4.7e-02 4.4e-02  1.0e+00 5.0e-03 2.5e+00 5.0e-03 4.7e-01 ↗
[ Info:     36        0  6.0e-03  1.5e+01 3.8e-02 3.6e-02  1.0e+00 4.2e-03 2.5e+00 4.2e-03 4.7e-01 ↗
[ Info:     37        0  4.6e-03  1.5e+01 3.2e-02 3.1e-02  1.0e+00 3.6e-03 2.5e+00 3.6e-03 4.7e-01 ↗
[ Info:     38        0  3.7e-03  1.5e+01 2.7e-02 2.6e-02  1.0e+00 3.0e-03 2.5e+00 3.0e-03 4.7e-01 ↗
[ Info:     39        0  3.0e-03  1.5e+01 2.4e-02 2.3e-02  1.0e+00 2.6e-03 2.5e+00 2.6e-03 4.7e-01 ↗
[ Info:     40        0  2.5e-03  1.5e+01 2.1e-02 2.0e-02  1.0e+00 2.3e-03 2.4e+00 2.3e-03 4.7e-01 ↗
[ Info:     41        0  2.1e-03  1.5e+01 1.8e-02 1.8e-02  1.0e+00 2.0e-03 2.4e+00 2.0e-03 4.7e-01 ↗
[ Info:     42        0  1.8e-03  1.5e+01 1.6e-02 1.6e-02  1.0e+00 1.7e-03 2.4e+00 1.7e-03 4.7e-01 ↗
[ Info:     43        0  1.5e-03  1.5e+01 1.5e-02 1.5e-02  1.0e+00 1.5e-03 2.4e+00 1.5e-03 4.7e-01 ↗
[ Info:     44        0  1.3e-03  1.5e+01 1.3e-02 1.3e-02  1.0e+00 1.4e-03 2.4e+00 1.4e-03 4.7e-01 ↗
[ Info:     45        0  1.1e-03  1.5e+01 1.2e-02 1.2e-02  1.0e+00 1.2e-03 2.4e+00 1.2e-03 4.7e-01 ↗
[ Info:     46        0  9.7e-04  1.5e+01 1.1e-02 1.1e-02  1.0e+00 1.1e-03 2.4e+00 1.1e-03 4.7e-01 ↗
[ Info:     47        1  8.5e-04  1.5e+01 1.0e-02 1.0e-02          1.8e+00 2.4e+00 1.0e-03 4.7e-01
[ Info: LMTR: terminating with √(ξ1/ν) = 0.015080393658632542

With bounds

Subsolver : R2

On this branch,

using LinearAlgebra, NLPModels, NLPModelsModifiers, RegularizedProblems, ProximalOperators, Random, ShiftedProximalOperators
Random.seed!(0)
bpdn = bpdn_model(1, bounds = true)[2]
λ = norm(grad(bpdn, zeros(bpdn.meta.nvar)), Inf) / 10
h = NormL1(λ)

#import Pkg; Pkg.add(url = "https://github.com/MaxenceGollier/RegularizedOptimization.jl.git", rev = "LMTR-JSO")
using RegularizedOptimization
options = ROSolverOptions(β = 1.0, α = 1.0, ϵa = 1e-3, ϵr = 1e-3, verbose = 1)

LMTR(bpdn, h, NormLinf(1.0), options)
[ Info:  outer  inner     f(x)     h(x)  √(ξ1/ν)        ρ        Δ      ‖x‖      ‖s‖        ν LMTR
[ Info:      0     34  2.2e+00  0.0e+00  1.3e+00  1.0e+00  1.8e-01  0.0e+00  1.8e-01  3.3e-01 ↗
[ Info:      1      4  1.1e+00  4.3e-01  7.8e-01  1.0e+00  1.2e-01  1.8e-01  1.2e-01  3.3e-01 ↗
[ Info:      2      3  8.5e-01  3.7e-01  6.9e-01  1.0e+00  1.0e-01  3.0e-01  1.0e-01  3.3e-01 ↗
[ Info:      3      3  6.9e-01  3.3e-01  6.0e-01  1.0e+00  9.2e-02  4.0e-01  9.2e-02  3.3e-01 ↗
[ Info:      4      3  5.3e-01  3.3e-01  5.1e-01  1.0e+00  7.9e-02  4.9e-01  7.9e-02  3.3e-01 ↗
[ Info:      5      3  4.0e-01  3.5e-01  4.2e-01  1.0e+00  6.5e-02  5.7e-01  6.5e-02  3.3e-01 ↗
[ Info:      6      3  3.0e-01  3.8e-01  3.3e-01  1.0e+00  5.3e-02  6.4e-01  5.3e-02  3.3e-01 ↗
[ Info:      7      4  2.2e-01  4.1e-01  2.6e-01  1.0e+00  4.3e-02  6.9e-01  4.3e-02  3.3e-01 ↗
[ Info:      8      5  1.6e-01  4.4e-01  2.0e-01  1.0e+00  3.4e-02  7.3e-01  3.4e-02  3.3e-01 ↗
[ Info:      9      3  1.3e-01  4.6e-01  1.5e-01  1.0e+00  2.7e-02  7.7e-01  2.7e-02  3.3e-01 ↗
[ Info:     10      3  1.0e-01  4.7e-01  1.2e-01  1.0e+00  2.2e-02  7.9e-01  2.2e-02  3.3e-01 ↗
[ Info:     11      2  8.5e-02  4.8e-01  8.8e-02  1.0e+00  1.8e-02  8.2e-01  1.8e-02  3.3e-01 ↗
[ Info:     12      3  7.3e-02  4.9e-01  6.6e-02  1.0e+00  1.4e-02  8.3e-01  1.4e-02  3.3e-01 ↗
[ Info:     13      3  6.5e-02  5.0e-01  5.0e-02  1.0e+00  1.1e-02  8.5e-01  1.1e-02  3.3e-01 ↗
[ Info:     14      2  6.0e-02  5.0e-01  4.0e-02  1.0e+00  9.3e-03  8.6e-01  9.3e-03  3.3e-01 ↗
[ Info:     15      1  5.7e-02  5.1e-01  3.3e-02  1.0e+00  7.8e-03  8.7e-01  7.8e-03  3.3e-01 ↗
[ Info:     16      1  5.6e-02  5.1e-01  2.8e-02  1.0e+00  6.6e-03  8.8e-01  6.6e-03  3.3e-01 ↗
[ Info:     17      1  5.5e-02  5.1e-01  2.3e-02  1.0e+00  5.5e-03  8.8e-01  5.5e-03  3.3e-01 ↗
[ Info:     18      1  5.4e-02  5.1e-01  1.9e-02  1.0e+00  4.6e-03  8.9e-01  4.6e-03  3.3e-01 ↗
[ Info:     19      1  5.4e-02  5.1e-01  1.6e-02  1.0e+00  3.9e-03  8.9e-01  3.9e-03  3.3e-01 ↗
[ Info:     20      1  5.3e-02  5.1e-01  1.4e-02  1.0e+00  3.3e-03  9.0e-01  3.3e-03  3.3e-01 ↗
[ Info:     21      1  5.3e-02  5.1e-01  1.2e-02  1.0e+00  2.8e-03  9.0e-01  2.8e-03  3.3e-01 ↗
[ Info:     22      1  5.2e-02  5.1e-01  9.8e-03  1.0e+00  2.4e-03  9.0e-01  2.4e-03  3.3e-01 ↗
[ Info:     23      0  5.2e-02  5.1e-01  8.3e-03  1.0e+00  2.0e-03  9.1e-01  2.0e-03  3.3e-01 ↗
[ Info:     24      0  5.2e-02  5.1e-01  7.0e-03  1.0e+00  1.7e-03  9.1e-01  1.7e-03  3.3e-01 ↗
[ Info:     25      0  5.2e-02  5.1e-01  6.0e-03  1.0e+00  1.4e-03  9.1e-01  1.4e-03  3.3e-01 ↗
[ Info:     26      0  5.2e-02  5.1e-01  5.1e-03  1.0e+00  1.2e-03  9.1e-01  1.2e-03  3.3e-01 ↗
[ Info:     27      0  5.2e-02  5.1e-01  4.4e-03  1.0e+00  1.0e-03  9.1e-01  1.0e-03  3.3e-01 ↗
[ Info:     28      0  5.2e-02  5.1e-01  3.8e-03  1.0e+00  8.6e-04  9.1e-01  8.6e-04  3.3e-01 ↗
[ Info:     29      0  5.2e-02  5.1e-01  3.3e-03  1.0e+00  7.3e-04  9.1e-01  7.3e-04  3.3e-01 ↗
[ Info:     30      0  5.1e-02  5.1e-01  2.8e-03  1.0e+00  6.2e-04  9.1e-01  6.2e-04  3.3e-01 ↗
[ Info:     31      0  5.1e-02  5.1e-01  2.5e-03  1.0e+00  5.3e-04  9.2e-01  5.3e-04  3.3e-01 ↗
[ Info:     32      0  5.1e-02  5.1e-01  2.2e-03  1.0e+00  1.0e+00  9.2e-01  4.5e-04  3.3e-01
[ Info: LMTR: terminating with √(ξ1/ν) = 0.002162985823872107
"Execution stats: first-order stationary"

On the branch with fixed optimality measure,

using LinearAlgebra, NLPModels, NLPModelsModifiers, RegularizedProblems, ProximalOperators, Random, ShiftedProximalOperators
Random.seed!(0)
bpdn = bpdn_model(1, bounds = true)[2]
λ = norm(grad(bpdn, zeros(bpdn.meta.nvar)), Inf) / 10
h = NormL1(λ)

import Pkg; Pkg.add(url = "https://github.com/MaxenceGollier/RegularizedOptimization.jl.git", rev = "LMTR_OptMeasure")
using RegularizedOptimization
options = ROSolverOptions(β = 1.0, α = 1.0, ϵa = 1e-3, ϵr = 1e-3, verbose = 10)

LMTR(bpdn, h, NormLinf(1.0), options, x0 = x0)
[ Info:  outer    inner     f(x)     h(x)     √ξ1      √ξ        ρ       Δ     ‖x‖     ‖s‖       ν TR
[ Info:      1       34  2.2e+00  0.0e+00 7.6e-01 8.4e-01  1.0e+00 1.8e-01 0.0e+00 1.8e-01 3.3e-01 ↗
[ Info:      2        4  1.1e+00  4.3e-01 4.5e-01 5.1e-01  1.0e+00 1.2e-01 1.8e-01 1.2e-01 3.3e-01 ↗
[ Info:      3        3  8.5e-01  3.7e-01 4.0e-01 4.5e-01  1.0e+00 1.0e-01 3.0e-01 1.0e-01 3.3e-01 ↗
[ Info:      4        3  6.9e-01  3.3e-01 3.5e-01 3.9e-01  1.0e+00 9.2e-02 4.0e-01 9.2e-02 3.3e-01 ↗
[ Info:      5        3  5.3e-01  3.3e-01 3.0e-01 3.3e-01  1.0e+00 7.9e-02 4.9e-01 7.9e-02 3.3e-01 ↗
[ Info:      6        3  4.0e-01  3.5e-01 2.4e-01 2.7e-01  1.0e+00 6.5e-02 5.7e-01 6.5e-02 3.3e-01 ↗
[ Info:      7        3  3.0e-01  3.8e-01 1.9e-01 2.2e-01  1.0e+00 5.3e-02 6.4e-01 5.3e-02 3.3e-01 ↗
[ Info:      8        4  2.2e-01  4.1e-01 1.5e-01 1.7e-01  1.0e+00 4.3e-02 6.9e-01 4.3e-02 3.3e-01 ↗
[ Info:      9        5  1.6e-01  4.4e-01 1.2e-01 1.3e-01  1.0e+00 3.4e-02 7.3e-01 3.4e-02 3.3e-01 ↗
[ Info:     10        3  1.3e-01  4.6e-01 8.8e-02 1.0e-01  1.0e+00 2.7e-02 7.7e-01 2.7e-02 3.3e-01 ↗
[ Info:     11        3  1.0e-01  4.7e-01 6.7e-02 7.6e-02  1.0e+00 2.2e-02 7.9e-01 2.2e-02 3.3e-01 ↗
[ Info:     12        2  8.5e-02  4.8e-01 5.1e-02 5.7e-02  1.0e+00 1.8e-02 8.2e-01 1.8e-02 3.3e-01 ↗
[ Info:     13        3  7.3e-02  4.9e-01 3.8e-02 4.2e-02  1.0e+00 1.4e-02 8.3e-01 1.4e-02 3.3e-01 ↗
[ Info:     14        3  6.5e-02  5.0e-01 2.9e-02 3.0e-02  1.0e+00 1.1e-02 8.5e-01 1.1e-02 3.3e-01 ↗
[ Info:     15        2  6.0e-02  5.0e-01 2.3e-02 2.2e-02  1.0e+00 9.3e-03 8.6e-01 9.3e-03 3.3e-01 ↗
[ Info:     16        1  5.7e-02  5.1e-01 1.9e-02 1.8e-02  1.0e+00 7.8e-03 8.7e-01 7.8e-03 3.3e-01 ↗
[ Info:     17        1  5.6e-02  5.1e-01 1.6e-02 1.5e-02  1.0e+00 6.6e-03 8.8e-01 6.6e-03 3.3e-01 ↗
[ Info:     18        1  5.5e-02  5.1e-01 1.3e-02 1.3e-02  1.0e+00 5.5e-03 8.8e-01 5.5e-03 3.3e-01 ↗
[ Info:     19        1  5.4e-02  5.1e-01 1.1e-02 1.1e-02  1.0e+00 4.6e-03 8.9e-01 4.6e-03 3.3e-01 ↗
[ Info:     20        1  5.4e-02  5.1e-01 9.4e-03 9.2e-03  1.0e+00 3.9e-03 8.9e-01 3.9e-03 3.3e-01 ↗
[ Info:     21        1  5.3e-02  5.1e-01 7.9e-03 7.8e-03  1.0e+00 3.3e-03 9.0e-01 3.3e-03 3.3e-01 ↗
[ Info:     22        1  5.3e-02  5.1e-01 6.7e-03 6.6e-03  1.0e+00 2.8e-03 9.0e-01 2.8e-03 3.3e-01 ↗
[ Info:     23        1  5.2e-02  5.1e-01 5.6e-03 5.6e-03  1.0e+00 2.4e-03 9.0e-01 2.4e-03 3.3e-01 ↗
[ Info:     24        0  5.2e-02  5.1e-01 4.8e-03 4.6e-03  1.0e+00 2.0e-03 9.1e-01 2.0e-03 3.3e-01 ↗
[ Info:     25        0  5.2e-02  5.1e-01 4.0e-03 3.9e-03  1.0e+00 1.7e-03 9.1e-01 1.7e-03 3.3e-01 ↗
[ Info:     26        0  5.2e-02  5.1e-01 3.5e-03 3.3e-03  1.0e+00 1.4e-03 9.1e-01 1.4e-03 3.3e-01 ↗
[ Info:     27        0  5.2e-02  5.1e-01 3.0e-03 2.8e-03  1.0e+00 1.2e-03 9.1e-01 1.2e-03 3.3e-01 ↗
[ Info:     28        0  5.2e-02  5.1e-01 2.5e-03 2.4e-03  1.0e+00 1.0e-03 9.1e-01 1.0e-03 3.3e-01 ↗
[ Info:     29        0  5.2e-02  5.1e-01 2.2e-03 2.1e-03  1.0e+00 8.6e-04 9.1e-01 8.6e-04 3.3e-01 ↗
[ Info:     30        0  5.2e-02  5.1e-01 1.9e-03 1.8e-03  1.0e+00 7.3e-04 9.1e-01 7.3e-04 3.3e-01 ↗
[ Info:     31        0  5.1e-02  5.1e-01 1.6e-03 1.6e-03  1.0e+00 6.2e-04 9.1e-01 6.2e-04 3.3e-01 ↗
[ Info:     32        0  5.1e-02  5.1e-01 1.4e-03 1.4e-03  1.0e+00 5.3e-04 9.2e-01 5.3e-04 3.3e-01 ↗
[ Info:     33        1  5.1e-02  5.1e-01 1.2e-03 1.2e-03          1.0e+00 9.2e-01 4.5e-04 3.3e-01
[ Info: LMTR: terminating with √(ξ1/ν) = 0.002162985823872107
"Execution stats: first-order stationary"

@MaxenceGollier
Copy link
Collaborator Author

@dpo, feel free to review when you have some time !

@dpo dpo merged commit 649bb81 into JuliaSmoothOptimizers:master Sep 29, 2025
13 of 14 checks passed
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