Conversation
Member
Author
|
Okay. I've gone full Rambo and refactored everything so this is breaking. I've also removed many of the "option" controlling attributes. I don't think we want flexibility in how the algorithm runs. We want a simple set-and-forget. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #34 +/- ##
==========================================
+ Coverage 95.44% 99.55% +4.11%
==========================================
Files 4 2 -2
Lines 395 449 +54
==========================================
+ Hits 377 447 +70
+ Misses 18 2 -16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2e98579 to
cc35531
Compare
joaquimg
reviewed
Feb 26, 2026
Comment on lines
+229
to
+232
| function _feasibility_check( | ||
| optimizer::Optimizer, | ||
| infeasible_model::MOI.ModelLike, | ||
| ) |
Member
There was a problem hiding this comment.
a solver may say a model is feasible, eventhough its not, that was the reasoning behid the skip.
Maybe the manual needs to tell the user to run before solving in this case.
Member
Author
|
Member
Author
|
@joaquimg want to take a look? |
Member
|
will do |
Member
Author
using JuMP, HiGHS
import MathOptIIS
function main(filename)
model = backend(read_from_file(filename))
solver = MathOptIIS.Optimizer()
MOI.set(solver, MOI.Silent(), false)
MOI.set(solver, MathOptIIS.InfeasibleModel(), model)
MOI.set(solver, MathOptIIS.InnerOptimizer(), HiGHS.Optimizer)
MOI.compute_conflict!(solver)
filter_fn(::Any) = true
function filter_fn(cref::MOI.ConstraintIndex)
for i in 1:MOI.get(solver, MOI.ConflictCount())
status = MOI.get(solver, MOI.ConstraintConflictStatus(i), cref)
if status != MOI.NOT_IN_CONFLICT
return true
end
end
return false
end
new_model = MOI.Utilities.Model{Float64}()
filtered_src = MOI.Utilities.ModelFilter(filter_fn, model)
MOI.copy_to(new_model, filtered_src)
MOI.set(new_model, MOI.ObjectiveSense(), MOI.FEASIBILITY_SENSE)
return new_model
end
julia> @time main("/Users/odow/Downloads/medium-size-infeasible-problem.mps")
[MathOptIIS] starting compute_conflict!
[MathOptIIS] model termination status: OPTIMIZE_NOT_CALLED
[MathOptIIS] starting bound analysis
[MathOptIIS] bound analysis found 0 infeasible subsets
[MathOptIIS] starting range analysis
[MathOptIIS] analyzing MOI.ScalarAffineFunction{Float64} -in- MOI.EqualTo{Float64}
[MathOptIIS] analyzing MOI.ScalarAffineFunction{Float64} -in- MOI.GreaterThan{Float64}
[MathOptIIS] analyzing MOI.ScalarAffineFunction{Float64} -in- MOI.LessThan{Float64}
[MathOptIIS] range analysis found 0 infeasible subsets
[MathOptIIS] starting elastic filter
[MathOptIIS] relaxing integrality if required
[MathOptIIS] constructing the penalty relaxation
[MathOptIIS] using INFEASIBILITY_CERTIFICATE to construct candidate set
[MathOptIIS] size of the candidate set: 11
[MathOptIIS] starting the deletion filter
[MathOptIIS] size of the candidate set: 4
[MathOptIIS] size of the candidate set: 3
[MathOptIIS] elastic filter found 1 infeasible subsets
384.417180 seconds (103.00 M allocations: 7.233 GiB, 0.65% gc time, 0.34% compilation time)
MOIU.Model{Float64}
├ ObjectiveSense: FEASIBILITY_SENSE
├ ObjectiveFunctionType: MOI.ScalarAffineFunction{Float64}
├ NumberOfVariables: 414224
└ NumberOfConstraints: 15
├ MOI.ScalarAffineFunction{Float64} in MOI.EqualTo{Float64}: 2
├ MOI.ScalarAffineFunction{Float64} in MOI.LessThan{Float64}: 1
├ MOI.VariableIndex in MOI.EqualTo{Float64}: 1
├ MOI.VariableIndex in MOI.GreaterThan{Float64}: 6
└ MOI.VariableIndex in MOI.LessThan{Float64}: 5 |
This commit is breaking because it: * Removes SkipFeasibilityCheck * Removes StopIfInfeasibleBounds * Removes StopIfInfeasibleRanges * Removes DeletionFilter * Removes ElasticFilterTolerance * Removes ElasticFilterIgnoreIntegrality In addition, this commit will likely result in a different IIS being returned for many models because it now exploits an infeasibility certificate if one is present.
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.
This commit is breaking because it:
In addition, this commit will likely result in a different IIS being
returned for many models because it now exploits an infeasibility
certificate if one is present.