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

DAE: Improve error message when attempting to discretize models with circular references #2943

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

blnicho
Copy link
Member

@blnicho blnicho commented Aug 9, 2023

Summary/Motivation:

This PR fixes an issue in a Pyomo.DAE error message that was reporting component types instead of component names. Thanks to @dallan-keylogic for pointing this out and testing this fix on his IDAES model. I didn't add a test because I was having trouble coming up with a small example model that hits this issue of circular references.

Changes proposed in this PR:

  • log component names instead of component types in DAE error message related to circular references

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 Aug 9, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02% 🎉

Comparison is base (cffefdd) 87.83% compared to head (472e099) 87.85%.
Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2943      +/-   ##
==========================================
+ Coverage   87.83%   87.85%   +0.02%     
==========================================
  Files         770      770              
  Lines       89641    89684      +43     
==========================================
+ Hits        78734    78796      +62     
+ Misses      10907    10888      -19     
Flag Coverage Δ
linux 84.87% <100.00%> (+<0.01%) ⬆️
osx 74.59% <100.00%> (+<0.01%) ⬆️
other 85.05% <100.00%> (+<0.01%) ⬆️
win 82.13% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
pyomo/dae/misc.py 93.54% <100.00%> (+0.02%) ⬆️

... and 6 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mrmundt mrmundt merged commit 176015b into Pyomo:main Aug 10, 2023
30 checks passed
@blnicho blnicho deleted the dae-component-names branch January 4, 2024 21:51
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.

2 participants