Skip to content

Factorable Programming for PWL Approximations#3821

Open
michaelbynum wants to merge 15 commits intoPyomo:mainfrom
michaelbynum:pwl_factorable
Open

Factorable Programming for PWL Approximations#3821
michaelbynum wants to merge 15 commits intoPyomo:mainfrom
michaelbynum:pwl_factorable

Conversation

@michaelbynum
Copy link
Copy Markdown
Contributor

@michaelbynum michaelbynum commented Jan 20, 2026

Summary/Motivation:

The purpose of this module/transformation is to convert any nonlinear model
to the following form:

min/max e(x_i)*f(x_j) + b^T*x
s.t.
        g_j(x_i)*h_j(x_k) + a_j^T*x >/</== 0
        g_j(x_i)/h_j(x_k) + a_j^T*x >/</== 0
        g_j(x_i)**h_j(x_k) + a_j^T*x >/</== 0

By doing so, each nonlinear function is only a function of one or two variables.
If this transformation is used prior to the nonlinear_to_pwl transformation,
it can, in some cases, significantly reduce the complexity of the PWL approximation.

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 self-requested a review January 20, 2026 19:51
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 91.13924% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.94%. Comparing base (6ab0106) to head (834ebd6).

Files with missing lines Patch % Lines
pyomo/contrib/piecewise/transform/factorable.py 91.11% 28 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3821      +/-   ##
==========================================
+ Coverage   89.92%   89.94%   +0.01%     
==========================================
  Files         902      903       +1     
  Lines      106393   106709     +316     
==========================================
+ Hits        95679    95975     +296     
- Misses      10714    10734      +20     
Flag Coverage Δ
builders 29.16% <20.88%> (-0.03%) ⬇️
default 86.25% <91.13%> (?)
expensive 35.59% <20.88%> (?)
linux 87.39% <91.13%> (-2.02%) ⬇️
linux_other 87.39% <91.13%> (+0.01%) ⬆️
oldsolvers 28.08% <20.88%> (-0.02%) ⬇️
osx 82.74% <91.13%> (+0.02%) ⬆️
win 85.83% <91.13%> (+0.02%) ⬆️
win_other 85.83% <91.13%> (+0.02%) ⬆️

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

4 participants