Skip to content

Commit

Permalink
Enable subsolver tolerances tuning, fix negative tolerance (#93)
Browse files Browse the repository at this point in the history
* tune inner solver parameters, fix error negative tol

* improve tables, change test parameters, modif demos

* keep default value bpdn

* update tables parameters

* update parameters name noredTR
  • Loading branch information
geoffroyleconte authored Mar 24, 2023
1 parent a82c768 commit 2ea2780
Show file tree
Hide file tree
Showing 13 changed files with 495 additions and 177 deletions.
97 changes: 74 additions & 23 deletions benchmarks/tables/bpdn-constr-table.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,101 @@ model, nls_model, sol = bpdn_model(compound, bounds = true)

f = LSR1Model(model)
λ = norm(grad(model, zeros(model.meta.nvar)), Inf) / 10
h = NormL1(λ)
h = NormL0(λ)

verbose = 0 # 10
ϵ = 1.0e-6
ν = 1.0
ϵ = 1.0e-5
ϵi = 1.0e-5
ϵri = 1.0e-6
maxIter = 500
maxIter_inner = 20
maxIter_inner = 100
options =
ROSolverOptions= 1.0, ϵa = ϵ, ϵr = ϵ, verbose = verbose, maxIter = maxIter, spectral = true)
options2 = ROSolverOptions(spectral = false, psb = true, ϵa = ϵ, ϵr = ϵ, maxIter = maxIter_inner)
options3 = ROSolverOptions(spectral = false, psb = false, ϵa = ϵ, ϵr = ϵ, maxIter = maxIter_inner)
options4 = ROSolverOptions(spectral = true, ϵa = ϵ, ϵr = ϵ, maxIter = maxIter_inner)
options6 = ROSolverOptions(
ν = 1.0,
ROSolverOptions= ν, ϵa = ϵ, ϵr = ϵ, verbose = verbose, maxIter = maxIter, spectral = true)
options_nrTR =
ROSolverOptions= ν, ϵa = ϵ, ϵr = ϵ, verbose = verbose, maxIter = maxIter, spectral = true, reduce_TR = false)
options2 = ROSolverOptions(spectral = false, psb = true, ϵa = ϵi, ϵr = ϵri, maxIter = maxIter_inner)
options2_nrTR = ROSolverOptions(spectral = false, psb = true, ϵa = ϵi, ϵr = ϵri, maxIter = maxIter_inner, reduce_TR = false)
options3 = ROSolverOptions(spectral = false, psb = false, ϵa = ϵi, ϵr = ϵri, maxIter = maxIter_inner)
options3_nrTR = ROSolverOptions(spectral = false, psb = false, ϵa = ϵi, ϵr = ϵri, maxIter = maxIter_inner, reduce_TR = false)
options4 = ROSolverOptions(spectral = true, ϵa = ϵi, ϵr = ϵri, maxIter = maxIter_inner)
options4_nrTR =
ROSolverOptions(spectral = true, ϵa = ϵi, ϵr = ϵri, maxIter = maxIter_inner, reduce_TR = false)
options5 = ROSolverOptions(
ν = ν,
ϵa = ϵ,
ϵr = ϵ,
verbose = verbose,
maxIter = maxIter,
spectral = false,
psb = false,
psb = true,
)
options5 = ROSolverOptions(
ν = 1.0,
options5_nrTR = ROSolverOptions(
ν = ν,
ϵa = ϵ,
ϵr = ϵ,
verbose = verbose,
maxIter = maxIter,
spectral = false,
psb = true,
reduce_TR = false,
)
options7 = ROSolverOptions(
options6 = ROSolverOptions(
ν = ν,
ϵa = ϵ,
ϵr = ϵ,
verbose = verbose,
maxIter = maxIter,
spectral = false,
psb = true,
psb = false,
)
options6_nrTR = ROSolverOptions(
ν = ν,
ϵa = ϵ,
ϵr = ϵ,
maxIter = maxIter_inner,
verbose = verbose,
maxIter = maxIter,
spectral = false,
psb = false,
reduce_TR = false,
)

solvers = [:R2, :TRDH, :TRDH, :TRDH, :TR, :TR, :TR, :TR, :TR]
subsolvers = [:None, :None, :None, :None, :R2, :TRDH, :TRDH, :TRDH, :TRDH]
solver_options = [options, options, options5, options6, options, options, options, options, options]
subsolver_options =
[options2, options2, options2, options2, options2, options7, options2, options3, options4] # n'importe lequel si subsolver = :None

benchmark_table(
solvers = [:R2, :TRDH, :TRDH, :TRDH, :TRDH, :TRDH, :TRDH, :TR, :TR, :TR, :TR, :TR, :TR, :TR]
subsolvers = [:None, :None, :None, :None, :None, :None, :None, :R2, :TRDH, :TRDH, :TRDH, :TRDH, :TRDH, :TRDH]
solver_options = [
options,
options,
options_nrTR,
options5,
options5_nrTR,
options6,
options6_nrTR,
options,
options,
options,
options,
options,
options,
options,
options,
]
subsolver_options = [
options2,
options2,
options2,
options2,
options2,
options2,
options2,
options2,
options2,
options2_nrTR,
options3,
options3_nrTR,
options4,
options4_nrTR,
] # n'importe lequel si subsolver = :None
stats = benchmark_table(
f,
1:(f.meta.nvar),
sol,
Expand All @@ -62,4 +112,5 @@ benchmark_table(
solver_options,
subsolver_options,
"BPDN-cstr",
)
tex = false,
);
89 changes: 64 additions & 25 deletions benchmarks/tables/bpdn-table.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,64 +8,102 @@ model, nls_model, sol = bpdn_model(compound, bounds = false)
# parameters
f = LSR1Model(model)
λ = norm(grad(model, zeros(model.meta.nvar)), Inf) / 10
h = NormL1(λ)
h = NormL0(λ)

verbose = 0 # 10
ϵ = 1.0e-6
ν = 1.0
ϵ = 1.0e-5
ϵi = 1.0e-5
ϵri = 1.0e-6
maxIter = 500
maxIter_inner = 40
maxIter_inner = 100
options =
ROSolverOptions= 1.0, ϵa = ϵ, ϵr = ϵ, verbose = verbose, maxIter = maxIter, spectral = true)
options2 = ROSolverOptions(spectral = false, psb = true, ϵa = ϵ, ϵr = ϵ, maxIter = maxIter_inner)
options3 = ROSolverOptions(spectral = false, psb = false, ϵa = ϵ, ϵr = ϵ, maxIter = maxIter_inner)
options4 = ROSolverOptions(spectral = true, ϵa = ϵ, ϵr = ϵ, maxIter = maxIter_inner)
options6 = ROSolverOptions(
ν = 1.0,
ROSolverOptions= ν, ϵa = ϵ, ϵr = ϵ, verbose = verbose, maxIter = maxIter, spectral = true)
options_nrTR =
ROSolverOptions= ν, ϵa = ϵ, ϵr = ϵ, verbose = verbose, maxIter = maxIter, spectral = true, reduce_TR = false)
options2 = ROSolverOptions(spectral = false, psb = true, ϵa = ϵi, ϵr = ϵri, maxIter = maxIter_inner)
options2_nrTR = ROSolverOptions(spectral = false, psb = true, ϵa = ϵi, ϵr = ϵri, maxIter = maxIter_inner, reduce_TR = false)
options3 = ROSolverOptions(spectral = false, psb = false, ϵa = ϵi, ϵr = ϵri, maxIter = maxIter_inner)
options3_nrTR = ROSolverOptions(spectral = false, psb = false, ϵa = ϵi, ϵr = ϵri, maxIter = maxIter_inner, reduce_TR = false)
options4 = ROSolverOptions(spectral = true, ϵa = ϵi, ϵr = ϵri, maxIter = maxIter_inner)
options4_nrTR =
ROSolverOptions(spectral = true, ϵa = ϵi, ϵr = ϵri, maxIter = maxIter_inner, reduce_TR = false)
options5 = ROSolverOptions(
ν = ν,
ϵa = ϵ,
ϵr = ϵ,
verbose = verbose,
maxIter = maxIter,
spectral = false,
psb = false,
psb = true,
)
options5 = ROSolverOptions(
ν = 1.0,
options5_nrTR = ROSolverOptions(
ν = ν,
ϵa = ϵ,
ϵr = ϵ,
verbose = verbose,
maxIter = maxIter,
spectral = false,
psb = true,
reduce_TR = false,
)
options7 = ROSolverOptions(
options6 = ROSolverOptions(
ν = ν,
ϵa = ϵ,
ϵr = ϵ,
verbose = verbose,
maxIter = maxIter,
spectral = false,
psb = true,
psb = false,
)
options6_nrTR = ROSolverOptions(
ν = ν,
ϵa = ϵ,
ϵr = ϵ,
maxIter = maxIter_inner,
verbose = verbose,
maxIter = maxIter,
spectral = false,
psb = false,
reduce_TR = false,
)
options8 =
ROSolverOptions(spectral = true, ϵa = ϵ, ϵr = ϵ, maxIter = maxIter_inner, reduce_TR = false)

solvers = [:R2, :TRDH, :TRDH, :TRDH, :TR, :TR, :TR, :TR, :TR, :TR]
subsolvers = [:None, :None, :None, :None, :R2, :TRDH, :TRDH, :TRDH, :TRDH, :TRDH]
solver_options =
[options, options, options5, options6, options, options, options, options, options, options]
solvers = [:R2, :TRDH, :TRDH, :TRDH, :TRDH, :TRDH, :TRDH, :TR, :TR, :TR, :TR, :TR, :TR, :TR]
subsolvers = [:None, :None, :None, :None, :None, :None, :None, :R2, :TRDH, :TRDH, :TRDH, :TRDH, :TRDH, :TRDH]
solver_options = [
options,
options,
options_nrTR,
options5,
options5_nrTR,
options6,
options6_nrTR,
options,
options,
options,
options,
options,
options,
options,
options,
]
subsolver_options = [
options2,
options2,
options2,
options2,
options2,
options7,
options2,
options2,
options2,
options2,
options2_nrTR,
options3,
options3_nrTR,
options4,
options8,
options4_nrTR,
] # n'importe lequel si subsolver = :None

benchmark_table(
stats = benchmark_table(
f,
1:(f.meta.nvar),
sol,
Expand All @@ -76,4 +114,5 @@ benchmark_table(
solver_options,
subsolver_options,
"BPDN",
)
tex = false,
);
Loading

0 comments on commit 2ea2780

Please sign in to comment.