XPRSgetpivots
XPRSgetpivots |
Purpose
Synopsis
int XPRS_CC XPRSgetpivots(XPRSprob prob, int in, int outlist[], double x[], double *dobj, int *npiv, int maxpiv);
Arguments
prob
|
The current problem.
|
in
|
Index of the specified row or column to enter basis.
|
outlist
|
Integer array of length at least
maxpiv to hold list of potential leaving variables. May be
NULL if not required.
|
x
|
|
dobj
|
Pointer to a double where the objective function value that would result if
in entered the basis will be returned.
|
npiv
|
Pointer to an integer where the actual number of potential leaving variables will be returned.
|
maxpiv
|
Maximum number of potential leaving variables to return.
|
Error value
Indicates
in is invalid (out of range or already basic).
|
Example
The following retrieves a list of up to 5 potential leaving variables if variable 6 enters the basis:
int npiv, outlist[5]; double dobj; ... XPRSgetpivots(prob,6,outlist,NULL,&dobj,&npiv,5);
Further information
1. If the variable
in enters the basis and the problem is degenerate then several basic variables are candidates for leaving the basis, and the number of potential candidates is returned in
npiv. A list of at most
maxpiv of these candidates is returned in
outlist which must be at least
maxpiv long. If variable
in were to be pivoted in, then because the problem is degenerate, the resulting values of the objective function and all the variables do not depend on which of the candidates from
outlist is chosen to leave the basis. The value of the objective is returned in
dobj and the values of the variables into
x.
2. Row indices are in the range
0 to
ROWS-
1, whilst columns are in the range
ROWS+
SPAREROWS to
ROWS+
SPAREROWS+
COLS-
1.
Related topics