-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get the Solution Pool using Julia/CPLEX? #197
Comments
I don't think it's available on the JuMP layer since it's solver specific. If you are ready to do a bit of hacking, then you can maybe try using |
I set the parameters as explained on the IBM website, but I don't know how to call the populate solution pool. Using callbacks I only got the values of the objective function, best bound, numbers of nodes of B&B tree, but I need the values of the multiple solutions for the variables that have the same objective function value, which means populate the solution pool. |
We now wrap model = CPLEX.Optimizer()
x = MOI.add_variable(model)
# ... model definition ...
MOI.optimize!(model)
CPXpopulate(model.env, model.lp)
for n = 1:MOI.get(model, MOI.ResultCount())
x_n = MOI.get(model, MOI.VariablePrimal(n), x)
println("Value of x in solution $(n) is $(x_n)")
end This is all possible via the exposed C API, so it just needs some plumbing. I won't be implementing this, but I will leave the issue open for a motivated person in the community. |
Hi, are there updates on this issue? More and more solvers are now providing solution pools and it would be an useful feature |
@jd-foster worked out the details here: jump-dev/jump-dev.github.io#58. It just needs implementing at the MOI level. PRs accepted. |
Hi everyone,
I need the solution pool for storing multiple solutions of a MIP model. I using Julia and the packages JuMP and CPLEX as a solver. So I need to collect solutions within a given percentage of the optimal solution but I don’t know how to do it in Julia, anybody can help me, please?
The text was updated successfully, but these errors were encountered: