Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/R2_alg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ function R2Solver(
)
end

function R2Solver(
reg_nlp::AbstractRegularizedNLPModel{T, V};
m_monotone::Int = 6,
) where {T, V}
function R2Solver(reg_nlp::AbstractRegularizedNLPModel{T, V}; m_monotone::Int = 6) where {T, V}
x0 = reg_nlp.model.meta.x0
l_bound = reg_nlp.model.meta.lvar
u_bound = reg_nlp.model.meta.uvar
Expand Down
6 changes: 3 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const global bpdn, bpdn_nls, sol = bpdn_model(compound)
const global bpdn2, bpdn_nls2, sol2 = bpdn_model(compound, bounds = true)
const global λ = norm(grad(bpdn, zeros(bpdn.meta.nvar)), Inf) / 10

R2mono(nlp, h, options; kwargs...) = R2(nlp, h, options; m_monotone=1, kwargs...)
R2mono(nlp, h, options; kwargs...) = R2(nlp, h, options; m_monotone = 1, kwargs...)

include("test_AL.jl")

Expand Down Expand Up @@ -144,7 +144,7 @@ end

for (mod, mod_name) ∈ ((SpectralGradientModel, "spg"),)
for (h, h_name) ∈ ((NormL1(λ), "l1"),)
for solver_sym ∈ (:R2,:R2mono)
for solver_sym ∈ (:R2, :R2mono)
solver_name = string(solver_sym)
solver = eval(solver_sym)
@testset "bpdn-$(mod_name)-$(solver_name)-$(h_name)-callback" begin
Expand All @@ -154,7 +154,7 @@ for (mod, mod_name) ∈ ((SpectralGradientModel, "spg"),)
stats.status = :user
end
end
out = solver(mod(bpdn), h, options, x0 = x0, callback=cb)
out = solver(mod(bpdn), h, options, x0 = x0, callback = cb)
@test typeof(out.solution) == typeof(bpdn.meta.x0)
@test length(out.solution) == bpdn.meta.nvar
@test typeof(out.dual_feas) == eltype(out.solution)
Expand Down