Skip to content

Support P-Split Reformulation for (affine and quadratic constraints only)#124

Merged
pulsipher merged 41 commits intoinfiniteopt:masterfrom
dnguyen227:p-split-aff-and-quad
Oct 20, 2025
Merged

Support P-Split Reformulation for (affine and quadratic constraints only)#124
pulsipher merged 41 commits intoinfiniteopt:masterfrom
dnguyen227:p-split-aff-and-quad

Conversation

@dnguyen227
Copy link
Contributor

This PR adds the P-Split reformulation technique. The technique is called with a vector of partitions:
For example for two partitions (p=2):

model = GDPModel()
...
@variable(model, x[1:4], Disjunct(...))
...
partition = [ [x[1] , x[2]], [x[3] , x[4]]] #one partition contains x1,x2 and the other contains x3,x4
optimize!(model, gdp_method = PSplit(partition))

In src/psplit.jl are extensions for reformulate_disjunct_constraint as well as new functions for building partitioned expressions.

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@05ee10a). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #124   +/-   ##
=========================================
  Coverage          ?   99.64%           
=========================================
  Files             ?       14           
  Lines             ?     1419           
  Branches          ?        0           
=========================================
  Hits              ?     1414           
  Misses            ?        5           
  Partials          ?        0           

☔ 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.

@pulsipher
Copy link
Collaborator

@dnguyen227, is this ready for review?

@dnguyen227
Copy link
Contributor Author

Yes please review.

Copy link
Collaborator

@pulsipher pulsipher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some initial comments for improvement. One fundamental observation though is that P-Split just applies Hull to each partitioned subset. With this in mind Pyomo simply applies their Hull transformation after getting the partitions: https://github.com/Pyomo/pyomo/blob/main/pyomo/gdp/plugins/between_steps.py. I think we should do same, that way we aren't unnecessarily repeating the Hull code. Moreover, the existing Hull codebase is already battletested.

@dnguyen227 dnguyen227 requested a review from pulsipher October 17, 2025 17:56
Copy link
Collaborator

@pulsipher pulsipher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking pretty good, just a few suggestions for improvement.

@dnguyen227 dnguyen227 requested a review from pulsipher October 20, 2025 14:57
@dnguyen227 dnguyen227 requested a review from pulsipher October 20, 2025 17:08
@pulsipher pulsipher merged commit aba6f8b into infiniteopt:master Oct 20, 2025
4 checks passed
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