Skip to content

Factorable Programming for PWL Approximations#3821

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

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

Conversation

@michaelbynum
Copy link
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
@blnicho blnicho removed this from Pyomo 6.10 Feb 3, 2026
@blnicho blnicho requested a review from jsiirola February 24, 2026 20:02
@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 91.49660% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.68%. Comparing base (bdb22dd) to head (ce55a10).

Files with missing lines Patch % Lines
pyomo/contrib/piecewise/transform/factorable.py 91.46% 25 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3821      +/-   ##
==========================================
+ Coverage   89.67%   89.68%   +0.01%     
==========================================
  Files         908      909       +1     
  Lines      106735   107029     +294     
==========================================
+ Hits        95717    95994     +277     
- Misses      11018    11035      +17     
Flag Coverage Δ
builders 29.05% <18.02%> (-0.02%) ⬇️
default 85.98% <91.49%> (?)
expensive 35.46% <18.02%> (?)
linux 87.15% <91.49%> (-2.02%) ⬇️
linux_other 87.15% <91.49%> (+0.01%) ⬆️
oldsolvers 27.97% <18.02%> (-0.03%) ⬇️
osx 82.07% <91.49%> (+0.02%) ⬆️
win 85.58% <91.49%> (+0.02%) ⬆️
win_other 85.58% <91.49%> (+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.

3 participants