MIP Starts
Utilities of MIP Starts
Set and Load MIP Starts
For MIP problems, COPT provides methods to specify initial solution value(s) for a single variable or set of variables and load it/them into model. The parameters that can be specified are:
vars
:variablesstartvals
:variables’ solution values
The functions in different APIs are shown in Table 36:
API |
Function |
---|---|
C |
|
C++ |
|
C# |
|
Java |
|
Python |
|
Note
Regarding the operations of MIP starts, 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.
For more details on setting initial solutions in C, please refer to funtion
COPT_AddMipStart
in chapter C API Function: MIP start utilities.You may want to call this method several times to input the MIP start. Please call
loadMipStart()
once when the input is done.
Read and Write MIP Starts
COPT provides functions for file read/write. It can read variable values from a MIP start file (".mst"
) as the initial solution values of variables, and write the solving results or existing initial solution to a MIP start file (".mst"
). The functions for reading and writing MIP start file in different APIs are shown in Table 37:
API |
read MIP starts |
write MIP starts |
---|---|---|
C |
|
|
C++ |
|
|
C# |
|
|
Java |
|
|
Python |
|
|
Log of MIP starts
MIP starts are accepted
1.A (better) initial solution was provided
Initial MIP solution # 1 with objective value 9.73987 was accepted
2.A partial initial solution was provided, and set MipStartMode=2
. (complete it by solving a subMIP)
Loading 1 initial MIP solution
Extending partial MIP solution # 1
Extending partial MIP solution # 1 succeed (0.2s)
Initial MIP solution # 1 with objective value 9.66566 was accepted
MIP starts are rejected
1.The provided initial solution was infeasible
Initial MIP solution # 1 was rejected: Primal Inf 1.00e+00 Int Inf 1.78e-15
2.The provided initial solution was not better than the current best one
Initial MIP solution # 2 with objective value 10.3312 was rejected (not better)
3.The provided initial solution was incomplete (partial), and not set MipStartMode=2
Loading 1 initial MIP solution
Initial MIP solution # 1 was rejected: partial
4.The provided initial solution was incomplete (partial), and COPT failed to find a feasible solution by solving subMIP
Loading 1 initial MIP solution
Extending partial MIP solution # 1
Extending partial MIP solution # 1 failed (infeasible)
Initial MIP solution # 1 was rejected: partial