Do faster optimization with Cbc solver in JuMP

I am trying to do an optimization of a MILP problem with Cbc solver but it is too slow. I know that with CPLEX it is much faster but I need to use Cbc. Does anyone know of a resource to get it? Maybe multi-threading?

if you need to use use Cbc you’re using Cbc, unless you are talking about write a Julia Cbc?

No. I am using JuMP and the Cbc solver for MILP optimization but it is too slow and I want to know if there is any way to make the optimization more faster.

but you still have to use Cbc optimizer, correct? if so, you’re asking how to make your JuMP code faster maybe (which was not clear, except maybe implied from the tag)

Make sure you set the threads attribute:

using Cbc
using JuMP
n = # the number of threads available on your machine
model = Model(Cbc.Optimizer)
set_optimizer_attribute(model, "threads", n) 

The answer is “it depends.”

Define “too slow.” To find a feasible solution? Or to prove optimality?

Most solvers will quickly find a good-enough solution, and then spend a long time proving it is near optimal. Just set a time-limit and return the good-enough solution.

Poor formulations, like large big-M constraints can also play a part. You could also try to provide a good starting point as a hint via

You should also take a read of