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

Resolve handling of {}**0 in LinearRepn/QuadraticRepn #2857

Merged
merged 1 commit into from
May 30, 2023

Conversation

jsiirola
Copy link
Member

Fixes # .

Summary/Motivation:

This resolves an error we were seeing in the performance tests where x**0 was being categorized as a nonlinear expression instead of resolving it to the constant 1.

Changes proposed in this PR:

  • Compile {}**0 to 1 in LinearRepnVisitor / QuadraticRepnVisitor
  • Update tests to cover this case

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.

@mrmundt mrmundt merged commit 28d39dc into Pyomo:main May 30, 2023
@jsiirola jsiirola deleted the fix-pow-0 branch May 30, 2023 19:44
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.

2 participants