Add Smooth Heaviside Function to Math#1603
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1603 +/- ##
==========================================
- Coverage 76.85% 76.85% -0.01%
==========================================
Files 394 394
Lines 63241 63244 +3
Branches 10359 10359
==========================================
Hits 48604 48604
- Misses 12188 12192 +4
+ Partials 2449 2448 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dallan-keylogic
left a comment
There was a problem hiding this comment.
Could we augment this function with an additional function that is a drop-in replacement for expr_if? Maybe have two expr_if replacements, depending on whether the underlying expression is continuous (when we can use smooth_max or smooth_min or discontinuous, when we use smooth_heaviside.
After thinking about this a bit more (and trying to implement it), I'm finding it difficult to cover all the possible scenarios since there's not necessarily uniformity in how the conditional statement is set up (number of terms on the LHS and RHS). If we do assume a simple if x > y or x < y, I feel that it is fairly straightforward for the users to replace the Expr_if themselves. That way we don't need to keep Expr_ifs in the code at all (i.e. "the drop-in replacement" function would need to be passed the Expr_if) |
Morgan88888888
left a comment
There was a problem hiding this comment.
Everything looks good.
Summary/Motivation:
Addresses a comment made here to add the smooth_heaviside function into IDAES rather than WaterTAP
Changes proposed in this PR:
Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: