[Utilities] allow penalty relaxation for ScalarNonlinear constraints#2875
Merged
odow merged 6 commits intojump-dev:masterfrom Oct 30, 2025
Merged
[Utilities] allow penalty relaxation for ScalarNonlinear constraints#2875odow merged 6 commits intojump-dev:masterfrom
odow merged 6 commits intojump-dev:masterfrom
Conversation
Member
|
Nice nice nice. I can take over and add tests, etc. |
Member
|
So one issue: we currently modify each constraint in sequence, and for every constraint, we modify the objective. It might be better to cache the penalties and modify the objective only at the end. |
Member
Done |
Member
|
Okay, I've now done a bunch of things:
Before After This should also make MathOptIIS much faster as well. |
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.
I'd like to use
JuMP.relax_with_penalty!on a model with nonlinear constraints. If this implementation looks reasonable, I can clean this up and add tests. Here's an example:Limitations
ScalarNonlinearFunctionobjectives. We get a confusing warning in this case.VariableIndexobjectives. We probably get the same confusing warning here.I think both of these can be supported without too much effort.