Solutions pool (not optimal)


Posted the same question in the Google group yesterday:

I’m trying to generate a pool with optimal solutions. However, after executing my model for 8 hours, I didn’t find an optimal solution.
The solution I found was: absmipgap = 0.036, relmipgap = 0.6

Therefore, I decided to generate a pool of solutions that are the same or better than the one I found, using these options:

‘poolstub=allopt populate=2 populatelim=5 poolintensity=4 poolagap=0.005 poolreplace=1 timelimit=3600’

However, after executing 1 hour, it printed only 2 solutions that are identically the same.

So, which options do you recommend ? I gave up finding several optimal solutions, but some solutions that are more or less the same or better would work !

In addition, why did it print two solutions identically the same ?

Thanks in advance

1 Like

To return the 5 best solutions found in one hour of CPLEX execution, you could use these options:

option cplex_options 'poolstub=allopt poolcapacity=5 poolreplace=1 timelimit=3600';

Or instead of timelimit, you can specify mipdisplay=2 and watch the CPLEX progress log, and abort the run (using ctrl+C) whenever you like; the 5 best solutions will be returned.

If you stop the run with a mipgap or absmipgap CPLEX option, then you can try also specifying populate and poolintensity options to see whether you get a better collection of solutions. For some problems this does not help much, however.

When you say that CPLEX returned two solutions that are identically the same, do you mean that they have the same values for all of the variables, or only the same objective value? To get more help, if you see the same issue again, try posting the entire mipdisplay=2 log.

1 Like

I’m not getting the expected results. The program is generating 5 solutions identically the same.

I’m using:
option cplex_options ‘poolstub=allopt poolcapacity=5 poolreplace=1 timelimit=60’;

for {n in 1…allopt.npool} {
display x,z,y >(“allopt” & n & “.out”);

You need to read each solution into AMPL before you display it, by using a solution command:

for {n in 1..allopt.npool} {
   solution ("allopt" & n & ".sol");
   display x,z,y >("allopt" & n & ".out");

(This works if your model’s objective function is allopt. In general, you should use the objective function’s name before .npool.)