Skip to content

Conversation

shermanjasonaf
Copy link
Contributor

@shermanjasonaf shermanjasonaf commented Sep 5, 2025

Summary/Motivation:

As an example from #2555 suggests, PyROS is (now) capable of solving RO models that do not have variables appearing in the model's active objective or constraints. However, PyROS currently raises an exception if the user-supplied arguments first_stage_variables and second_stage_variables are (cast to) empty lists.

Further, PyROS is also capable of solving problems that have no uncertain parameters (efficiently, as of #3503). However, this is not (fully) checked in the testing modules.

Changes proposed in this PR:

  • Ensure PyROS supports problems with no (user-supplied first-stage or second-stage) variables appearing in the active objective/constraint expressions
  • Add test ensuring that PyROS supports problems with no user-provided uncertain parameters

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
Contributor Author

@jas-yao @natalieisenberg

Copy link

codecov bot commented Sep 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.31%. Comparing base (e173cb5) to head (18d56e4).
⚠️ Report is 48 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3720   +/-   ##
=======================================
  Coverage   89.31%   89.31%           
=======================================
  Files         896      896           
  Lines      103682   103684    +2     
=======================================
+ Hits        92605    92607    +2     
  Misses      11077    11077           
Flag Coverage Δ
builders 29.11% <20.00%> (+0.01%) ⬆️
default 85.93% <100.00%> (?)
expensive 35.86% <20.00%> (?)
linux 86.96% <100.00%> (-2.09%) ⬇️
linux_other 86.96% <100.00%> (+<0.01%) ⬆️
osx 83.10% <100.00%> (+<0.01%) ⬆️
win 85.21% <100.00%> (+<0.01%) ⬆️
win_other 85.21% <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.

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.

Looks pretty good. One implementation change that would be nice, and maybe a little more information in the warnings?

@jsiirola jsiirola merged commit e8ed5dd into Pyomo:main Oct 3, 2025
35 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.

How to help PyROS verify nonempty Intersection Set, when nominal point is clearly in the intersection?
4 participants