Purpose
Obtain the solution values for the most recent SLP iteration
Synopsis
int XPRS_CC XSLPgetslpsol(XSLPprob Prob, double *x, double *slack,
double *dual, double *dj);
Arguments
|
Prob
|
The current SLP problem.
|
|
x
|
Double array of length XPRS_COLS to hold the values of the primal variables. May be NULL if not required.
|
|
slack
|
Double array of length XPRS_ROWS to hold the values of the slack variables. May be NULL if not required.
|
|
dual
|
Double array of length XPRS_ROWS to hold the values of the dual variables. May be NULL if not required.
|
|
dj
|
Double array of length XPRS_COLS to hold the recuded costs of the primal variables. May be NULL if not required.
|
Example
The following code fragment recovers the values and reduced costs of the
primal variables from the most recent SLP iteration:
XSLPprob prob;
int nCol;
double *val, *dj;
XSLPgetintattrib(prob,XPRS_COLS,&nCol);
val = malloc(nCol*sizeof(double));
dj = malloc(nCol*sizeof(double));
XSLPgetslpsol(prob,val,NULL,NULL,dj);
Further information
XSLPgetslpsol can be called at any time after an SLP iteration has
completed, and will return the same values even if the problem is subsequently changed.
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.