Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## scaling_toolbox #1680 +/- ##
================================================
Coverage 77.33% 77.33%
================================================
Files 395 395
Lines 64315 64344 +29
Branches 10781 10794 +13
================================================
+ Hits 49736 49760 +24
Misses 12081 12081
- Partials 2498 2503 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
dallan-keylogic
left a comment
There was a problem hiding this comment.
Looks good. You just need to remove some commented code and merge scaling_toolbox.
idaes/models/unit_models/cstr.py
Outdated
Comment on lines
86
to
109
| # self.call_submodel_scaler_method( | ||
| # submodel=model.control_volume.properties_in, | ||
| # method="variable_scaling_routine", | ||
| # submodel_scalers=submodel_scalers, | ||
| # overwrite=overwrite, | ||
| # ) | ||
| # self.propagate_state_scaling( | ||
| # target_state=model.control_volume.properties_out, | ||
| # source_state=model.control_volume.properties_in, | ||
| # overwrite=overwrite, | ||
| # ) | ||
|
|
||
| # self.call_submodel_scaler_method( | ||
| # submodel=model.control_volume.properties_out, | ||
| # method="variable_scaling_routine", | ||
| # submodel_scalers=submodel_scalers, | ||
| # overwrite=overwrite, | ||
| # ) | ||
| # self.call_submodel_scaler_method( | ||
| # submodel=model.control_volume.reactions, | ||
| # method="variable_scaling_routine", | ||
| # submodel_scalers=submodel_scalers, | ||
| # overwrite=overwrite, | ||
| # ) |
idaes/models/unit_models/cstr.py
Outdated
Comment on lines
179
to
196
| # self.call_submodel_scaler_method( | ||
| # submodel=model.control_volume.properties_in, | ||
| # method="constraint_scaling_routine", | ||
| # submodel_scalers=submodel_scalers, | ||
| # overwrite=overwrite, | ||
| # ) | ||
| # self.call_submodel_scaler_method( | ||
| # submodel=model.control_volume.properties_out, | ||
| # method="constraint_scaling_routine", | ||
| # submodel_scalers=submodel_scalers, | ||
| # overwrite=overwrite, | ||
| # ) | ||
| # self.call_submodel_scaler_method( | ||
| # submodel=model.control_volume.reactions, | ||
| # method="constraint_scaling_routine", | ||
| # submodel_scalers=submodel_scalers, | ||
| # overwrite=overwrite, | ||
| # ) |
Contributor
There was a problem hiding this comment.
Should be removed.
Contributor
|
Codecov is complaining because the scaler is tested in an integration test, not a component test. Can you just change it to a component test? (It shouldn't take too long to run). |
dallan-keylogic
pushed a commit
that referenced
this pull request
Nov 6, 2025
* cstr scaler class and tests * scale reaction variable to reduce jacobian * remove additional scaler class * run black * remove unused imports for pylint * switch scaler to CV to improve jacobian, clean up old tests * remove commented code * change scaler test to component test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary/Motivation:
Scaler object for the CSTR unit model.
Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: