Skip to content

Sensitivity calculation for named expressions #3685

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

eslickj
Copy link
Contributor

@eslickj eslickj commented Aug 7, 2025

Fixes None

Summary/Motivation:

This adds sensitivity calculations for named expressions to the pynumero sensitivity calculations in the sensitivity toolbox. Usually, it is probably better to add a variable to the model, but on rare occasions that can cause trouble.

Changes proposed in this PR:

  • Add ability to include named expressions in sensitivity matrix

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

codecov bot commented Aug 12, 2025

Codecov Report

❌ Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.19%. Comparing base (de14e28) to head (b1466e4).
⚠️ Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
pyomo/contrib/sensitivity_toolbox/pynumero.py 95.45% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3685      +/-   ##
==========================================
- Coverage   89.20%   89.19%   -0.01%     
==========================================
  Files         892      892              
  Lines      102978   102997      +19     
==========================================
+ Hits        91857    91872      +15     
- Misses      11121    11125       +4     
Flag Coverage Δ
builders 26.73% <9.09%> (-0.01%) ⬇️
default 85.79% <95.45%> (?)
expensive 34.08% <9.09%> (?)
linux 86.97% <95.45%> (-1.99%) ⬇️
linux_other 86.97% <95.45%> (+<0.01%) ⬆️
osx 83.27% <95.45%> (+<0.01%) ⬆️
win 85.15% <95.45%> (-0.01%) ⬇️
win_other 85.15% <95.45%> (-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.

@github-project-automation github-project-automation bot moved this from Todo to Reviewer Approved in Pyomo 6.9.4 Release Aug 12, 2025
@blnicho blnicho self-requested a review August 12, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Reviewer Approved
Development

Successfully merging this pull request may close these issues.

4 participants