Add efficiency for handling PyROS separation problem sub-solver errors#3441
Merged
blnicho merged 13 commits intoPyomo:mainfrom Feb 12, 2025
Merged
Add efficiency for handling PyROS separation problem sub-solver errors#3441blnicho merged 13 commits intoPyomo:mainfrom
blnicho merged 13 commits intoPyomo:mainfrom
Conversation
jsiirola
approved these changes
Dec 18, 2024
Member
jsiirola
left a comment
There was a problem hiding this comment.
This looks good, pending passing all tests.
1 task
Member
|
@jas-yao are you planning to address the TODO item listed above "Update version number and changelog" before this gets merged? |
Contributor
Author
|
I've completed the TODO. Thanks for the reminder @blnicho! |
jsiirola
approved these changes
Feb 6, 2025
blnicho
approved these changes
Feb 10, 2025
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/Motivation:
PyROS currently terminates with a
subsolver_errorstatus 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_errorand 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_errorto check if violations were found in the separation loop.subsolver_error=Truefor the separation loop only when no other violations are found.DiscreteSeparationSolveCallResult.subsolver_errorto check if all scenarios hadsubsolver_error.subsolver_error=Trueonly if all scenarios failed to solve.discrete_solveandget_worst_discrete_separation_solutionto handle potential sub-solver errors without causing PyROS to terminate immediatelyTestPyROSSubsolverErrorEfficiencyTODO (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: