MIP Solution Pool
In general, the solver finds multiple feasible solutions in the process of solving a MIP problem with Branch-and-cut method. COPT provides a solution pool for MIP problem, from which users can obtain solutions and the corresponding objective function values. Supported optimization problem types are: MILP, MISOCP, MIQ(C)P.
COPT provides functions that users can get the iSol
th solution’s objective function value and solution values (of specified variables) by specifying the following parameters.
iSol
: Index of the solution to obtain. (0-based)vars
: Variables
The functions in different APIs are shown in Table 38:
API |
Get solution |
Get objective value |
---|---|---|
C |
|
|
C++ |
|
|
C# |
|
|
Java |
|
|
Python |
|
|
Note: Regarding the operations of solution pool, their function names, calling methods, and parameter names are slightly different in different programming interfaces, but the implementation of functions and meanings of parameter are the same.
Attributes of Solution Pool
PoolSols
Integer attribute
Number of solutions in the solution pool.