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
12 changes: 10 additions & 2 deletions src/AL_alg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,20 @@ function ALSolver(reg_nlp::AbstractRegularizedNLPModel{T, V}; kwargs...) where {
y = V(undef, ncon)
has_bnds = has_bounds(nlp)
sub_model = AugLagModel(nlp, V(undef, ncon), T(0), x, T(0), V(undef, ncon))
sub_problem = RegularizedNLPModel(sub_model, reg_nlp.h,reg_nlp.selected)
sub_problem = RegularizedNLPModel(sub_model, reg_nlp.h, reg_nlp.selected)
sub_solver = R2Solver(reg_nlp; kwargs...)
sub_stats = RegularizedExecutionStats(sub_problem)
M = typeof(nlp)
ST = typeof(sub_solver)
return ALSolver{T, V, M, typeof(sub_problem), ST}(x, cx, y, has_bnds, sub_problem, sub_solver, sub_stats)
return ALSolver{T, V, M, typeof(sub_problem), ST}(
x,
cx,
y,
has_bnds,
sub_problem,
sub_solver,
sub_stats,
)
end

@doc (@doc ALSolver) function AL(::Val{:equ}, reg_nlp::AbstractRegularizedNLPModel; kwargs...)
Expand Down
9 changes: 8 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
using LinearAlgebra: length
using LinearAlgebra, Random, Test
using ProximalOperators
using ADNLPModels, OptimizationProblems, OptimizationProblems.ADNLPProblems, NLPModels, NLPModelsModifiers, RegularizedProblems, RegularizedOptimization, SolverCore
using ADNLPModels,
OptimizationProblems,
OptimizationProblems.ADNLPProblems,
NLPModels,
NLPModelsModifiers,
RegularizedProblems,
RegularizedOptimization,
SolverCore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MaxenceGollier @MohamedLaghdafHABIBOULLAH Please configure your formatter locally. These changes should already have been part of the PR.


const global compound = 1
const global nz = 10 * compound
Expand Down