JuMP 0.20.1: Possible bug in CPLEX when using generic lazy callback

Specs: JuMP version 0.20.1, MOI version 0.9.12, CPLEX version 12.10, CPLEX.jl version 0.6.3.

When using JuMP and CPLEX to solve a problem via outer approximation (using a generic lazy callback), I’m getting the following error at the first fractional node the callback is called at (the callback works fine the first 5-6 times its called at strictly integral points).

CPLEX Error 1811: Attempt to invoke unsupported operation…
Got exception outside of a @test
CPLEX.CplexError(1811, “CPLEX Error 1811: Attempt to invoke unsupported operation…\n”)
Stacktrace:
[1] return_status_or_throw at /Users/ryangeorgecory-wright/.julia/packages/CPLEX/VVr3o/src/cpx_generic_callbacks.jl:24 [inlined]
[2] cbrejectcandidate(::CPLEX.CallbackContext, ::Int32, ::Int32, ::Array{Float64,1}, ::Array{Int8,1}, ::Array{Int32,1}, ::Array{Int32,1}, ::Array{Float64,1}) at /Users/ryangeorgecory-wright/.julia/packages/CPLEX/VVr3o/src/cpx_generic_callbacks.jl:161
[3] submit(::CPLEX.Optimizer, ::MathOptInterface.LazyConstraint{CPLEX.CallbackContext}, ::MathOptInterface.ScalarAffineFunction{Float64}, ::MathOptInterface.LessThan{Float64}) at /Users/ryangeorgecory-wright/.julia/packages/CPLEX/VVr3o/src/MOI/MOI_callbacks.jl:142
[4] submit(::MathOptInterface.Bridges.LazyBridgeOptimizer{CPLEX.Optimizer}, ::MathOptInterface.LazyConstraint{CPLEX.CallbackContext}, ::MathOptInterface.ScalarAffineFunction{Float64}, ::MathOptInterface.LessThan{Float64}) at /Users/ryangeorgecory-wright/.julia/packages/MathOptInterface/XiH8D/src/Bridges/bridge_optimizer.jl:1195

Note that I’m rounding the fractional solution to be integral and then generating the cut at the integral point, since I don’t have a cheap way of generating the cut at a strictly fractional point. I was wondering whether this is a known issue/something which people could maybe propose a workaround for (e.g. is there an equivalent of “fractional=false” in new JuMP?).

I think this might be a bug in either CPLEX or the bridge between JuMP and CPLEX, since the same code works correctly when using Gurobi 9.0 and JuMP.

I can also cook up a minimal working example if requested

1 Like

Per the docs IBM Documentation it looks like we can only reject candidates at CALLBACK_CONTEXT_CANDIDATE.

I don’t have time to investigate further. It would be great if you could investigate the fix and report if it is what we should be doing: Update MOI_callbacks.jl by odow · Pull Request #286 · jump-dev/CPLEX.jl · GitHub

p.s. reproducible examples are always helpful.