Update ParOpt interface to support sparse constraints#409
Closed
Update ParOpt interface to support sparse constraints#409
Conversation
Member
Author
|
@gjkennedy just tagging to make you aware of this |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #409 +/- ##
==========================================
- Coverage 74.92% 74.89% -0.03%
==========================================
Files 22 22
Lines 3334 3338 +4
==========================================
+ Hits 2498 2500 +2
- Misses 836 838 +2 ☔ View full report in Codecov by Sentry. |
Member
Author
|
@gjkennedy I see there are two different ways to work with sparse constraints in ParOpt:
Is either one of these approaches preferable from ParOpt's point of view? Also, in option 1 I see that |
Member
Author
|
Closing as this is superceded by #414 |
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.
Purpose
ParOpt now supports sparse constraints which should help some of the performance issues I've run into with it for problems with a lot of constraints.
To use this functionality, the ParOpt problem you create needs to define new methods for computing the sparse constraints separately and another for computing jac-vec products with the sparse constraint jacobian.
As a first step, I figured the best approach would be to treat the linear constraints as sparse and the nonlinear constraints as dense.
I'm opening this as a draft now as I'm not sure the best way to separate the evaluation of the linear and nonlinear constraints, hoping to get @ewu63 's opinion. In particular, I think ParOpt will call the jac-vec product function quite a lot so it might be important to make that quite efficient, ideally we would just have a single sparse mat for all the linear constraints and then do a single mat-vec product.
Closes #353
Expected time until merged
Type of change
Testing
Checklist
flake8andblackto make sure the Python code adheres to PEP-8 and is consistently formattedfprettifyor C/C++ code withclang-formatas applicable