XPRSloadmipsol


Purpose
Loads a MIP solution for the problem into the optimizer.
Synopsis
int XPRS_CC XPRSloadmipsol(XPRSprob prob, const double dsol[], int *status);
Arguments
prob 
The current problem.
dsol 
Double array of length COLS (for the original problem and not the presolve problem) containing the values of the variables.
status 
Pointer to an int where the status will be returned. The status is one of:
-1 
Solution rejected because an error occurred;
Solution accepted;
Solution rejected because it is infeasible;
Solution rejected because it is cut off;
Solution rejected because the LP reoptimization was interrupted.
Example
This example loads a problem and then loads a solution found previously for the problem to help speed up the MIP search:

XPRSreadprob(prob,"problem",""):
XPRSloadmipsol(prob,dsol,&status);
XPRSminim(prob,"g");
Further information
The values for the continuous variables in the dsol array are ignored and are calculated by fixing the integer variables and reoptimizing.
Related topics
XPRSgetmipsol.


If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.