Retrieving Solutions

After optimization has completed, you can retrieve solutions from the solution pool using a few parameters and attributes. The SolCount attribute indicates how many solutions were retained by the MIP solver. The best solution can always be obtained through the X attribute. Sub-optimal solutions can be obtained by setting the SolutionNumber parameter and then querying the Xn attribute.

For example, to retrieve the worst solution kept by the MIP solver, you'd first query SolCount to determine how many solutions are available, then set the SolutionNumber parameter to SolCount-1, then query the Xn attribute.

The PoolObjBound attribute gives a bound on the objective of undiscovered solutions. Further tree exploration won't find better solutions. You can use this parameter to get a count of how many of the <span>$</span>n<span>$</span> best solutions you found: any solutions whose objective values are at least as good as PoolObjBound are among the <span>$</span>n<span>$</span> best.