I’m solving a large number of LPs with a single second-order cone constraint. For each of these problems, I want to check, if the SOC is binding. To keep the run-time short, I do not want to obtain an exact solution or compute duals. So, my code look something like this:
using Gurobi, JuMP
model = Model(Gurobi.Optimizer)
@variable(model, x[i=1:2])
soc= @constraint(model, x[1]^2 + x[2]^2 <= 50.0)
@objective(model, Max, x[1] + x[2] )
optimize!(model)
val = value(soc)
rhs = normalized_rhs(soc)
slack = val - rhs
Although soc
is theoretical binding, its slack is always around 3e-6
due to imprecisions. When looking for an appopriate and robust heuristic to check if soc
is binding, there were two things I wondered about specifically:
- Is it a good idea to look at the slack or should I rather evaluate the ratio of
val
andrhs
? - How sensitive is the slack (or ratio of
val
andrhs
) to model properties like the objective value and solver parameters like the convergence or feasibility tolerance?