Skip to content Skip to sidebar Skip to footer

Obtaining Different Solutions On Solving A Cplex Model Many Times

I have an MIP model written with docplex and a solution pool written with cplex. My model has billions of solutions in reality. I need to solve this model several times (10 for exa

Solution 1:

You can use a diversity filter for the solution pool, see CPLEX > User's Manual for CPLEX > Discrete optimization > Solution pool: generating and keeping multiple solutions > Filtering the solution pool and also the reference documentation for the callable library function CPXXaddsonpooldivfilter() which explains in detail how the filter is evaluated. This can only be done if all your variables are binary.

Another option is to add a no-good cut for each solution you have already found.

Yet another option is to use an incumbent callback (or the generic callback with CANDIDATE context) to reject any solution that you already found.

All this being said, I am not clear why you want to solve the same model multiple times from scratch. Did you try to just continue the search? If the search stops due to a solution limit and you call it again, then it should continue where it previously stopped. So it should find different solutions.

Also, if you want to get thousands of solutions then I wonder what you do with those solutions. Maybe it can help to install or adjust an objective function that aims for certain solutions. Using different objective functions can only drive diversity of the solutions.

Post a Comment for "Obtaining Different Solutions On Solving A Cplex Model Many Times"