XSLPgetslpsol, XPRSgetnlpsol
Obtain the current SLP solution values
int XPRS_CC XSLPgetslpsol(XSLPprob prob, double *x, double *slack, double *duals, double *djs);
prob
|
The current SLP problem.
|
x
|
Double array of length
XSLP_ORIGINALCOLS to hold the values of the primal variables. May be
NULL if not required.
|
slack
|
Double array of length
XSLP_ORIGINALROWS to hold the values of the slack variables. May be
NULL if not required.
|
duals
|
Double array of length
XSLP_ORIGINALROWS to hold the values of the dual variables. May be
NULL if not required.
|
djs
|
Double array of length
XSLP_ORIGINALCOLS to hold the reduced costs of the primal variables. May be
NULL if not required.
|
XSLPprob prob; int nCol; double *val, *djs; XSLPgetintattrib(prob,XSLP_ORIGINALCOLS,&nCol); val = malloc(nCol*sizeof(double)); djs = malloc(nCol*sizeof(double)); XSLPgetslpsol(prob,val,NULL,NULL,djs);
The behavior of this function depends on the XSLP_FILTER control. If XSLP_FILTER_KEEPBEST is set (which is the default), then XSLPgetslpsol will return the best solution seen so far, otherwise the solution of the most recent SLP iteration will be returned.
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. XSLPgetslpsol returns values for the columns and rows originally in the problem and not for any augmentation rows or columns. To access the values of any augmentation columns or rows, use XPRSgetlpsol; accessing the augmented solution is only recommended if XSLP_PRESOLVELEVEL indicates that the problem dimensions should not be changed in presolve.
© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.