JuliaSmoothOptimizers / ADNLPModels.jl

Other
29 stars 12 forks source link

Update files related to sparse Jacobian #125

Closed amontoison closed 1 year ago

amontoison commented 1 year ago

Tangi, I don't understand how the SparseDiffTools version of the sparse Jacobian is working with NLS models. We still use the constructor SparseForwardADJacobian(nvar, f, ncon, c!) but

function jac_coord_residual!(
  b::SparseForwardADJacobian,
  nls::AbstractADNLSModel,
  x::AbstractVector,
  vals::AbstractVector,
)
  forwarddiff_color_jacobian!(b.cfJ.sparsity, nls.F!, x, b.cfJ)
  vals .= nonzeros(b.cfJ.sparsity)
  return vals
end

b.cfJ.sparsity is the sparsity pattern of the Jacobian of c and not F?

Update: Forgot my comment, you just use the constructor with SparseForwardADJacobian(nvar, f, nequ, F!; kwargs...)...

github-actions[bot] commented 1 year ago
Package name latest stable
CaNNOLeS.jl
DCISolver.jl
DerivativeFreeSolvers.jl
JSOSolvers.jl
NLPModelsIpopt.jl
OptimizationProblems.jl
Percival.jl
QuadraticModels.jl
SolverBenchmark.jl
SolverTools.jl
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01 :warning:

Comparison is base (89f086b) 98.74% compared to head (5be6b29) 98.74%.

:exclamation: Current head 5be6b29 differs from pull request most recent head fd8ead1. Consider uploading reports for the commit fd8ead1 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #125 +/- ## ========================================== - Coverage 98.74% 98.74% -0.01% ========================================== Files 8 8 Lines 1038 1035 -3 ========================================== - Hits 1025 1022 -3 Misses 13 13 ``` | [Impacted Files](https://codecov.io/gh/JuliaSmoothOptimizers/ADNLPModels.jl/pull/125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers) | Coverage Δ | | |---|---|---| | [src/ADNLPModels.jl](https://codecov.io/gh/JuliaSmoothOptimizers/ADNLPModels.jl/pull/125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers#diff-c3JjL0FETkxQTW9kZWxzLmps) | `100.00% <ø> (ø)` | | | [src/sparse\_jacobian.jl](https://codecov.io/gh/JuliaSmoothOptimizers/ADNLPModels.jl/pull/125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers#diff-c3JjL3NwYXJzZV9qYWNvYmlhbi5qbA==) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.