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

Compare jprod default and with jacobian structure #54

Open
tmigot opened this issue Jul 8, 2022 · 2 comments
Open

Compare jprod default and with jacobian structure #54

tmigot opened this issue Jul 8, 2022 · 2 comments

Comments

@tmigot
Copy link
Member

tmigot commented Jul 8, 2022

In lines

@test isapprox(Jps[i], tmp_m, atol = rtol * max(Jmin, 1.0))

and
@test isapprox(Jtps[i], tmp_n, atol = rtol * max(Jmin, 1.0))

we compare the usual jtprod!(nlp, x, jtv) with jtprod!(nlps[i], rows, cols, vals, w, tmp_n).

However, the results may differ (in the order of the returned vector), since some models re-implement jac_structure and jac_coord on top of jac_lin_*** and jac_nln_*** without putting the linear constraints first (for instance AmplNLReader.jl).

@dpo
Copy link
Member

dpo commented Jul 8, 2022

Are nlp and nlps[i] the same model (coming from the same source)? If so, the constraints should be in the same order in both.

@tmigot
Copy link
Member Author

tmigot commented Jul 8, 2022

Right now, not necessarily. For instance, we will compare HS14 coming from this package https://github.com/JuliaSmoothOptimizers/NLPModelsTest.jl/blob/main/src/nlp/problems/hs14.jl and the HS14 in AmplModel format.

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

No branches or pull requests

2 participants