Skip to content

[Pyomo.DoE] Replace computationally expensive test example with Rooney Biegler#3828

Merged
blnicho merged 22 commits intoPyomo:mainfrom
smondal13:add-comp-efficient-tests
Feb 11, 2026
Merged

[Pyomo.DoE] Replace computationally expensive test example with Rooney Biegler#3828
blnicho merged 22 commits intoPyomo:mainfrom
smondal13:add-comp-efficient-tests

Conversation

@smondal13
Copy link
Contributor

@smondal13 smondal13 commented Jan 28, 2026

Summary/Motivation:

Most unit tests within pyomo/contrib/doe/tests utilized the reactor_example.py example, which is computationally expensive for the scope of these tests. This resulted in unnecessarily long execution times for the test suite.

This PR replaces the reactor_example.py with the simpler rooney_biegler_doe_example.py example in the tests. This change maintains the validity of the tests while significantly reducing computational overhead.

Performance Impact (MacBook with M4 chip):

Before: ~20 seconds

After: ~12 seconds

Improvement: ~40% reduction in test execution time.

Changes proposed in this PR:

  • Replaced usage of reactor_example.py with rooney_biegler_doe_example.py in pyomo/contrib/doe/tests.
  • Updated relevant assertions to match the rooney_biegler_doe_example.py model structure.
  • Reduced the number of points calculated for sensitivity plotting.

Note:

This PR relies on PR #3803

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.

- Introduced `RooneyBieglerExperimentFlag` to support model completeness flags for error handling in experiments.
- Updated test files to utilize `RooneyBieglerExperiment` and `RooneyBieglerExperimentFlag` for better isolation and error testing.
- Removed references to `FullReactorExperiment` in favor of the new Rooney-Biegler experiment classes.
- Adjusted design ranges and parameters in tests to align with the new experiment structure.
- Improved test descriptions and organization for clarity and maintainability.`
@smondal13 smondal13 changed the title [Pyomo.DoE] Replace computationally expensive test example with RooneyBiegler [Pyomo.DoE] Replace computationally expensive test example with Rooney Biegler Jan 28, 2026
@smondal13
Copy link
Contributor Author

smondal13 commented Jan 29, 2026

@blnicho @adowling2 This PR is ready for initial design review.

@blnicho, one of the tests is failing. Can you please take a look?

Note: This PR depends on #3803

@adowling2
Copy link
Member

@sscini I recommend you take a look at this. It is related to some of your other PRs.

@blnicho blnicho moved this from Todo to Review In Progress in Pyomo 6.10 Feb 10, 2026
Copy link
Member

@blnicho blnicho left a comment

Choose a reason for hiding this comment

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

I found a few spots where the code could be cleaned up and have some suggestions for making some of the tests stronger.

smondal13 and others added 2 commits February 10, 2026 15:41
…n `delattr`

Co-authored-by: Bethany Nicholson <blnicho@users.noreply.github.com>
@github-project-automation github-project-automation bot moved this from Review In Progress to Reviewer Approved in Pyomo 6.10 Feb 11, 2026
@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.65%. Comparing base (4e91199) to head (2950472).
⚠️ Report is 23 commits behind head on main.

Files with missing lines Patch % Lines
.../parmest/examples/rooney_biegler/rooney_biegler.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3828      +/-   ##
==========================================
- Coverage   89.66%   89.65%   -0.01%     
==========================================
  Files         902      902              
  Lines      105609   105611       +2     
==========================================
- Hits        94696    94688       -8     
- Misses      10913    10923      +10     
Flag Coverage Δ
builders 29.04% <66.66%> (+<0.01%) ⬆️
default 83.76% <66.66%> (?)
expensive 35.51% <66.66%> (?)
linux 86.96% <66.66%> (-2.44%) ⬇️
linux_other 86.96% <66.66%> (-0.01%) ⬇️
oldsolvers 29.68% <0.00%> (+<0.01%) ⬆️
osx 83.12% <66.66%> (-0.01%) ⬇️
win 85.20% <66.66%> (-0.02%) ⬇️
win_other 85.20% <66.66%> (-0.02%) ⬇️

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 merged commit 571bf68 into Pyomo:main Feb 11, 2026
34 of 35 checks passed
@github-project-automation github-project-automation bot moved this from Reviewer Approved to Done in Pyomo 6.10 Feb 11, 2026
@github-project-automation github-project-automation bot moved this from Ready for design review to Done in ParmEst & Pyomo.DoE Development Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants