Skip to content

Commit 209b29d

Browse files
committed
Update
1 parent 3bde4df commit 209b29d

4 files changed

Lines changed: 25 additions & 10 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
1616
MathOptAnalyzerJuMPExt = "JuMP"
1717

1818
[compat]
19-
Dualization = "0.6"
19+
Dualization = "0.7"
2020
JuMP = "1.24"
2121
MathOptIIS = "0.2"
2222
MathOptInterface = "1.37"

src/Infeasibility/analyze.jl

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33
# Use of this source code is governed by an MIT-style license that can be found
44
# in the LICENSE.md file or at https://opensource.org/licenses/MIT.
55

6-
function _add_result(out::Data, model, iis, meta::MathOptIIS.BoundsData)
6+
function _add_result(
7+
out::Data,
8+
model,
9+
iis,
10+
meta::MathOptIIS.Metadata{T,Nothing},
11+
) where {T}
712
@assert length(iis.constraints) == 2
8-
err = InfeasibleBounds{Float64}(
13+
err = InfeasibleBounds{T}(
914
MOI.get(model, MOI.ConstraintFunction(), iis.constraints[1]),
1015
meta.lower_bound,
1116
meta.upper_bound,
@@ -14,9 +19,14 @@ function _add_result(out::Data, model, iis, meta::MathOptIIS.BoundsData)
1419
return
1520
end
1621

17-
function _add_result(out::Data, model, iis, meta::MathOptIIS.IntegralityData)
22+
function _add_result(
23+
out::Data,
24+
model,
25+
iis,
26+
meta::MathOptIIS.Metadata{T,S},
27+
) where {T,S<:Union{MOI.Integer,MOI.ZeroOne}}
1828
@assert length(iis.constraints) >= 2
19-
err = InfeasibleIntegrality{Float64}(
29+
err = InfeasibleIntegrality{T}(
2030
MOI.get(model, MOI.ConstraintFunction(), iis.constraints[1]),
2131
meta.lower_bound,
2232
meta.upper_bound,
@@ -26,13 +36,18 @@ function _add_result(out::Data, model, iis, meta::MathOptIIS.IntegralityData)
2636
return
2737
end
2838

29-
function _add_result(out::Data, model, iis, meta::MOMathOptIISIIS.RangeData)
39+
function _add_result(
40+
out::Data,
41+
model,
42+
iis,
43+
meta::MathOptIIS.Metadata{T,S},
44+
) where {T,S<:MOI.AbstractSet}
3045
@assert length(iis.constraints) >= 1
3146
for con in iis.constraints
3247
if con isa MOI.ConstraintIndex{MOI.VariableIndex}
3348
continue
3449
end
35-
err = InfeasibleConstraintRange{Float64}(
50+
err = InfeasibleConstraintRange{T}(
3651
con,
3752
meta.lower_bound,
3853
meta.upper_bound,

test/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1010
HiGHS = "1"
1111
JuMP = "1"
1212
MathOptInterface = "1"
13-
SCS = "1"
13+
SCS = "2"

test/test_Infeasibility.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function test_bounds()
3232
data =
3333
MathOptAnalyzer.analyze(MathOptAnalyzer.Infeasibility.Analyzer(), model)
3434
list = MathOptAnalyzer.list_of_issue_types(data)
35-
@test length(list) == 1
35+
@test 1 <= length(list) <= 2
3636
ret = MathOptAnalyzer.list_of_issues(data, list[1])
3737
@test length(ret) == 1
3838
@test ret[] == MathOptAnalyzer.Infeasibility.InfeasibleBounds{Float64}(
@@ -81,7 +81,7 @@ function test_integrality()
8181
data =
8282
MathOptAnalyzer.analyze(MathOptAnalyzer.Infeasibility.Analyzer(), model)
8383
list = MathOptAnalyzer.list_of_issue_types(data)
84-
@test length(list) == 1
84+
@test 1 <= length(list) <= 2
8585
ret = MathOptAnalyzer.list_of_issues(data, list[1])
8686
@test length(ret) == 1
8787
@test ret[] == MathOptAnalyzer.Infeasibility.InfeasibleIntegrality{Float64}(

0 commit comments

Comments
 (0)