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
20 changes: 13 additions & 7 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,35 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
[compat]
ADNLPModels = "^0.3, 0.4, 0.7"
Distributions = "0.25"
LinearOperators = "2.11.0"
ManualNLPModels = "0.2"
MLDatasets = "^0.7.4"
NLPModels = "0.16, 0.17, 0.18, 0.19, 0.20, 0.21"
NLPModelsModifiers = "0.7.3"
Copy link
Member

Choose a reason for hiding this comment

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

Those seem to be only required for the tests?!

Noise = "0.2"
Requires = "1"
julia = "^1.6.0"

[extras]
ADNLPModels = "54578032-b7ea-4c30-94aa-7cbd1cce6c9a"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
LinearOperators = "5c8ed15e-5a4c-59e4-a42b-c7e8811fb125"
MLDatasets = "eb30cadb-4394-5ae3-aed4-317e484a6458"
NLPModelsModifiers = "e01155f1-5c6f-4375-a9d8-616dd036575f"
ProximalOperators = "a725b495-10eb-56fe-b38b-717eba820537"
QuadraticModels = "f468eda6-eac5-11e8-05a5-ff9e497bcd19"
ShiftedProximalOperators = "d4fd37fa-580c-4e43-9b30-361c21aae263"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = [
"ADNLPModels",
"DifferentialEquations",
"MLDatasets",
"ProximalOperators",
"QuadraticModels",
"ShiftedProximalOperators",
"Test",
"ADNLPModels",
"DifferentialEquations",
"LinearOperators",
"MLDatasets",
"NLPModelsModifiers",
"ProximalOperators",
"QuadraticModels",
"ShiftedProximalOperators",
"Test"
]
4 changes: 4 additions & 0 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ function NLPModels.obj(rnlp::AbstractRegularizedNLPModel, x::AbstractVector)
obj(rnlp.model, x) + rnlp.h(x)
end

function NLPModels.hess_op(rnlp::AbstractRegularizedNLPModel, x::AbstractVector)
return hess_op(rnlp.model, x)
end

# Forward meta getters so they grab info from the smooth model
for field ∈ fieldnames(NLPModels.NLPModelMeta)
meth = Symbol("get_", field)
Expand Down
2 changes: 2 additions & 0 deletions test/rmodel_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ using ProximalOperators
@test get_nequ(rlsmodel) == get_nequ(nls_model)
obj(nls_model, nls_model.meta.x0)
@test neval_obj(rlsmodel) == neval_obj(nls_model)
rmodel_lbfgs = RegularizedNLPModel(LBFGSModel(model), h)
@test typeof(hess_op(rmodel_lbfgs, model.meta.x0)) <: LBFGSOperator
end

@testset "Problem combos" begin
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using LinearAlgebra, Test
using ADNLPModels, DifferentialEquations, ManualNLPModels, MLDatasets, NLPModels, QuadraticModels
using ADNLPModels, DifferentialEquations, LinearOperators, ManualNLPModels, MLDatasets, NLPModels, NLPModelsModifiers, QuadraticModels
using RegularizedProblems

function test_well_defined(model, nls_model, sol)
Expand Down
Loading