Skip to content

Implementing LOA and its infinite version.#137

Open
dnguyen227 wants to merge 70 commits into
infiniteopt:masterfrom
dnguyen227:loa_two_models
Open

Implementing LOA and its infinite version.#137
dnguyen227 wants to merge 70 commits into
infiniteopt:masterfrom
dnguyen227:loa_two_models

Conversation

@dnguyen227

@dnguyen227 dnguyen227 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Implements LOA with two main components.

  • a primary NLP — the model reformulated by an inner_method (BigM, MBM, or Hull) with the disjunct binaries fixed at the current selection, and
  • a master MILP that accumulates outer-approximation and no-good cuts until its bound meets the incumbent.

For the infinite implementation, the flow is as follows.
Starting from Infinite GDP,

  1. Reformulate with the inner method (still infinite).
  2. Transcribe once for the primary NLP.
  3. Copy its variables + linear constraints this is the master (MILP) (I stay in this form for adding cuts and resolving).
  4. Fix a combo on the transcribed NLP -> Solve.
  5. Emit cuts into the transcribed master.

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.60%. Comparing base (48a1ac5) to head (4c31ca6).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #137      +/-   ##
==========================================
+ Coverage   99.51%   99.60%   +0.09%     
==========================================
  Files          17       18       +1     
  Lines        2061     2560     +499     
==========================================
+ Hits         2051     2550     +499     
  Misses         10       10              

☔ View full report in Codecov by Harness.
📢 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
Copy Markdown
Contributor Author

@pulsipher good for review.

@pulsipher pulsipher left a comment

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 took a lot of work. My main concern is that LOA is not really a reformulation method and we are trying to force it through the reformulation API, which has some gotchas. I suspect we will need a different workflow like how Pyomo.gdp does for methods like LOA.

Comment thread src/datatypes.jl
new{T}(ϵ)
# Internal: LOA installs a Dict here to collect the disaggregation
# map during reformulation; `nothing` for every other use.
disaggregation_map::Union{Nothing, AbstractDict}

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 seems like something to avoid, is it not possible to only store it in `_Hull'?

Comment thread src/loa.jl
Comment on lines +141 to +142
_set_solution_method(model, method)
_set_ready_to_optimize(model, true)

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.

The problem I see with this workflow is that instead of reformulating, this actually just solves the problem as a solver. What happens if the user then calls optimize! afterward?

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