Skip to content

Commit 638035a

Browse files
adds bridge
1 parent adc15ea commit 638035a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/Infeasibility/analyze.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,16 +211,16 @@ Use the solver's native `MOI.compute_conflict!` to find an IIS and categorize
211211
the results into an `Infeasibility.Data` struct.
212212
"""
213213
function _analyze_native_iis(model::MOI.ModelLike, optimizer)
214-
# Instantiate solver and copy model
215-
solver = MOI.instantiate(optimizer)
214+
# Instantiate solver with bridges so that constraint types the solver
215+
# doesn't natively support (e.g. Interval) are automatically transformed.
216+
solver = MOI.instantiate(optimizer; with_bridge_type = Float64)
216217
if MOI.supports(solver, MOI.Silent())
217218
MOI.set(solver, MOI.Silent(), true)
218219
end
219220
index_map = MOI.copy_to(solver, model)
220221
reverse_map = _reverse_index_map(index_map)
221222

222223
# Solve to confirm infeasibility, then compute IIS
223-
MOI.optimize!(solver)
224224
MOI.compute_conflict!(solver)
225225

226226
status = MOI.get(solver, MOI.ConflictStatus())
@@ -284,6 +284,7 @@ function MathOptAnalyzer.analyze(
284284
"Native IIS computation failed ($(typeof(err))); " *
285285
"falling back to MathOptIIS elastic filter.",
286286
)
287+
@error("Error details: $err")
287288
end
288289
end
289290
# Fallback: MathOptIIS elastic-filter path

0 commit comments

Comments
 (0)