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

Enable GreyBoxBlocks with cyipopt-watertap #1434

Merged
merged 6 commits into from
Jun 22, 2024

Conversation

bknueven
Copy link
Contributor

Fixes/Resolves: N/A

Summary/Motivation:

We have an emerging need to use GreyBox models with WaterTAP. This PR would modify our cyipopt wrapper so that GreyBoxBlocks work correctly. This necessitates making a few other changes to the solver wrapper, including bring into WaterTAP the IDAES jacobian scaling so that we can utilize a custom-built PyomoNLP object when we have a model with GreyBoxBlocks.

Changes proposed in this PR:

  • Add _get_pyomo_nlp abstract method and implementations for both classes
  • Bring in the Jacobian constraint autoscaling capability from IDAES to run on custom-built PyomoNLP objects
  • Add tests to make sure we deal with the dummy objective correctly
  • Add test for Pyomo model with GreyBoxBlocks and cyipopt-watertap.

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.

Copy link
Contributor

@avdudchenko avdudchenko left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

codecov bot commented Jun 12, 2024

Codecov Report

Attention: Patch coverage is 96.92308% with 2 lines in your changes missing coverage. Please review.

Project coverage is 93.94%. Comparing base (df6264c) to head (beb5a18).
Report is 36 commits behind head on main.

Files with missing lines Patch % Lines
watertap/core/plugins/solvers.py 96.92% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1434       +/-   ##
===========================================
+ Coverage   41.22%   93.94%   +52.71%     
===========================================
  Files          97      310      +213     
  Lines       10599    33206    +22607     
===========================================
+ Hits         4369    31194    +26825     
+ Misses       6230     2012     -4218     

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

@ksbeattie ksbeattie added the Priority:Normal Normal Priority Issue or PR label Jun 13, 2024
@ksbeattie ksbeattie assigned ksbeattie and bknueven and unassigned ksbeattie Jun 13, 2024
@bknueven bknueven enabled auto-merge (squash) June 22, 2024 01:59
@bknueven bknueven merged commit eef84c0 into watertap-org:main Jun 22, 2024
24 checks passed
lbianchi-lbl pushed a commit to watertap-org/watertap-solvers that referenced this pull request Dec 7, 2024
* enable GreyBoxBlocks with cyipopt-watertap

* add failing cyipopt test

* xfail-ing scaling test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:Normal Normal Priority Issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants