MIP Solution Pool
In general, the solver finds multiple feasible solutions in the process of solving an MIP problem with the Branch-and-cut method. COPT provides a solution pool for MIP problems, 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 with which 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 49:
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 parameters are the same.
Attributes of Solution Pool
PoolSolsInteger attribute
Number of solutions in the solution pool.