-
Notifications
You must be signed in to change notification settings - Fork 20
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
nnzj in NLPModels #329
Comments
For the same
The first one has repeated entry pairs, but still works, whereas the second assigns zeros. Going into |
Thank you for the report @aldma. Indeed, it seems like a bug for zeros to appear in the sparsity structure. If I understand well, you are using |
I remember a recent conversation with @tmigot about those zeros. I can reproduce the issue above. I don’t think they should be there. This behavior: ulia> jac_structure(nlp)
([1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5], [1, 2, 2, 1, 2, 1, 4, 2, 1, 3, 1, 2])
julia> jac_lin_structure(nlp)
([1, 1, 2, 2, 1, 1, 1, 1], [1, 2, 2, 1, 1, 1, 1, 1])
julia> jac_nln_structure(nlp)
([1, 1, 1, 2, 2, 2, 3, 3, 0, 0, 0, 0], [2, 1, 4, 2, 1, 3, 1, 2, 0, 0, 0, 0])
julia> nlp.meta.nnzj, nlp.meta.lin_nnzj, nlp.meta.nln_nnzj
(12, 8, 12) doesn’t make much sense. @tmigot Could you remind me what the logic was for those zeros? |
I don’t see why the lines https://github.com/JuliaSmoothOptimizers/CUTEst.jl/blob/main/src/julia_interface.jl#L453 are there. I would expect |
You are right to assume that |
Hi guys! I think the issue come from the way we initialize Line 383 in f2ad6a4
There should be a better way. (moving this issue to CUTEst.jl) |
I have a similar issue on the problem
I get the error message
This is due to JuliaSmoothOptimizers/NLPModels.jl#448, the initialization of |
I asked Nick how we can determine |
It should be fixed with #351. |
Dear JSOptimizers,
I encountered an issue while using SlackModel, which possibly traces back to the use or definition of
nnzj
,lin_nnzj
andnln_nnzj
inNLPModelsMeta
.It should be reproducible with
Using julia 1.10.4, CUTEst v0.13.2, NLPModels v0.20.0, NLPModelsModifiers v0.7.2, I have experienced the following error
Looking closely at the HS75 problem and the nlp.meta structure, we have
nlp.meta.nnzj = 12
nlp.meta.lin_nnzj = 8
nlp.meta.nln_nnzj = 12
and somewhat surprisingly NLPModels.jac manages to return the Jacobian matrix. There are indeed 12 nonzeros but only 4 for linear constraints and 8 nonlinear ones.
For the SlackModel snlp we have
snlp.meta.nnzj = 14
snlp.meta.lin_nnzj = 10
snlp.meta.nln_nnzj = 12
after two slack variables are introduced (correctly). In this case, however, NLPModels.jac fails with the error shown above.
Thank you!
The text was updated successfully, but these errors were encountered: