Septimus G
Septimus G

Reputation: 103

Gurobi 7.0-How to Find the n Best Solutions to MILP?

I am using Gurobi 7.0 through Matlab. Based on the documentation, in order to find the n best solutions you need to set the parameters:

PoolSearchMode=2, to find alternative optimal solutions in a systematic way.

PoolSolutions=n, number of of solution in the pool.

When I do this my result contains the same fields as with the default parameters, i.e. only one solution. I have also tried changing the parameter SolutionNumber, but it does not affect the outcome.

I suspect the alternative optimal solutions are being found, since the solver reports on the prompt a solution count equivalent to n with objective values, but I am not able to retrieve them. I hope this is not another limitation of the Gurobi Matlab API.

Also, I know I could find these solutions using integer cuts, but from my understanding that would be much more inefficient since it would require to start the branch and bound tree from the beginning.

Upvotes: 0

Views: 463

Answers (1)

Septimus G
Septimus G

Reputation: 103

It is not possible. The Gurobi Matlab interface is limited because it does not treat the model as a class, even though Matlab offers object oriented programming. This limits many functionalities. CPLEX however allows Matlab users to interact with the model class and retrieve solutions from the solutions pool.

Upvotes: 1

Related Questions