User Tools

Site Tools


solver:getting_a_list_of_best_integer_solutions_of_my_mip_model

Getting a list of best integer solutions of my MIP

Q: I have an MIP which I'm solving using CPLEX. Besides the optimal solution, I'm also interested in the second,third,fourth etc. best solution. Is there a way for GAMS to tell CPLEX to return a ranked-order list of these solutions? I understand that this can be done with integer cuts… “Solve once, get first solution, append corresponding integer cut, resolve, get second best solution etc….”

GAMS/CPLEX has a feature called solution pool to obtain multiple solution of MIPs or MIQCPs. It was introduced with GAMS 22.6 and is described in the CPLEX manual in chapter 3.5. Also there is an example solnpool in the GAMS Model Library demonstrating this feature. Furthermore, solutions can be collected during the solution process by using GAMS BCH facility. See a modified version of the model library example DICE that demonstrates this feature from here .

GAMS/BARON has a feature using the options numsol and isoltol. It is described in Baron's manual in chapter 4.2 and used in the GAMS Model Library in model bchfcnet (note that this includes bchfcnet.inc) and also works on MINLP models .

Both write the intermediate solutions to gdx files, which you can read using $gdxin or $execute_load.

In addition to the features provided by GAMS/CPLEX and GAMS/BARON, there is another way to retrieve multiple solutions. You can iteratively add cuts to your model. Cuts allow you to exclude solutions you already have found. Have a look at the GAMS models queens and icut from the GAMS Model Library, which illustrate the basic ideas.

solver/getting_a_list_of_best_integer_solutions_of_my_mip_model.txt · Last modified: 2017/09/02 17:39 by support