Skip to content

Conversation

@dnguyen227
Copy link
Contributor

@dnguyen227 dnguyen227 commented Oct 28, 2025

This PR adds the cutting planes reformulation technique. The method iteratively generates cutting planes using a separation problem and relaxed Big-M formulation before applying a final reformulation.

model = GDPModel()
@variable(model, x[1:2])
@variable(model, Y[1:2], Logical)
@constraint(model, x[1] <= 3, Disjunct(Y[1]))
@constraint(model, x[1] <= 4, Disjunct(Y[2]))
@disjunction(model, [Y[1], Y[2]])
@objective(model, Max, sum(x))

# Use with default settings (3 iterations, BigM final reformulation)
optimize!(model, gdp_method = cutting_planes(HiGHS.Optimizer))

# Or customize parameters
optimize!(model, gdp_method = cutting_planes(HiGHS.Optimizer;max_iter=10, seperation_tolerance=1e-4, final_reform_method=Indicator(), M_value=1e6))

@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2025

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #125   +/-   ##
=========================================
  Coverage          ?   99.56%           
=========================================
  Files             ?       15           
  Lines             ?     1615           
  Branches          ?        0           
=========================================
  Hits              ?     1608           
  Misses            ?        7           
  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.

@dnguyen227
Copy link
Contributor Author

@pulsipher Ready for 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.

See comments below, I am not also sure why the patch coverage is detecting something with the constraints file.

@dnguyen227 dnguyen227 requested a review from pulsipher November 4, 2025 16:49
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.

Looking pretty good, please add comments and address the comments below.

@dnguyen227 dnguyen227 requested a review from pulsipher November 5, 2025 18:15
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.

Looks good!

@pulsipher pulsipher merged commit dc17a6e into infiniteopt:master Nov 5, 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