problem.getslpsol
problem.getslpsol |
Purpose
Obtain the solution values for the most recent SLP iteration
Synopsis
problem.getslpsol(x, slack, dual, dj)
Arguments
x
|
Array of length
problem.attributes.xslp_originalcols to hold the values of the primal variables. May be
None if not required.
|
slack
|
Array of length
problem.attributes.xslp_originalrows to hold the values of the slack variables. May be
None if not required.
|
dual
|
Array of length
problem.attributes.xslp_originalrows to hold the values of the dual variables. May be
None if not required.
|
dj
|
Array of length
problem.attributes.xslp_originalcols to hold the recuded costs of the primal variables. May be
None if not required.
|
Example
The following code fragment recovers the values and reduced costs of the primal variables from the most recent SLP iteration:
ncol = p.getintattrib(prob,xpress.xslp_originalcols) val = [] dj = [] p.getslpsol(val,None,None,dj)
Further information
getslpsol 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.
getslpsol 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
getlpsol; accessing the augmented solution is only recommended if
xslp_presolvelevel indicates that the problem dimensions should not be changed in presolve.