Initializing help system before first use

XPRSgetnlpsol, XSLPgetslpsol

Purpose
This subroutine is deprecated and will be removed in a future release. Use XPRSgetsolution and related functions instead.
Obtain the current SLP solution values
Topic area
Synopsis
int XPRSgetnlpsol(XPRSprob prob, double x[], double slack[], double duals[], double djs[]);

int XSLPgetslpsol(XSLPprob prob, double x[], double slack[], double duals[], double djs[]);
Arguments
prob 
The current SLP problem.
x 
Double array of length NLPORIGINALCOLS to hold the values of the primal variables. May be NULL if not required.
slack 
Double array of length NLPORIGINALROWS to hold the values of the slack variables. May be NULL if not required.
duals 
Double array of length NLPORIGINALROWS to hold the values of the dual variables. May be NULL if not required.
djs 
Double array of length NLPORIGINALCOLS to hold the reduced 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 for the current SLP solution:
XPRSprob prob;
int nCol;
double *val, *djs;
XPRSgetintattrib(prob,XPRS_NLPORIGINALCOLS,&nCol);
val = malloc(nCol*sizeof(double));
djs = malloc(nCol*sizeof(double));
XPRSgetnlpsol(prob,val,NULL,NULL,djs);
Further information
1. The behavior of this function depends on the SLPRETURNSOLUTION control. Unless it is set to XPRS_SLPRETURNSOLUTION_FINALITERATE, XPRSgetnlpsol will return the best solution seen so far (the default behavior), otherwise the solution of the most recent SLP iteration will be returned. The current iteration solution (in the presolved space) can be obtained from XPRSslpgetcolinfo.
2. XPRSgetnlpsol 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. XPRSgetnlpsol returns the solution in the original space. To access the values of any augmentation columns or rows, use XPRSgetlpsol; accessing the augmented solution is only recommended if NLPPRESOLVELEVEL indicates that the problem dimensions should not be changed in presolve.

© 2001-2026 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.