Skip to content

Commit ec2ecd5

Browse files
authored
[breaking] a large refactoring of MathOptIIS (#34)
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.
1 parent f7b3b73 commit ec2ecd5

File tree

13 files changed

+2810
-1184
lines changed

13 files changed

+2810
-1184
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
fail-fast: false
2424
matrix:
2525
machine:
26-
- version: '1.6'
26+
- version: '1.10'
2727
os: ubuntu-latest
2828
arch: x64
2929
- version: '1'
@@ -41,7 +41,7 @@ jobs:
4141
with:
4242
version: ${{ matrix.machine.version }}
4343
arch: ${{ matrix.machine.arch }}
44-
- uses: julia-actions/cache@v2
44+
- uses: julia-actions/cache@v3
4545
- uses: julia-actions/julia-buildpkg@v1
4646
- uses: julia-actions/julia-runtest@v1
4747
- uses: julia-actions/julia-processcoverage@v1

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
77

88
[compat]
99
MathOptInterface = "1.43.0"
10-
julia = "1.6"
10+
julia = "1.10"

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Pkg.add("MathOptIIS")
2727

2828
## Usage
2929

30-
This package is not intended to be called directly from user-code. Instead, it
30+
MathOptIIS is not intended to be called directly from user-code. Instead, it
3131
should be added as a dependency to solver wrappers that want to provide an IIS.
3232

3333
To add to an existing wrapper, add a new field:
@@ -41,6 +41,11 @@ function MOI.compute_conflict!(model::Optimizer)
4141
solver = MathOptIIS.Optimizer()
4242
MOI.set(solver, MathOptIIS.InfeasibleModel(), model)
4343
MOI.set(solver, MathOptIIS.InnerOptimizer(), Optimizer)
44+
# Optional: set the solver's silent to true or false. In this example,
45+
# follow the outer attribute.
46+
MOI.set(solver, MOI.Silent(), MOI.get(model, MOI.Silent()))
47+
# Optional: set a time limit. In this case, 60 seconds.
48+
MOI.set(solver, MOI.TimeLimitSec(), 60.0)
4449
MOI.compute_conflict!(solver)
4550
model.conflict_solver = solver
4651
return
@@ -53,6 +58,13 @@ function MOI.get(optimizer::Optimizer, attr::MOI.ConflictStatus)
5358
return MOI.get(optimizer.conflict_solver, attr)
5459
end
5560

61+
function MOI.get(optimizer::Optimizer, attr::MOI.ConflictCount)
62+
if optimizer.conflict_solver === nothing
63+
return 0
64+
end
65+
return MOI.get(optimizer.conflict_solver, attr)
66+
end
67+
5668
function MOI.get(
5769
optimizer::Optimizer,
5870
attr::MOI.ConstraintConflictStatus,

0 commit comments

Comments
 (0)