Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jas-yao
Copy link

@jas-yao jas-yao commented Dec 3, 2024

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 no subsolver_error) or terminate with subsolver_error (if the final iteration contains a subsolver_error and no performance constraints are violated). This efficiency may improve PyROS's robustness and help to successfully solve problems that currently terminate immediately with subsolver_error.

Changes proposed in this PR:

  • Update 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.
  • Update DiscreteSeparationSolveCallResult.subsolver_error to check if all scenarios had subsolver_error. subsolver_error=True only if all scenarios failed to solve.
  • Update discrete_solve and get_worst_discrete_separation_solution to handle potential sub-solver errors without causing PyROS to terminate immediately
  • Add log warnings to report sub-solver errors and inform that PyROS will continue to solve if a violation is found.
  • Add unit tests for continuous and discrete uncertainty sets in TestPyROSSubsolverErrorEfficiency

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:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@jas-yao jas-yao changed the title Add efficiency for handling separation problem subsolver errors Add efficiency for handling separation problem sub-solver errors Dec 3, 2024
@jas-yao jas-yao changed the title Add efficiency for handling separation problem sub-solver errors Add efficiency for handling PyROS separation problem sub-solver errors Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant