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

Fix PyROS UncertaintySet.bouding_problem Method #2659

Merged
merged 4 commits into from
Dec 7, 2022

Conversation

shermanjasonaf
Copy link
Contributor

Summary/Motivation:

The method pyros.UncertaintySet.bounding_model may require access to the subordinate global optimizer passed to the PyROS solver, depending on the type of the uncertainty set passed to the solver. In particular, this requirement holds for the PyROS IntersectionSet.

Changes proposed in this PR:

  • Add config argument to UncertaintySet.bounding_problem.
  • Add test for two-stage model instances with an uncertainty set of type IntersectionSet.

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.

@@ -348,7 +348,7 @@ def parameter_bounds(self):
"""
raise NotImplementedError

def bounding_model(self):
def bounding_model(self, config=None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should describe this new argument in the docstring

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See subsequent commit

@codecov
Copy link

codecov bot commented Dec 7, 2022

Codecov Report

Base: 87.06% // Head: 87.06% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (8eeadfe) compared to base (9a5681f).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2659   +/-   ##
=======================================
  Coverage   87.06%   87.06%           
=======================================
  Files         757      757           
  Lines       84293    84293           
=======================================
+ Hits        73386    73389    +3     
+ Misses      10907    10904    -3     
Flag Coverage Δ
linux 84.48% <100.00%> (ø)
osx 74.91% <100.00%> (ø)
other 84.67% <100.00%> (ø)
win 81.84% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pyomo/contrib/pyros/pyros.py 94.24% <100.00%> (ø)
pyomo/contrib/pyros/uncertainty_sets.py 92.91% <100.00%> (+0.23%) ⬆️
pyomo/contrib/pyros/util.py 86.03% <0.00%> (+0.18%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@blnicho blnicho merged commit 6d9db0f into Pyomo:main Dec 7, 2022
@shermanjasonaf shermanjasonaf deleted the fix-make-set-bounding-problem branch June 19, 2023 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants