ILOG CPLEX 11.0 User's Manual > Discrete Optimization > Solution Pool: Generating and Keeping Multiple Solutions > Accessing a Solution in the Solution Pool

The solutions in the pool are indexed numerically. The index -1 (minus one) normally specifies the incumbent. Generally, low index numbers specify the solutions found early. However, the index numbers may change if you re-populate the pool, depending on the strategy in use when the pool reaches the limit of its capacity.

Table 15.2 summarizes the methods, routines, or commands that access information about a given solution in the solution pool.

Table 15.2 Accessing solution information in the solution pool
Purpose 
Concert method 
Callable Library routine 
Interactive Optimizer command 
Objective value 
getObjValue 
CPXgetsolnpoolobjval 
display solution member i obj 
Value of variable 
getValues 
CPXgetsolnpoolx 
display solution member i var 
Slack in linear constraints 
getSlacks 
CPXgetsolnpoolslack 
display solution member i slacks 
Slack in quadratic constraints 
getSlacks 
CPXgetsolnpoolqconstrslack 
display solution member i qcslacks 
Quality 
getQuality 
CPXgetsolnpoolintquality 
or 
CPXgetsolnpooldblquality 
display solution member i quality 
Difference between solutions 
(see Notes) 
(see Notes) 
display solution difference i j 

Notes
In the Interactive Optimizer, the command

display solution difference 1 2

compares the first and second solution. Likewise, the command

display solution difference 0 2

compares the incumbent and the second solution.

There is no exact equivalent of this difference command in Concert Technology or the Callable Library. In those APIs, first access the solution vector (for example, in the C++ API by means of getValues or in the C API by means of the routine CPXgetsolnpoolx) and then write your own comparison.

For a sample of these methods or routines, see the example in yourCPLEXhome/examples: