Callback information about parent in B&B tree

You should be aware that the upcoming release of JuMP will not support solver independent callbacks. See

However, at present you can get the CPLEX model from a JuMP model as follows

m = Model(solver=CplexSolver())
# ... some stuff like @variable and @constraint...
JuMP.build(m)
cpx_mpb = JuMP.internalmodel(m)
# cpx_mpb is a CplexMathProgModel, see
# https://github.com/JuliaOpt/CPLEX.jl/blob/ad35be73747ba144fc67a685d4f0caee780a8c1d/src/CplexSolverInterface.jl#L3
cpx = cpx_mpb.inner 
# cpx is a CPLEX Model, see
# https://github.com/JuliaOpt/CPLEX.jl/blob/ad35be73747ba144fc67a685d4f0caee780a8c1d/src/cpx_model.jl#L1

You can then use the (wrapped) CPLEX C API to add branch callbacks etc.

1 Like