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

pyomo.gdp: handle nested GDPs correctly in all the transformations #3145

Merged
merged 9 commits into from
Feb 21, 2024

Conversation

emma58
Copy link
Contributor

@emma58 emma58 commented Feb 19, 2024

Fixes # .

Summary/Motivation:

This is a follow-on to #3143 that corrects our handling of nested GDPs in the remainder of the GDP transformations: That is, we never assume that nested indicator_vars are local.

NOTE: This includes #3073 and #3143, so should be reviewed after they are merged. But it's not that radical after they're merged either...

Changes proposed in this PR:

  • Puts the algebraic constraint on the parent block of the corresponding Disjunction. That means that it will get transformed again in a nested situation, which is correct.
  • Corrects the bigm tests on this front
  • Adds a tiny integration test for this for hull, bigm, and binary_multiplication.
  • (Changes this in mbigm too, though it's kind of a moot point since we don't support nested yet in mbigm.)

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  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.

@emma58 emma58 requested a review from jsiirola February 21, 2024 04:26
@jsiirola jsiirola merged commit 158933f into Pyomo:main Feb 21, 2024
30 of 31 checks passed
@emma58 emma58 deleted the fix-nested-everywhere branch February 21, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants