XPRSgetpresolvesol
PurposeReturns the solution for the presolved problem from memory.Synopsisint XPRS_CC XPRSgetpresolvesol(XPRSprob prob, double x[], double slack[], double dual[], double dj[]);
Arguments
prob The current problem. x 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.ExampleThe 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 information1. 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
If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.