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

Option to skip parallel component checks #1417

Merged
merged 1 commit into from
May 26, 2024

Conversation

andrewlee94
Copy link
Member

Fixes None

Summary/Motivation:

This adds an option to skip checks for parallel constraints and variables, primarily for use in testing where we have cases of known near-parallel components. This is mostly for backward compatibility with older models which we do not currently have time to fix.

Changes proposed in this PR:

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the license terms described in the LICENSE.txt file at the top level of this directory.
  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
Contributor

@dallan-keylogic dallan-keylogic left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@JavalVyas2000 JavalVyas2000 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@codecov-commenter
Copy link

codecov-commenter commented May 24, 2024

Codecov Report

Attention: Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 77.89%. Comparing base (3cf3a84) to head (f8b2b95).
Report is 24 commits behind head on main.

Files Patch % Lines
idaes/core/util/model_diagnostics.py 93.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1417      +/-   ##
==========================================
- Coverage   77.89%   77.89%   -0.01%     
==========================================
  Files         394      394              
  Lines       65079    65080       +1     
  Branches    14389    14390       +1     
==========================================
- Hits        50695    50692       -3     
- Misses      11795    11799       +4     
  Partials     2589     2589              

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

@Robbybp
Copy link
Member

Robbybp commented May 24, 2024

Why add this feature instead of relaxing the tests for these older models? I suppose the reason is that we still want to test that these have no extreme Jacobian entries, and condition numbers in some range. Is there no way to extract just the numerical warnings that we actually want to enforce (as we might do with check_parallel_jacobian if we just wanted to check for parallel rows/columns).

@andrewlee94 andrewlee94 merged commit 1d927a6 into IDAES:main May 26, 2024
53 checks passed
@andrewlee94 andrewlee94 deleted the parallel_constriant_skip branch May 26, 2024 17:04
@andrewlee94
Copy link
Member Author

@Robbybp Mostly as a placeholder until we get the new scaling tools in place and have the time to go and address each of these.

We also have a case where someone is working on updating some of the power plant examples for us, and I asked them to add checks for structural and numerical issues, but they lack the time or background to try to fix these for now. Thus, I added this so they can skip these tests for now and get their PR merged without waiting until the power plant team can address the issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diagnostics Priority:High High Priority Issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants