Skip to content

Add CartesianProductSet to PyROS#3927

Merged
blnicho merged 16 commits into
Pyomo:mainfrom
shermanjasonaf:add-pyros-cartesian-product-set
May 12, 2026
Merged

Add CartesianProductSet to PyROS#3927
blnicho merged 16 commits into
Pyomo:mainfrom
shermanjasonaf:add-pyros-cartesian-product-set

Conversation

@shermanjasonaf
Copy link
Copy Markdown
Contributor

Summary/Motivation:

This PR adds to PyROS the CartesianProductSet class, a new pre-implemented concrete UncertaintySet subclass for representing a Cartesian product (or cross product) of uncertainty sets. For simplicity, this initial implementation of the CartesianProductSet does not support products involving one or more discrete uncertainty sets; such support will be added in a future PR.

Changes proposed in this PR:

  • Add PyROS CartesianProductSet class

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.

@shermanjasonaf
Copy link
Copy Markdown
Contributor Author

@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.08%. Comparing base (ae432ba) to head (1fdac67).
⚠️ Report is 58 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3927      +/-   ##
==========================================
+ Coverage   90.07%   90.08%   +0.01%     
==========================================
  Files         904      904              
  Lines      107003   107081      +78     
==========================================
+ Hits        96384    96469      +85     
+ Misses      10619    10612       -7     
Flag Coverage Δ
builders 29.16% <27.84%> (+<0.01%) ⬆️
default 86.41% <100.00%> (?)
expensive 35.58% <27.84%> (?)
linux 87.56% <100.00%> (-2.01%) ⬇️
linux_other 87.56% <100.00%> (+0.01%) ⬆️
oldsolvers 28.11% <27.84%> (+<0.01%) ⬆️
osx 82.94% <100.00%> (+0.01%) ⬆️
win 85.99% <100.00%> (+0.01%) ⬆️
win_other 85.99% <100.00%> (+0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@blnicho blnicho requested review from blnicho and jsiirola May 5, 2026 18:53
Copy link
Copy Markdown
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 good. Some minor updates to docstrings if you have time, but (in my opinion) nothing that must prevent merging.

Comment thread pyomo/contrib/pyros/uncertainty_sets.py Outdated
Comment thread pyomo/contrib/pyros/uncertainty_sets.py Outdated
Comment thread pyomo/contrib/pyros/uncertainty_sets.py
Comment thread pyomo/contrib/pyros/uncertainty_sets.py
Comment thread pyomo/contrib/pyros/uncertainty_sets.py Outdated
Comment thread pyomo/contrib/pyros/uncertainty_sets.py Outdated
@mrmundt
Copy link
Copy Markdown
Contributor

mrmundt commented May 11, 2026

@shermanjasonaf - The Jenkins tests are not related to you. Theoretically they should be fixed on the next re-run.

@shermanjasonaf
Copy link
Copy Markdown
Contributor Author

shermanjasonaf commented May 12, 2026

@jas-yao @jsiirola, which of the following do you prefer?

  1. Merge this PR ahead of PyROS Add caching for computed uncertain parameter bounds #3877. In this case, I think that after this PR is merged, we should ensure that PyROS Add caching for computed uncertain parameter bounds #3877 is, for consistency, amended to support caching of bounds for the CartesianProductSet
  2. Merge PyROS Add caching for computed uncertain parameter bounds #3877 ahead of this PR. In this case, after PyROS Add caching for computed uncertain parameter bounds #3877 is merged, I will amend this PR to support caching of bounds for the CartesianProductSet

We should also ensure that the PyROS version number and changelog are updated after each PR according to the merging order that we decide upon.

@mrmundt
Copy link
Copy Markdown
Contributor

mrmundt commented May 12, 2026

@shermanjasonaf - I'm happy to merge this. Please let me know what you'd like.

@jsiirola
Copy link
Copy Markdown
Member

I would vote for going ahead and merging this. I have a quick question/comment for @jas-yao over on #3877.

@blnicho blnicho merged commit 360a87e into Pyomo:main May 12, 2026
64 of 65 checks passed
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.

5 participants