Robust heuristic for binding SOC without exact solution

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] )

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:

  1. Is it a good idea to look at the slack or should I rather evaluate the ratio of val and rhs?
  2. How sensitive is the slack (or ratio of val and rhs) to model properties like the objective value and solver parameters like the convergence or feasibility tolerance?

Numerical tolerances are hard, and the answer very much depends on the solver and methods you’re using. So, you might get a more informed answer from Gurobi support.

What you might try is solving the LP without the SOC, checking if the SOC is already satisfied (up to whatever tolerance is meaningful to you), and if not, add the SOC constraint and re-solve.

I do not want to obtain an exact solution or compute duals

Minor point, but all SOC solvers I’m aware of compute duals either explicitly or implicitly as part of solving the problem.