XPRSgetpresolvesol


Purpose
Returns the solution for the presolved problem from memory.
Synopsis
int XPRS_CC XPRSgetpresolvesol(XPRSprob prob, double x[], double slack[], double dual[], double dj[]);
Arguments
prob 
The current problem.
Double array of length COLS where the values of the primal variables will be returned. May be NULL if not required.
slack 
Double array of length ROWS where the values of the slack variables will be returned. May be NULL if not required.
dual 
Double array of length ROWS where the values of the dual variables will be returned. May be NULL if not required.
dj 
Double array of length COLS where the reduced cost for each variable will be returned. May be NULL if not required.
Example
The following reads in a (Mixed) Integer Programming problem and displays the solution to the presolved problem following optimization of the linear relaxation:
XPRSreadprob(prob,"MyProb","");
XPRSmaxim(prob,"");
XPRSgetintattrib(prob,XPRS_COLS,&cols);
x = malloc(cols*sizeof(double));
XPRSgetpresolvesol(prob,x,NULL,NULL,NULL);
for(i=0;i<cols;i++)
printf("Presolved x(%d) = %g\n",i,x[i]);
XPRSglobal(prob);
Further information
1. If the problem has not been presolved, the solution in memory will be returned.
2. The solution to the original problem should be returned using the related function XPRSgetlpsol.
Related topics
XPRSgetlpsol, Working with Presolve.


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