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

Generalize and Fix Uncertain Parameter Bounds Evaluation for PyROS FactorModelSet #2620

Merged
merged 7 commits into from
Nov 29, 2022

Conversation

shermanjasonaf
Copy link
Contributor

Summary/Motivation:

Generalize the PyROS FactorModelSet to allow for cases in which the psi_mat attribute
contains nonnegative entries.

Additionally, we target the following issues with the PyROS FactorModelSet.parameter_bounds method:

  1. Current implementation is inconsistent with what was originally intended.
  2. The current implementation and originally intended formulas may give bounds which are too tight. This is problematic as (a) the bounds are explicitly enforced on the uncertain parameter variables in PyROS separation problems; (b) as a consequence, portions of the uncertainty set may be excluded from separation problems, thereby invalidating any certificate of robustness.

Changes proposed in this PR:

  • Generalize FactorModelSet to allow cases in which psi_mat contains negative entries (and update the documentation accordingly)
  • Resolve issues with FactorModelSet.parameter_bounds
  • Modularize setup of bounding problems for UncertaintySet instances
  • Add unit tests to verify that parameter_bounds gives results which are consistent with bounding LP solutions.

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.

Copy link
Member

@jsiirola jsiirola left a comment

Choose a reason for hiding this comment

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

This looks reasonable.

@codecov
Copy link

codecov bot commented Nov 28, 2022

Codecov Report

Base: 87.00% // Head: 87.07% // Increases project coverage by +0.06% 🎉

Coverage data is based on head (33ac1af) compared to base (14b5957).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2620      +/-   ##
==========================================
+ Coverage   87.00%   87.07%   +0.06%     
==========================================
  Files         754      754              
  Lines       83954    84672     +718     
==========================================
+ Hits        73047    73727     +680     
- Misses      10907    10945      +38     
Flag Coverage Δ
linux 84.41% <100.00%> (-0.01%) ⬇️
osx 74.82% <94.59%> (+<0.01%) ⬆️
other 84.60% <100.00%> (-0.01%) ⬇️
win 81.74% <100.00%> (+<0.01%) ⬆️

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.56% <100.00%> (+0.38%) ⬆️
.../pynumero/algorithms/solvers/square_solver_base.py 98.14% <0.00%> (-1.86%) ⬇️
pyomo/contrib/pynumero/plugins.py 100.00% <0.00%> (ø)
...ntrib/pynumero/algorithms/solvers/scipy_solvers.py 95.89% <0.00%> (+0.99%) ⬆️
pyomo/repn/plugins/nl_writer.py 88.60% <0.00%> (+1.80%) ⬆️
pyomo/contrib/mindtpy/iterate.py 81.36% <0.00%> (+1.81%) ⬆️

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 b058793 into Pyomo:main Nov 29, 2022
@shermanjasonaf shermanjasonaf deleted the fix-factor-model-bounds branch June 19, 2023 00:04
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.

4 participants