Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit test fails for HS14 #279

Closed
tmigot opened this issue Jul 7, 2022 · 0 comments · Fixed by #281
Closed

Unit test fails for HS14 #279

tmigot opened this issue Jul 7, 2022 · 0 comments · Fixed by #281

Comments

@tmigot
Copy link
Member

tmigot commented Jul 7, 2022

In https://github.com/JuliaSmoothOptimizers/NLPModelsTest.jl/pull/50/files we modified the test problem HS14 by putting the constraint function linear, while it is affine in CUTEst.

So, in the unit tests, I would suggest doing:

function compare_cons(nlp1, cx1, nlp2, cx2, rtol)
  @test isapprox(cx1 - nlp1.meta.ucon, cx2 - nlp2.meta.ucon, rtol = rtol)
  @test isapprox(cx1 - nlp1.meta.lcon, cx2 - nlp2.meta.lcon, rtol = rtol)
end

compare_cons(nlp, cx, comp_nlp, c(x0), rtol)

instead of

@test isapprox(cx, c(x0), rtol = rtol)

Trying this, I realized there was also an error for HS11 in NLPModelsTest.jl JuliaSmoothOptimizers/NLPModelsTest.jl#53

@tmigot tmigot linked a pull request Aug 8, 2022 that will close this issue
@tmigot tmigot closed this as completed Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant