JuMP Gurobi.jl CPLEX.jl Solution Pool

Hi community,

I was interested in setting and obtaining a solution pool for a MILP problem using a solver like CPLEX or Gurobi that support that capability.
Do you know how I can proceed or suggestions?

Thank you

I replied to your comment: How to get the Solution Pool using Julia/CPLEX? · Issue #197 · jump-dev/CPLEX.jl · GitHub

PRs accepted.

It’s implemented in Gurobi, but not CPLEX.

1 Like

Thank you very much!
In Gurobi you mean like the following example?

m = Model(optimizer_with_attributes(Gurobi.Optimizer, “PoolSearchMode”=>2, “PoolSolutions” => 1000))
@variables(m,begin
0 <= x <= 5
0 <= y <= 10, Int
z, Bin
zz, Bin
end)
@objective(m, Max, x + 2y + 5*(z+zz))
@constraint(m, x + y + z + zz<= 10)
@constraint(m, x + 2y + z + zz <= 15)
@constraint(m, z + zz <= 1)
optimize!(m)
value(z, result=2)

https://jump.dev/JuMP.jl/stable/manual/solutions/#Multiple-solutions