Fix parameterized sparse constraint Jacobians in Ipopt - #1291
Merged
ChrisRackauckas merged 1 commit intoJul 31, 2026
Merged
Conversation
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix
OptimizationIpopt.eval_constraint_jacobianto pass the live cache parameter only when the instantiatedcons_jclosure accepts it.OptimizationBasesparse instantiation captures parameters for a suppliedcons_j, yielding a two-argument closure.This fixes the clean-master
BoundaryValueDiffEqMIRKSciMLStructures/Ipopt failure without changing BoundaryValueDiffEq or #577.Baseline trace
BoundaryValueDiffEqclean master (219b5021), Julia 1.12, current resolver: the MIRK Core test errors inOptimizationIpopt.eval_constraint_jacobianbecause a two-argument instantiatedcons_jis called with(J, x, p).3b0cff7a3ofbe6fbd279passes; the current evaluator path fails pre-fix; this branch passes.Tests
OPTIMIZATION_TEST_GROUP=Core julia +1.12 --project=lib/OptimizationIpopt -e "using Pkg; Pkg.develop(path = \"lib/OptimizationBase\"); Pkg.test()"Runic --check --diff --quietgit diff --checkIgnore until reviewed by @ChrisRackauckas.