Skip to content

Commit

Permalink
Bump to ADNLPModels 0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
tmigot committed Aug 6, 2024
1 parent a72e9d7 commit 695bd1f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
QPSReader = "10f199a5-22af-520b-b891-7ce84a7b1bd0"
SolverCore = "ff4d7338-4cf1-434d-91df-b86cb86fb843"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5"
SparseMatricesCOO = "fa32481b-f100-4b48-8dc8-c62f61b13870"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
ADNLPModels = "0.7"
ADNLPModels = "0.8"
LinearOperators = "2"
NLPModels = "0.21"
NLPModelsModifiers = "0.7"
NLPModelsTest = "0.10"
QPSReader = "0.2"
SolverCore = "0.3"
SparseConnectivityTracer = "0.6"
SparseMatricesCOO = "0.2"
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ using ADNLPModels,
NLPModelsTest,
QPSReader,
QuadraticModels,
SparseConnectivityTracer,
SparseMatricesCOO

@testset "test utils" begin
Expand Down
4 changes: 3 additions & 1 deletion test/test_consistency.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ for problem in NLPModelsTest.nlp_problems
nlp = eval(Symbol(problem))()
x = nlp.meta.x0

fx, gx, Hx = obj(nlp, x), grad(nlp, x), Symmetric(hess(nlp, x), :L)
fx, gx, Hx = obj(nlp, x), grad(nlp, x), hess(nlp, x)
nlp_ad = if nlp.meta.ncon > 0
cx, Ax = cons(nlp, x), jac(nlp, x)
ADNLPModel(
Expand All @@ -68,13 +68,15 @@ for problem in NLPModelsTest.nlp_problems
Ax,
nlp.meta.lcon - cx,
nlp.meta.ucon - cx,
detector = SparseConnectivityTracer.TracerLocalSparsityDetector(),
)
else
ADNLPModel(
s -> fx + dot(gx, s) + dot(s, Hx * s) / 2,
zeros(nlp.meta.nvar),
nlp.meta.lvar - x,
nlp.meta.uvar - x,
detector = SparseConnectivityTracer.TracerLocalSparsityDetector(),
)
end
nlp_qm = QuadraticModel(nlp, x)
Expand Down

0 comments on commit 695bd1f

Please sign in to comment.