Skip to content

Commit 2f9eb7d

Browse files
authored
Slightly improve a tolerance issue in KirlikSayin (#198)
From a previous solve, z_k may be a value like z+eps where z in Z and eps is the feasibility tolerance. However, if scalars[k] is integer valued, then presolve may (somewhat reasonably) deduce that this problem is infeasible. Instead of rounding z_k, changing EqualTo to LessThan seemed to work on the instances I have. I don't know why. There is also a weird situation in which Gurobi declared a problem unbounded. I can't reproduce without running the entire thing, but I think it is a mix of presolve proving that there is no finite solution (because its infeasible) and yet there being a "feasible" MIP solution in memory from the previous solve. It comes down to the weird mix of tolerances in MIP starts, presolve, simplex, and this equality constraint. This is most probably a bug in Gurobi, in that it should either report optimal or infeasible. But not unbounded. I've seem something similar in SDDP.jl.
1 parent 8d2994c commit 2f9eb7d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/algorithms/KirlikSayin.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ function minimize_multiobjective!(
170170
zₖ_constraint = MOI.Utilities.normalize_and_add_constraint(
171171
inner,
172172
scalars[k],
173-
MOI.EqualTo(zₖ),
173+
MOI.LessThan(zₖ),
174174
)
175175
optimize_inner!(model)
176176
if !_is_scalar_status_optimal(model)

test/test_model.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,12 @@ function test_printing()
258258
return
259259
end
260260
contents = read(joinpath(dir, "log.txt"), String)
261-
for line in [
261+
for line in Any[
262262
"Algorithm: KirlikSayin",
263263
"1 0.00000e+00 0.00000e+00",
264264
"----------------------------------------------",
265265
"termination_status: OPTIMAL",
266-
"result_count: 10",
266+
r"result_count: [0-9]+",
267267
"Time spent in subproblems: ",
268268
]
269269
@test occursin(line, contents)

0 commit comments

Comments
 (0)