-
Notifications
You must be signed in to change notification settings - Fork 528
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
Add efficiency for handling PyROS separation problem sub-solver errors #3441
Merged
Conversation
This file contains 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
jsiirola
approved these changes
Dec 18, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, pending passing all tests.
1 task
@jas-yao are you planning to address the TODO item listed above "Update version number and changelog" before this gets merged? |
I've completed the TODO. Thanks for the reminder @blnicho! |
jsiirola
approved these changes
Feb 6, 2025
blnicho
approved these changes
Feb 10, 2025
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/Motivation:
PyROS currently terminates with a
subsolver_error
status when user-supplied sub-solvers fail to successfully solve a separation problem. However, the PyROS algorithm can potentially recover from these separation problem sub-solver errors by moving to the next iteration using violated constraints from the set of successfully solved separation problems. Here, PyROS should continue solving as long as constraint violations are found and either terminate successfully (if the final iteration contains nosubsolver_error
) or terminate withsubsolver_error
(if the final iteration contains asubsolver_error
and no performance constraints are violated). This efficiency may improve PyROS's robustness and help to successfully solve problems that currently terminate immediately withsubsolver_error
.Changes proposed in this PR:
SeparationLoopResults.subsolver_error
to check if violations were found in the separation loop.subsolver_error=True
for the separation loop only when no other violations are found.DiscreteSeparationSolveCallResult.subsolver_error
to check if all scenarios hadsubsolver_error
.subsolver_error=True
only if all scenarios failed to solve.discrete_solve
andget_worst_discrete_separation_solution
to handle potential sub-solver errors without causing PyROS to terminate immediatelyTestPyROSSubsolverErrorEfficiency
TODO (after #3439 merged)
Legal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution: