Adding cuts to a MILP prior to the solving



I am solving a MILP with JuMP and have a set of valid cuts for the linear relaxation. I would like to add all these inequalities as a pool of possible cuts before launching the solving and the branching procedure. The aim is to avoid implementation of callback where I test all these cuts manually to find the ones violated by a fractional solution. I used to work in C where the function AddCuts would do this ( but I cannot find anything equivalent in JuMP.

Does this possibility exist in JuMP ?


If you know the set of valid cuts, can’t you just add them via the @constraint macro? Do they need to be lazy?

If you want something CPLEX specific, and it is not implemented in (for example, addusercuts), PR’s are accepted :slight_smile:


I need something equivalent to usercuts, not lazy constraints. This is because this set of constraints is of big cardinality but are not necessary for my formulation. We observed a smaller LP gap with these cuts but when adding all of them from the start the solving time is much bigger. Plus I suspect that many of these constraints are not necessary during the resolution. So wanted to try the “addCuts” version.

If there is nothing generic in JuMP, it could be worth adding it to CPLEX.jl. If I manage to make it work with @cpx_ccall, I’ll propose the piece of code :slightly_smiling_face:


If there is nothing generic in JuMP

The current version of JuMP does support user cuts (see the docs); however, I did not mention it because the new version of JuMP is removing solver-independent callbacks since there is plenty of evidence that callbacks are not solver-independent.

You can read more about the upcoming changes here.