Repository navigation
Support native MOI.ZeroOne constraints - #223
Merged
Merged
Conversation
Represent binary variables using integer columns with bounds intersected with [0, 1]. Track ZeroOne independently from Integer so direct models do not expose bridge-internal integrality constraints to JuMP. Preserve explicit bounds when adding, changing, or deleting binary constraints, and retain integrality while either discrete constraint remains. Clear binary state when deleting variables or emptying models. Add a standalone regression file, included by runtests.jl, and a test project. Cover bounds in either insertion/deletion order, overlapping Integer constraints, column reuse, and MOI's ZeroOne conformance tests. Validation: - test/test_zero_one.jl: 223 assertions passed with the test project. - Issue 222 JuMP reproduction: 28 assertions passed for direct and bridged direct models, including MILP solves, fixing, LP dual = 1.0, restoring, and re-solving. - Temporary @show @__LINE__ traces confirmed the new code and ZeroOne method instances execute; tracing was removed afterward. - JuliaFormatter 2.14.7 over the repository leaves no unstaged diff. Fixes #222.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #222