Skip to content

Pyomo.DoE: Bugfix for GreyBox#3727

Merged
mrmundt merged 9 commits intoPyomo:mainfrom
djlaky:add-greybox
Sep 19, 2025
Merged

Pyomo.DoE: Bugfix for GreyBox#3727
mrmundt merged 9 commits intoPyomo:mainfrom
djlaky:add-greybox

Conversation

@djlaky
Copy link
Copy Markdown
Contributor

@djlaky djlaky commented Sep 11, 2025

Fixes # .

GreyBox derivatives now match expected values between cyIPOPT and IPOPT.

Summary/Motivation:

GreyBox would converge to points very slightly away from a fixed point. The issue stemmed from using a triangular version of the FIM. In this manner, the excluded elements from triangularization would not have impact on the GreyBox output, causing the gradient (and hessian) to be incorrect for off-diagonal elements of the FIM.

Changes proposed in this PR:

  • Corrected math in the grey box utilities file for Pyomo.DoE
  • Corrected the tests to now check the symmetric-space derivatives instead of the full-space derivatives

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
Copy Markdown
Member

@adowling2 adowling2 left a comment

Choose a reason for hiding this comment

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

Looks great! For context, we are also working on a paper that writes out all of the math for the gradient and Hessian calculations, including the bug fixes in this PR.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.31%. Comparing base (56a503b) to head (3424f1a).
⚠️ Report is 653 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3727   +/-   ##
=======================================
  Coverage   89.31%   89.31%           
=======================================
  Files         896      896           
  Lines      103675   103682    +7     
=======================================
+ Hits        92594    92605   +11     
+ Misses      11081    11077    -4     
Flag Coverage Δ
builders 29.10% <37.50%> (+<0.01%) ⬆️
default 85.93% <100.00%> (?)
expensive 35.86% <37.50%> (?)
linux 86.96% <87.50%> (-2.08%) ⬇️
linux_other 86.96% <87.50%> (+<0.01%) ⬆️
osx 83.10% <0.00%> (-0.01%) ⬇️
win 85.21% <87.50%> (+<0.01%) ⬆️
win_other 85.21% <87.50%> (+<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.

@mrmundt mrmundt merged commit 7134273 into Pyomo:main Sep 19, 2025
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.

6 participants