Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions src/iis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ Base.@kwdef mutable struct Optimizer
# iis attributes
time_limit::Float64 = Inf
verbose::Bool = false
skip_feasibility_check::Bool = false
stop_if_infeasible_bounds::Bool = true
stop_if_infeasible_ranges::Bool = true
deletion_filter::Bool = true
Expand Down Expand Up @@ -125,17 +124,6 @@ function MOI.get(optimizer::Optimizer, ::MOI.Silent)
return !optimizer.verbose
end

struct SkipFeasibilityCheck <: MOI.AbstractOptimizerAttribute end

function MOI.set(optimizer::Optimizer, ::SkipFeasibilityCheck, value::Bool)
optimizer.skip_feasibility_check = value
return
end

function MOI.get(optimizer::Optimizer, ::SkipFeasibilityCheck)
return optimizer.skip_feasibility_check
end

struct StopIfInfeasibleBounds end

function MOI.set(optimizer::Optimizer, ::StopIfInfeasibleBounds, value::Bool)
Expand Down Expand Up @@ -240,8 +228,7 @@ function MOI.compute_conflict!(optimizer::Optimizer)
println("Starting MathOptIIS IIS search.")
end
T = Float64
is_feasible = _feasibility_check(optimizer, optimizer.original_model)
if is_feasible && !optimizer.skip_feasibility_check
if _feasibility_check(optimizer, optimizer.original_model)
optimizer.status = MOI.NO_CONFLICT_EXISTS
return optimizer.results
end
Expand Down
12 changes: 0 additions & 12 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -407,13 +407,6 @@ function test_interval()
MOI.compute_conflict!(solver)
data = solver.results
@test length(data) == 0
@test !MOI.get(solver, MOIIS.SkipFeasibilityCheck())
MOI.set(solver, MOIIS.SkipFeasibilityCheck(), true)
@test MOI.get(solver, MOIIS.SkipFeasibilityCheck())
MOI.compute_conflict!(solver)
data = solver.results
@test length(data) == 0
# TODO check status
return
end

Expand All @@ -439,11 +432,6 @@ function test_pass_attribute()
MOI.compute_conflict!(solver)
data = solver.results
@test length(data) == 0
MOI.set(solver, MOIIS.SkipFeasibilityCheck(), true)
@test MOI.get(solver, MOIIS.SkipFeasibilityCheck())
MOI.compute_conflict!(solver)
data = solver.results
@test length(data) == 0
return
end

Expand Down
Loading