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

[WIP] Add a QuadraticExpression node #2329

Closed
wants to merge 1 commit into from

Conversation

michaelbynum
Copy link
Contributor

Fixes #1761, #230.

Summary/Motivation:

This PR adds a QuadraticExpression node to the expression system. This PR does not add any special handling of QuadraticExpression (that can be added later as needed).

This can reduce the construction time for quadratic constraints and it allows Pyomo-based algorithms to add special handling of quadratic constraints.

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.

@codecov
Copy link

codecov bot commented Mar 4, 2022

Codecov Report

Merging #2329 (5c72529) into main (b48c886) will increase coverage by 0.00%.
The diff coverage is 97.19%.

Impacted file tree graph

@@           Coverage Diff            @@
##             main    #2329    +/-   ##
========================================
  Coverage   85.61%   85.62%            
========================================
  Files         618      618            
  Lines       76206    76313   +107     
========================================
+ Hits        65241    65340    +99     
- Misses      10965    10973     +8     
Flag Coverage Δ
linux 82.44% <97.19%> (+0.02%) ⬆️
osx 72.70% <97.19%> (+0.03%) ⬆️
other 82.39% <97.19%> (+0.02%) ⬆️
win 79.49% <97.19%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pyomo/core/expr/current.py 100.00% <ø> (ø)
pyomo/repn/standard_repn.py 88.54% <ø> (ø)
pyomo/core/expr/numeric_expr.py 98.16% <97.00%> (-0.13%) ⬇️
pyomo/core/expr/compare.py 98.87% <100.00%> (+0.09%) ⬆️
pyomo/common/env.py 89.15% <0.00%> (-2.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b48c886...5c72529. Read the comment docs.

@jsiirola
Copy link
Member

jsiirola commented Mar 10, 2022

I think a QuadraticExpression node can make a lot of sense. However, I wonder if this is the right data structure, or rather if the right answer is to store it as ?

@blnicho blnicho changed the title Add a QuadraticExpression node [WIP] Add a QuadraticExpression node Nov 8, 2022
@mrmundt
Copy link
Contributor

mrmundt commented Feb 16, 2023

This has been added to the Archived design discussions wiki; will close for now.

@mrmundt mrmundt closed this Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

slow quadratic constraint creation
4 participants