IDAES / idaes-pse

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

Add new AutoScaler and CustomScalerBase classes #1429

Open andrewlee94 opened 4 months ago

andrewlee94 commented 4 months ago

Depends on #1436

Summary/Motivation:

This PR adds a draft of the new Scaler classes along with some general utility functions for the new scaling interface. I have generally created new functions even if older ones existed to make a clean break from the older API and assist with backward compatibility.

Draft Documentation: Initial Outline of Documentation for Scaling Tools.docx

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 3 months ago

Codecov Report

Attention: Patch coverage is 87.94038% with 89 lines in your changes missing coverage. Please review.

Project coverage is 76.96%. Comparing base (9ee1fad) to head (2d1dd54).

Files with missing lines Patch % Lines
idaes/core/scaling/scaler_profiling.py 60.50% 41 Missing and 6 partials :warning:
idaes/core/scaling/util.py 93.52% 8 Missing and 10 partials :warning:
idaes/core/scaling/custom_scaler_base.py 90.69% 10 Missing and 6 partials :warning:
idaes/core/scaling/autoscaling.py 92.40% 3 Missing and 3 partials :warning:
idaes/models/unit_models/gibbs_reactor.py 94.44% 0 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1429 +/- ## ========================================== + Coverage 76.83% 76.96% +0.12% ========================================== Files 376 382 +6 Lines 61170 61907 +737 Branches 13518 13709 +191 ========================================== + Hits 47002 47647 +645 - Misses 11784 11850 +66 - Partials 2384 2410 +26 ```

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

ksbeattie commented 1 month ago

Making this high priority so it gets the attention from others that is needed.

andrewlee94 commented 1 month ago

Some initial documentation for the code:

Initial Scaling Routine Profiling.docx