IDAES / idaes-pse

The IDAES Process Systems Engineering Framework
https://idaes-pse.readthedocs.io/
Other
216 stars 232 forks source link

Option to skip parallel component checks #1417

Closed andrewlee94 closed 4 months ago

andrewlee94 commented 4 months ago

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.
codecov-commenter commented 4 months ago

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 :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Robbybp commented 4 months ago

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 commented 4 months ago

@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.