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

Adjust Routine for Loading DR Polishing Model Solutions to Master Model #2700

Merged
merged 3 commits into from
Jan 24, 2023

Conversation

shermanjasonaf
Copy link
Contributor

Summary/Motivation:

For a PyROS decision rule polishing problem, the routine pyros.master_problem_methods.get_state_vars inadvertently (and undesirably) includes auxiliary variables added to the master problem as state variables. As a result, a master problem state variable value may be set to that of one of the auxiliary polishing model variables after the polishing model has been solved (through pyros.master_problem_methods.minimize_dr_vars). This may adversely affect the initialization of the state variables for subsequent separation and master models, and is not in agreement with the intentions of #2515.

Changes proposed in this PR:

  • Adjust routine for loading DR polishing model state variable values
  • Simplify retrieval of state variables from master-type model scenario blocks

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.

@codecov
Copy link

codecov bot commented Jan 20, 2023

Codecov Report

Base: 87.06% // Head: 87.04% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (205fc90) compared to base (15d5e9f).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2700      +/-   ##
==========================================
- Coverage   87.06%   87.04%   -0.02%     
==========================================
  Files         757      757              
  Lines       84591    84587       -4     
==========================================
- Hits        73648    73630      -18     
- Misses      10943    10957      +14     
Flag Coverage Δ
linux 84.45% <100.00%> (-0.01%) ⬇️
osx 74.50% <100.00%> (-0.01%) ⬇️
other 84.63% <100.00%> (-0.01%) ⬇️
win 81.79% <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/master_problem_methods.py 87.92% <100.00%> (-0.46%) ⬇️
pyomo/contrib/pyros/pyros_algorithm_methods.py 93.37% <0.00%> (-1.81%) ⬇️
pyomo/solvers/plugins/solvers/xpress_direct.py 71.75% <0.00%> (-1.07%) ⬇️
pyomo/contrib/pyros/util.py 84.82% <0.00%> (-0.35%) ⬇️
pyomo/core/expr/visitor.py 93.24% <0.00%> (-0.16%) ⬇️

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.

@emma58 emma58 self-requested a review January 24, 2023 19:32
@emma58 emma58 merged commit e13fe45 into Pyomo:main Jan 24, 2023
@shermanjasonaf shermanjasonaf deleted the fix-load-dr-polishing-sol branch June 19, 2023 00:02
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