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

MS Contactor improvements #1243

Merged
merged 3 commits into from
Aug 22, 2023
Merged

Conversation

andrewlee94
Copy link
Member

Fixes None

Summary/Motivation:

This PR fixes some bugs in the MS Contactor model

Changes proposed in this PR:

  • Adds check to only build energy transfer terms if energy balances are being used.
  • Fixes issue with closures in rules similar to Function Scoping Fixes #1242

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.

@andrewlee94 andrewlee94 self-assigned this Aug 18, 2023
@andrewlee94 andrewlee94 added bug Something isn't working Priority:Normal Normal Priority Issue or PR unit models Issues dealing with the unit model libraries PrOMMiS Issues related to PrOMMiS activities labels Aug 18, 2023
@codecov
Copy link

codecov bot commented Aug 18, 2023

Codecov Report

Patch coverage: 88.49% and no project coverage change.

Comparison is base (b128971) 76.83% compared to head (863a658) 76.84%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1243   +/-   ##
=======================================
  Coverage   76.83%   76.84%           
=======================================
  Files         390      390           
  Lines       61942    61963   +21     
  Branches    11398    11398           
=======================================
+ Hits        47595    47613   +18     
- Misses      11878    11882    +4     
+ Partials     2469     2468    -1     
Files Changed Coverage Δ
idaes/models/unit_models/mscontactor.py 91.20% <88.49%> (+0.53%) ⬆️

... and 1 file with indirect coverage changes

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

Copy link
Contributor

@bpaul4 bpaul4 left a comment

Choose a reason for hiding this comment

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

Looks fine to me. The pylint issue seems to be a leftover phase_list variable on line 597 that is redefined in the new methods so it's not used outside them, taking out that line should make pylint happy.

@andrewlee94 andrewlee94 enabled auto-merge (squash) August 22, 2023 13:28
@andrewlee94 andrewlee94 merged commit 721f1f9 into IDAES:main Aug 22, 2023
36 checks passed
@andrewlee94 andrewlee94 deleted the ms_contacotr_bugs branch August 22, 2023 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority:Normal Normal Priority Issue or PR PrOMMiS Issues related to PrOMMiS activities unit models Issues dealing with the unit model libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants