Skip to content

Extensions to MBM and cutting planes techniques.#135

Merged
pulsipher merged 34 commits into
infiniteopt:masterfrom
dnguyen227:inf_mbm_cp
May 26, 2026
Merged

Extensions to MBM and cutting planes techniques.#135
pulsipher merged 34 commits into
infiniteopt:masterfrom
dnguyen227:inf_mbm_cp

Conversation

@dnguyen227
Copy link
Copy Markdown
Contributor

@dnguyen227 dnguyen227 commented Apr 20, 2026

This PR makes changes to extend MBM and cutting planes techniques.

MBM

  • copy_model_with_constraints(::InfiniteModel, ...)
  • prepare_max_M_objective(::InfiniteModel, ...) (LessThan + GreaterThan)
  • raw_M(sub, ::Vector{<:AbstractJuMPScalar}, ::_MBM)

Cutting Planes

  • copy_and_reformulate(::InfiniteModel, ..., ::CuttingPlanes)
  • extract_solution(::InfiniteModel)
  • add_cut(::InfiniteModel, ...)

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.51%. Comparing base (eca54be) to head (34b3ea8).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #135      +/-   ##
==========================================
+ Coverage   99.38%   99.51%   +0.12%     
==========================================
  Files          17       17              
  Lines        1959     2061     +102     
==========================================
+ Hits         1947     2051     +104     
+ Misses         12       10       -2     

☔ 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 dnguyen227 marked this pull request as ready for review April 22, 2026 13:20
@dnguyen227 dnguyen227 marked this pull request as draft April 24, 2026 17:41
@dnguyen227 dnguyen227 marked this pull request as ready for review April 27, 2026 18:25
Copy link
Copy Markdown
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 the comments below. Also, we will need some documentation on how these methods are handled for InfiniteModels (there is some nuance).

Comment thread ext/InfiniteDisjunctiveProgramming.jl
Comment thread ext/InfiniteDisjunctiveProgramming.jl Outdated
Comment thread ext/InfiniteDisjunctiveProgramming.jl Outdated
Comment thread ext/InfiniteDisjunctiveProgramming.jl Outdated
Comment thread ext/InfiniteDisjunctiveProgramming.jl Outdated
@@ -1,4 +1,4 @@
using InfiniteOpt, HiGHS, Ipopt, Juniper
using InfiniteOpt, HiGHS, Ipopt, Juniper, Interpolations
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What happens if this is not imported? It seems strange for the user to import a package they do not directly use.

Copy link
Copy Markdown
Contributor Author

@dnguyen227 dnguyen227 May 1, 2026

Choose a reason for hiding this comment

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

When it's not imported I have all test sets failing (not limited to just raw_M where its called).
MethodError: no method matching InfiniteGDPModel() The function InfiniteGDPModel exists, but no method is defined for this combination of argument types.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is because Julia extensions cannot have additional dependencies not included in the base package. And due to some type piracy in Interpolations, I do not want it to be a core dependency of InfiniteOpt or DisjunctiveProgramming. If you only use it for linear interpolation of M-values, perhaps it makes since to have a lightweight native function instead. It might even make sense just to use constant interpolation.

@dnguyen227 dnguyen227 changed the title Extentions to MBM and cutting planes techniques. Extensions to MBM and cutting planes techniques. May 14, 2026
@dnguyen227
Copy link
Copy Markdown
Contributor Author

@pulsipher Tests are failing with MethodError: no method matching copy_model(::InfiniteModel) (passing locally on my clone). Please advise on what I should do with setting compatible versions.

@pulsipher
Copy link
Copy Markdown
Collaborator

@pulsipher Tests are failing with MethodError: no method matching copy_model(::InfiniteModel) (passing locally on my clone). Please advise on what I should do with setting compatible versions.

This is b/c the master version was not be properly set up for testing on CI. However, InfiniteOpt v0.6.2 will be released in about 10 minutes, so just update the Project file to require 0.6.2 and you should be good to go.

@pulsipher pulsipher merged commit d2f7059 into infiniteopt:master May 26, 2026
6 of 9 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.

2 participants