Getting a list of best integer solutions/multiple solutions of MIP  FAQ

Frequently asked questions about GAMS

Moderator: aileen

Forum rules
Please ask questions in the other sub-forums
Locked
abhosekar
Moderator
Moderator
Posts: 295
Joined: 3 years ago

Getting a list of best integer solutions/multiple solutions of MIP  FAQ

Post by abhosekar »

GAMS/CPLEX has a feature called solution pool to obtain multiple solutions of MIPs or MIQCPs. It was introduced with GAMS 22.6 and is described in the CPLEX manual in chapter 3.5. There is also 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.
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. In general, obtaining all solutions (with objective in a particular interval) of a MIP is not an easy task. If you have continuous variables in the MIP there may be even infinite many optimal solutions. In this case there is no efficient general way. If your MIP consists of binary/integer variables only, 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.
Locked